generated-configure.sh revision 1776:9c37a640ddba
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
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826VERSION_IS_GA
827VERSION_SHORT
828VERSION_STRING
829VERSION_NUMBER_FOUR_POSITIONS
830VERSION_NUMBER
831VERSION_OPT
832VERSION_BUILD
833VERSION_PRE
834VERSION_PATCH
835VERSION_SECURITY
836VERSION_MINOR
837VERSION_MAJOR
838MACOSX_BUNDLE_ID_BASE
839MACOSX_BUNDLE_NAME_BASE
840COMPANY_NAME
841JDK_RC_PLATFORM_NAME
842PRODUCT_SUFFIX
843PRODUCT_NAME
844LAUNCHER_NAME
845COPYRIGHT_YEAR
846COMPRESS_JARS
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853BDEPS_FTP
854BDEPS_UNZIP
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860SETFILE
861CODESIGN
862XATTR
863DSYMUTIL
864IS_GNU_TIME
865PATCH
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952CPIO
953DF
954READLINK
955CYGPATH
956SED
957FGREP
958EGREP
959GREP
960AWK
961XARGS
962WHICH
963WC
964UNIQ
965UNAME
966TR
967TOUCH
968TEE
969TAR
970TAIL
971SORT
972SH
973RM
974PRINTF
975NAWK
976MV
977MKTEMP
978MKDIR
979LS
980LN
981HEAD
982FIND
983FILE
984EXPR
985ECHO
986DIRNAME
987DIFF
988DATE
989CUT
990CP
991COMM
992CMP
993CHMOD
994CAT
995BASH
996BASENAME
997DATE_WHEN_CONFIGURED
998ORIGINAL_PATH
999CONFIGURE_COMMAND_LINE
1000target_alias
1001host_alias
1002build_alias
1003LIBS
1004ECHO_T
1005ECHO_N
1006ECHO_C
1007DEFS
1008mandir
1009localedir
1010libdir
1011psdir
1012pdfdir
1013dvidir
1014htmldir
1015infodir
1016docdir
1017oldincludedir
1018includedir
1019localstatedir
1020sharedstatedir
1021sysconfdir
1022datadir
1023datarootdir
1024libexecdir
1025sbindir
1026bindir
1027program_transform_name
1028prefix
1029exec_prefix
1030PACKAGE_URL
1031PACKAGE_BUGREPORT
1032PACKAGE_STRING
1033PACKAGE_VERSION
1034PACKAGE_TARNAME
1035PACKAGE_NAME
1036PATH_SEPARATOR
1037SHELL'
1038ac_subst_files=''
1039ac_user_opts='
1040enable_option_checking
1041with_target_bits
1042enable_openjdk_only
1043with_custom_make_dir
1044with_jdk_variant
1045with_jvm_interpreter
1046with_jvm_variants
1047enable_debug
1048with_debug_level
1049with_devkit
1050with_sys_root
1051with_sysroot
1052with_tools_dir
1053with_toolchain_path
1054with_extra_path
1055with_sdk_name
1056with_conf_name
1057with_output_sync
1058with_builddeps_conf
1059with_builddeps_server
1060with_builddeps_dir
1061with_builddeps_group
1062enable_headful
1063enable_hotspot_test_in_build
1064with_cacerts_file
1065enable_unlimited_crypto
1066with_copyright_year
1067with_milestone
1068with_update_version
1069with_user_release_suffix
1070with_build_number
1071with_version_string
1072with_version_pre
1073with_version_opt_base
1074with_version_opt_debuglevel
1075with_version_build
1076with_version_major
1077with_version_minor
1078with_version_security
1079with_version_patch
1080with_boot_jdk
1081with_add_source_root
1082with_override_source_root
1083with_adds_and_overrides
1084with_override_langtools
1085with_override_corba
1086with_override_jaxp
1087with_override_jaxws
1088with_override_hotspot
1089with_override_nashorn
1090with_override_jdk
1091with_import_hotspot
1092with_toolchain_type
1093with_toolchain_version
1094with_jtreg
1095with_extra_cflags
1096with_extra_cxxflags
1097with_extra_ldflags
1098enable_warnings_as_errors
1099enable_debug_symbols
1100enable_zip_debug_info
1101enable_native_coverage
1102with_x
1103with_cups
1104with_cups_include
1105with_freetype
1106with_freetype_include
1107with_freetype_lib
1108with_freetype_src
1109enable_freetype_bundling
1110with_alsa
1111with_alsa_include
1112with_alsa_lib
1113with_libjpeg
1114with_giflib
1115with_lcms
1116with_libpng
1117with_zlib
1118with_stdc__lib
1119with_msvcr_dll
1120with_msvcp_dll
1121with_dxsdk
1122with_dxsdk_lib
1123with_dxsdk_include
1124with_num_cores
1125with_memory_size
1126with_jobs
1127with_boot_jdk_jvmargs
1128with_sjavac_server_java
1129enable_sjavac
1130enable_precompiled_headers
1131enable_ccache
1132with_ccache_dir
1133'
1134      ac_precious_vars='build_alias
1135host_alias
1136target_alias
1137BASENAME
1138BASH
1139CAT
1140CHMOD
1141CMP
1142COMM
1143CP
1144CUT
1145DATE
1146DIFF
1147DIRNAME
1148ECHO
1149EXPR
1150FILE
1151FIND
1152HEAD
1153LN
1154LS
1155MKDIR
1156MKTEMP
1157MV
1158NAWK
1159PRINTF
1160RM
1161SH
1162SORT
1163TAIL
1164TAR
1165TEE
1166TOUCH
1167TR
1168UNAME
1169UNIQ
1170WC
1171WHICH
1172XARGS
1173AWK
1174GREP
1175EGREP
1176FGREP
1177SED
1178CYGPATH
1179READLINK
1180DF
1181CPIO
1182UNZIP
1183ZIP
1184LDD
1185OTOOL
1186READELF
1187HG
1188STAT
1189TIME
1190PATCH
1191DSYMUTIL
1192XATTR
1193CODESIGN
1194SETFILE
1195PKG_CONFIG
1196JAVA
1197JAVAC
1198JAVAH
1199JAR
1200JARSIGNER
1201CC
1202CFLAGS
1203LDFLAGS
1204LIBS
1205CPPFLAGS
1206CXX
1207CXXFLAGS
1208CCC
1209CPP
1210CXXCPP
1211AS
1212AR
1213LIPO
1214STRIP
1215NM
1216GNM
1217OBJCOPY
1218OBJDUMP
1219BUILD_CC
1220BUILD_CXX
1221BUILD_LD
1222JTREGEXE
1223XMKMF
1224FREETYPE_CFLAGS
1225FREETYPE_LIBS
1226ALSA_CFLAGS
1227ALSA_LIBS
1228LCMS_CFLAGS
1229LCMS_LIBS
1230PNG_CFLAGS
1231PNG_LIBS
1232LIBFFI_CFLAGS
1233LIBFFI_LIBS
1234CCACHE'
1235
1236
1237# Initialize some variables set by options.
1238ac_init_help=
1239ac_init_version=false
1240ac_unrecognized_opts=
1241ac_unrecognized_sep=
1242# The variables have the same names as the options, with
1243# dashes changed to underlines.
1244cache_file=/dev/null
1245exec_prefix=NONE
1246no_create=
1247no_recursion=
1248prefix=NONE
1249program_prefix=NONE
1250program_suffix=NONE
1251program_transform_name=s,x,x,
1252silent=
1253site=
1254srcdir=
1255verbose=
1256x_includes=NONE
1257x_libraries=NONE
1258
1259# Installation directory options.
1260# These are left unexpanded so users can "make install exec_prefix=/foo"
1261# and all the variables that are supposed to be based on exec_prefix
1262# by default will actually change.
1263# Use braces instead of parens because sh, perl, etc. also accept them.
1264# (The list follows the same order as the GNU Coding Standards.)
1265bindir='${exec_prefix}/bin'
1266sbindir='${exec_prefix}/sbin'
1267libexecdir='${exec_prefix}/libexec'
1268datarootdir='${prefix}/share'
1269datadir='${datarootdir}'
1270sysconfdir='${prefix}/etc'
1271sharedstatedir='${prefix}/com'
1272localstatedir='${prefix}/var'
1273includedir='${prefix}/include'
1274oldincludedir='/usr/include'
1275docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1276infodir='${datarootdir}/info'
1277htmldir='${docdir}'
1278dvidir='${docdir}'
1279pdfdir='${docdir}'
1280psdir='${docdir}'
1281libdir='${exec_prefix}/lib'
1282localedir='${datarootdir}/locale'
1283mandir='${datarootdir}/man'
1284
1285ac_prev=
1286ac_dashdash=
1287for ac_option
1288do
1289  # If the previous option needs an argument, assign it.
1290  if test -n "$ac_prev"; then
1291    eval $ac_prev=\$ac_option
1292    ac_prev=
1293    continue
1294  fi
1295
1296  case $ac_option in
1297  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1298  *=)   ac_optarg= ;;
1299  *)    ac_optarg=yes ;;
1300  esac
1301
1302  # Accept the important Cygnus configure options, so we can diagnose typos.
1303
1304  case $ac_dashdash$ac_option in
1305  --)
1306    ac_dashdash=yes ;;
1307
1308  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1309    ac_prev=bindir ;;
1310  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1311    bindir=$ac_optarg ;;
1312
1313  -build | --build | --buil | --bui | --bu)
1314    ac_prev=build_alias ;;
1315  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1316    build_alias=$ac_optarg ;;
1317
1318  -cache-file | --cache-file | --cache-fil | --cache-fi \
1319  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1320    ac_prev=cache_file ;;
1321  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1322  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1323    cache_file=$ac_optarg ;;
1324
1325  --config-cache | -C)
1326    cache_file=config.cache ;;
1327
1328  -datadir | --datadir | --datadi | --datad)
1329    ac_prev=datadir ;;
1330  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1331    datadir=$ac_optarg ;;
1332
1333  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1334  | --dataroo | --dataro | --datar)
1335    ac_prev=datarootdir ;;
1336  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1337  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1338    datarootdir=$ac_optarg ;;
1339
1340  -disable-* | --disable-*)
1341    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1342    # Reject names that are not valid shell variable names.
1343    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1344      as_fn_error $? "invalid feature name: $ac_useropt"
1345    ac_useropt_orig=$ac_useropt
1346    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1347    case $ac_user_opts in
1348      *"
1349"enable_$ac_useropt"
1350"*) ;;
1351      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1352	 ac_unrecognized_sep=', ';;
1353    esac
1354    eval enable_$ac_useropt=no ;;
1355
1356  -docdir | --docdir | --docdi | --doc | --do)
1357    ac_prev=docdir ;;
1358  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1359    docdir=$ac_optarg ;;
1360
1361  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1362    ac_prev=dvidir ;;
1363  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1364    dvidir=$ac_optarg ;;
1365
1366  -enable-* | --enable-*)
1367    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1368    # Reject names that are not valid shell variable names.
1369    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1370      as_fn_error $? "invalid feature name: $ac_useropt"
1371    ac_useropt_orig=$ac_useropt
1372    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1373    case $ac_user_opts in
1374      *"
1375"enable_$ac_useropt"
1376"*) ;;
1377      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1378	 ac_unrecognized_sep=', ';;
1379    esac
1380    eval enable_$ac_useropt=\$ac_optarg ;;
1381
1382  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1383  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1384  | --exec | --exe | --ex)
1385    ac_prev=exec_prefix ;;
1386  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1387  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1388  | --exec=* | --exe=* | --ex=*)
1389    exec_prefix=$ac_optarg ;;
1390
1391  -gas | --gas | --ga | --g)
1392    # Obsolete; use --with-gas.
1393    with_gas=yes ;;
1394
1395  -help | --help | --hel | --he | -h)
1396    ac_init_help=long ;;
1397  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1398    ac_init_help=recursive ;;
1399  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1400    ac_init_help=short ;;
1401
1402  -host | --host | --hos | --ho)
1403    ac_prev=host_alias ;;
1404  -host=* | --host=* | --hos=* | --ho=*)
1405    host_alias=$ac_optarg ;;
1406
1407  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1408    ac_prev=htmldir ;;
1409  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1410  | --ht=*)
1411    htmldir=$ac_optarg ;;
1412
1413  -includedir | --includedir | --includedi | --included | --include \
1414  | --includ | --inclu | --incl | --inc)
1415    ac_prev=includedir ;;
1416  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1417  | --includ=* | --inclu=* | --incl=* | --inc=*)
1418    includedir=$ac_optarg ;;
1419
1420  -infodir | --infodir | --infodi | --infod | --info | --inf)
1421    ac_prev=infodir ;;
1422  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1423    infodir=$ac_optarg ;;
1424
1425  -libdir | --libdir | --libdi | --libd)
1426    ac_prev=libdir ;;
1427  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1428    libdir=$ac_optarg ;;
1429
1430  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1431  | --libexe | --libex | --libe)
1432    ac_prev=libexecdir ;;
1433  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1434  | --libexe=* | --libex=* | --libe=*)
1435    libexecdir=$ac_optarg ;;
1436
1437  -localedir | --localedir | --localedi | --localed | --locale)
1438    ac_prev=localedir ;;
1439  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1440    localedir=$ac_optarg ;;
1441
1442  -localstatedir | --localstatedir | --localstatedi | --localstated \
1443  | --localstate | --localstat | --localsta | --localst | --locals)
1444    ac_prev=localstatedir ;;
1445  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1446  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1447    localstatedir=$ac_optarg ;;
1448
1449  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1450    ac_prev=mandir ;;
1451  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1452    mandir=$ac_optarg ;;
1453
1454  -nfp | --nfp | --nf)
1455    # Obsolete; use --without-fp.
1456    with_fp=no ;;
1457
1458  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1459  | --no-cr | --no-c | -n)
1460    no_create=yes ;;
1461
1462  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1463  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1464    no_recursion=yes ;;
1465
1466  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1467  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1468  | --oldin | --oldi | --old | --ol | --o)
1469    ac_prev=oldincludedir ;;
1470  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1471  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1472  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1473    oldincludedir=$ac_optarg ;;
1474
1475  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1476    ac_prev=prefix ;;
1477  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1478    prefix=$ac_optarg ;;
1479
1480  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1481  | --program-pre | --program-pr | --program-p)
1482    ac_prev=program_prefix ;;
1483  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1484  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1485    program_prefix=$ac_optarg ;;
1486
1487  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1488  | --program-suf | --program-su | --program-s)
1489    ac_prev=program_suffix ;;
1490  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1491  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1492    program_suffix=$ac_optarg ;;
1493
1494  -program-transform-name | --program-transform-name \
1495  | --program-transform-nam | --program-transform-na \
1496  | --program-transform-n | --program-transform- \
1497  | --program-transform | --program-transfor \
1498  | --program-transfo | --program-transf \
1499  | --program-trans | --program-tran \
1500  | --progr-tra | --program-tr | --program-t)
1501    ac_prev=program_transform_name ;;
1502  -program-transform-name=* | --program-transform-name=* \
1503  | --program-transform-nam=* | --program-transform-na=* \
1504  | --program-transform-n=* | --program-transform-=* \
1505  | --program-transform=* | --program-transfor=* \
1506  | --program-transfo=* | --program-transf=* \
1507  | --program-trans=* | --program-tran=* \
1508  | --progr-tra=* | --program-tr=* | --program-t=*)
1509    program_transform_name=$ac_optarg ;;
1510
1511  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1512    ac_prev=pdfdir ;;
1513  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1514    pdfdir=$ac_optarg ;;
1515
1516  -psdir | --psdir | --psdi | --psd | --ps)
1517    ac_prev=psdir ;;
1518  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1519    psdir=$ac_optarg ;;
1520
1521  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1522  | -silent | --silent | --silen | --sile | --sil)
1523    silent=yes ;;
1524
1525  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1526    ac_prev=sbindir ;;
1527  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1528  | --sbi=* | --sb=*)
1529    sbindir=$ac_optarg ;;
1530
1531  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1532  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1533  | --sharedst | --shareds | --shared | --share | --shar \
1534  | --sha | --sh)
1535    ac_prev=sharedstatedir ;;
1536  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1537  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1538  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1539  | --sha=* | --sh=*)
1540    sharedstatedir=$ac_optarg ;;
1541
1542  -site | --site | --sit)
1543    ac_prev=site ;;
1544  -site=* | --site=* | --sit=*)
1545    site=$ac_optarg ;;
1546
1547  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1548    ac_prev=srcdir ;;
1549  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1550    srcdir=$ac_optarg ;;
1551
1552  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1553  | --syscon | --sysco | --sysc | --sys | --sy)
1554    ac_prev=sysconfdir ;;
1555  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1556  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1557    sysconfdir=$ac_optarg ;;
1558
1559  -target | --target | --targe | --targ | --tar | --ta | --t)
1560    ac_prev=target_alias ;;
1561  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1562    target_alias=$ac_optarg ;;
1563
1564  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1565    verbose=yes ;;
1566
1567  -version | --version | --versio | --versi | --vers | -V)
1568    ac_init_version=: ;;
1569
1570  -with-* | --with-*)
1571    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
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--with-$ac_useropt_orig"
1582	 ac_unrecognized_sep=', ';;
1583    esac
1584    eval with_$ac_useropt=\$ac_optarg ;;
1585
1586  -without-* | --without-*)
1587    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1588    # Reject names that are not valid shell variable names.
1589    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1590      as_fn_error $? "invalid package name: $ac_useropt"
1591    ac_useropt_orig=$ac_useropt
1592    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1593    case $ac_user_opts in
1594      *"
1595"with_$ac_useropt"
1596"*) ;;
1597      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1598	 ac_unrecognized_sep=', ';;
1599    esac
1600    eval with_$ac_useropt=no ;;
1601
1602  --x)
1603    # Obsolete; use --with-x.
1604    with_x=yes ;;
1605
1606  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1607  | --x-incl | --x-inc | --x-in | --x-i)
1608    ac_prev=x_includes ;;
1609  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1610  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1611    x_includes=$ac_optarg ;;
1612
1613  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1614  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1615    ac_prev=x_libraries ;;
1616  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1617  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1618    x_libraries=$ac_optarg ;;
1619
1620  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1621Try \`$0 --help' for more information"
1622    ;;
1623
1624  *=*)
1625    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1626    # Reject names that are not valid shell variable names.
1627    case $ac_envvar in #(
1628      '' | [0-9]* | *[!_$as_cr_alnum]* )
1629      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1630    esac
1631    eval $ac_envvar=\$ac_optarg
1632    export $ac_envvar ;;
1633
1634  *)
1635    # FIXME: should be removed in autoconf 3.0.
1636    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1637    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1638      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1639    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1640    ;;
1641
1642  esac
1643done
1644
1645if test -n "$ac_prev"; then
1646  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1647  as_fn_error $? "missing argument to $ac_option"
1648fi
1649
1650if test -n "$ac_unrecognized_opts"; then
1651  case $enable_option_checking in
1652    no) ;;
1653    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1654    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1655  esac
1656fi
1657
1658# Check all directory arguments for consistency.
1659for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1660		datadir sysconfdir sharedstatedir localstatedir includedir \
1661		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1662		libdir localedir mandir
1663do
1664  eval ac_val=\$$ac_var
1665  # Remove trailing slashes.
1666  case $ac_val in
1667    */ )
1668      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1669      eval $ac_var=\$ac_val;;
1670  esac
1671  # Be sure to have absolute directory names.
1672  case $ac_val in
1673    [\\/$]* | ?:[\\/]* )  continue;;
1674    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1675  esac
1676  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1677done
1678
1679# There might be people who depend on the old broken behavior: `$host'
1680# used to hold the argument of --host etc.
1681# FIXME: To remove some day.
1682build=$build_alias
1683host=$host_alias
1684target=$target_alias
1685
1686# FIXME: To remove some day.
1687if test "x$host_alias" != x; then
1688  if test "x$build_alias" = x; then
1689    cross_compiling=maybe
1690  elif test "x$build_alias" != "x$host_alias"; then
1691    cross_compiling=yes
1692  fi
1693fi
1694
1695ac_tool_prefix=
1696test -n "$host_alias" && ac_tool_prefix=$host_alias-
1697
1698test "$silent" = yes && exec 6>/dev/null
1699
1700
1701ac_pwd=`pwd` && test -n "$ac_pwd" &&
1702ac_ls_di=`ls -di .` &&
1703ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1704  as_fn_error $? "working directory cannot be determined"
1705test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1706  as_fn_error $? "pwd does not report name of working directory"
1707
1708
1709# Find the source files, if location was not specified.
1710if test -z "$srcdir"; then
1711  ac_srcdir_defaulted=yes
1712  # Try the directory containing this script, then the parent directory.
1713  ac_confdir=`$as_dirname -- "$as_myself" ||
1714$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1715	 X"$as_myself" : 'X\(//\)[^/]' \| \
1716	 X"$as_myself" : 'X\(//\)$' \| \
1717	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1718$as_echo X"$as_myself" |
1719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\/\)[^/].*/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\/\)$/{
1728	    s//\1/
1729	    q
1730	  }
1731	  /^X\(\/\).*/{
1732	    s//\1/
1733	    q
1734	  }
1735	  s/.*/./; q'`
1736  srcdir=$ac_confdir
1737  if test ! -r "$srcdir/$ac_unique_file"; then
1738    srcdir=..
1739  fi
1740else
1741  ac_srcdir_defaulted=no
1742fi
1743if test ! -r "$srcdir/$ac_unique_file"; then
1744  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1745  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1746fi
1747ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1748ac_abs_confdir=`(
1749	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1750	pwd)`
1751# When building in place, set srcdir=.
1752if test "$ac_abs_confdir" = "$ac_pwd"; then
1753  srcdir=.
1754fi
1755# Remove unnecessary trailing slashes from srcdir.
1756# Double slashes in file names in object file debugging info
1757# mess up M-x gdb in Emacs.
1758case $srcdir in
1759*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1760esac
1761for ac_var in $ac_precious_vars; do
1762  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1763  eval ac_env_${ac_var}_value=\$${ac_var}
1764  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1765  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1766done
1767
1768#
1769# Report the --help message.
1770#
1771if test "$ac_init_help" = "long"; then
1772  # Omit some internal or obsolete options to make the list less imposing.
1773  # This message is too long to be a string in the A/UX 3.1 sh.
1774  cat <<_ACEOF
1775\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1776
1777Usage: $0 [OPTION]... [VAR=VALUE]...
1778
1779To assign environment variables (e.g., CC, CFLAGS...), specify them as
1780VAR=VALUE.  See below for descriptions of some of the useful variables.
1781
1782Defaults for the options are specified in brackets.
1783
1784Configuration:
1785  -h, --help              display this help and exit
1786      --help=short        display options specific to this package
1787      --help=recursive    display the short help of all the included packages
1788  -V, --version           display version information and exit
1789  -q, --quiet, --silent   do not print \`checking ...' messages
1790      --cache-file=FILE   cache test results in FILE [disabled]
1791  -C, --config-cache      alias for \`--cache-file=config.cache'
1792  -n, --no-create         do not create output files
1793      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1794
1795Installation directories:
1796  --prefix=PREFIX         install architecture-independent files in PREFIX
1797                          [$ac_default_prefix]
1798  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1799                          [PREFIX]
1800
1801By default, \`make install' will install all the files in
1802\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1803an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1804for instance \`--prefix=\$HOME'.
1805
1806For better control, use the options below.
1807
1808Fine tuning of the installation directories:
1809  --bindir=DIR            user executables [EPREFIX/bin]
1810  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1811  --libexecdir=DIR        program executables [EPREFIX/libexec]
1812  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1813  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1814  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1815  --libdir=DIR            object code libraries [EPREFIX/lib]
1816  --includedir=DIR        C header files [PREFIX/include]
1817  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1818  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1819  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1820  --infodir=DIR           info documentation [DATAROOTDIR/info]
1821  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1822  --mandir=DIR            man documentation [DATAROOTDIR/man]
1823  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1824  --htmldir=DIR           html documentation [DOCDIR]
1825  --dvidir=DIR            dvi documentation [DOCDIR]
1826  --pdfdir=DIR            pdf documentation [DOCDIR]
1827  --psdir=DIR             ps documentation [DOCDIR]
1828_ACEOF
1829
1830  cat <<\_ACEOF
1831
1832X features:
1833  --x-includes=DIR    X include files are in DIR
1834  --x-libraries=DIR   X library files are in DIR
1835
1836System types:
1837  --build=BUILD     configure for building on BUILD [guessed]
1838  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1839  --target=TARGET   configure for building compilers for TARGET [HOST]
1840_ACEOF
1841fi
1842
1843if test -n "$ac_init_help"; then
1844  case $ac_init_help in
1845     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1846   esac
1847  cat <<\_ACEOF
1848
1849Optional Features:
1850  --disable-option-checking  ignore unrecognized --enable/--with options
1851  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1852  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1853  --enable-openjdk-only   suppress building custom source even if present
1854                          [disabled]
1855  --enable-debug          set the debug level to fastdebug (shorthand for
1856                          --with-debug-level=fastdebug) [disabled]
1857  --disable-headful       disable building headful support (graphical UI
1858                          support) [enabled]
1859  --enable-hotspot-test-in-build
1860                          run the Queens test after Hotspot build [disabled]
1861  --enable-unlimited-crypto
1862                          Enable unlimited crypto policy [disabled]
1863  --disable-warnings-as-errors
1864                          do not consider native warnings to be an error
1865                          [enabled]
1866  --disable-debug-symbols disable generation of debug symbols [enabled]
1867  --disable-zip-debug-info
1868                          disable zipping of debug-info files [enabled]
1869  --enable-native-coverage
1870                          enable native compilation with code coverage
1871                          data[disabled]
1872  --disable-freetype-bundling
1873                          disable bundling of the freetype library with the
1874                          build result [enabled on Windows or when using
1875                          --with-freetype, disabled otherwise]
1876  --enable-sjavac         use sjavac to do fast incremental compiles
1877                          [disabled]
1878  --disable-precompiled-headers
1879                          disable using precompiled headers when compiling C++
1880                          [enabled]
1881  --enable-ccache         enable using ccache to speed up recompilations
1882                          [disabled]
1883
1884Optional Packages:
1885  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1886  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1887  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1888                          support it), e.g. --with-target-bits=32 [guessed]
1889  --with-custom-make-dir  Deprecated. Option is kept for backwards
1890                          compatibility and is ignored
1891  --with-jdk-variant      JDK variant to build (normal) [normal]
1892  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1893  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1894                          client, minimal1, kernel, zero, zeroshark, core)
1895                          [server]
1896  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1897                          optimized (HotSpot build only)) [release]
1898  --with-devkit           use this devkit for compilers, tools and resources
1899  --with-sys-root         alias for --with-sysroot for backwards compatability
1900  --with-sysroot          use this directory as sysroot
1901  --with-tools-dir        alias for --with-toolchain-path for backwards
1902                          compatibility
1903  --with-toolchain-path   prepend these directories when searching for
1904                          toolchain binaries (compilers etc)
1905  --with-extra-path       prepend these directories to the default path
1906  --with-sdk-name         use the platform SDK of the given name. [macosx]
1907  --with-conf-name        use this as the name of the configuration [generated
1908                          from important configuration options]
1909  --with-output-sync      set make output sync type if supported by make.
1910                          [recurse]
1911  --with-builddeps-conf   use this configuration file for the builddeps
1912  --with-builddeps-server download and use build dependencies from this server
1913                          url
1914  --with-builddeps-dir    store downloaded build dependencies here
1915                          [/localhome/builddeps]
1916  --with-builddeps-group  chgrp the downloaded build dependencies to this
1917                          group
1918  --with-cacerts-file     specify alternative cacerts file
1919  --with-copyright-year   Set copyright year value for build [current year]
1920  --with-milestone        Deprecated. Option is kept for backwards
1921                          compatibility and is ignored
1922  --with-update-version   Deprecated. Option is kept for backwards
1923                          compatibility and is ignored
1924  --with-user-release-suffix
1925                          Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-build-number     Deprecated. Option is kept for backwards
1928                          compatibility and is ignored
1929  --with-version-string   Set version string [calculated]
1930  --with-version-pre      Set the base part of the version 'PRE' field
1931                          (pre-release identifier) ['internal']
1932  --with-version-opt-base Set version 'OPT' base field. Debug level will be
1933                          appended. (build metadata)
1934                          [<timestamp>.<user>.<dirname>]
1935  --with-version-opt-debuglevel
1936                          Set version 'OPT' field (build metadata)
1937                          [<timestamp>.<user>.<dirname>]
1938  --with-version-build    Set version 'BUILD' field (build number) [not
1939                          specified]
1940  --with-version-major    Set version 'MAJOR' field (first number) [current
1941                          source value]
1942  --with-version-minor    Set version 'MINOR' field (second number) [current
1943                          source value]
1944  --with-version-security Set version 'SECURITY' field (third number) [current
1945                          source value]
1946  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1947                          specified]
1948  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1949  --with-add-source-root  for each and every source directory, look in this
1950                          additional source root for the same directory; if it
1951                          exists and have files in it, include it in the build
1952  --with-override-source-root
1953                          for each and every source directory, look in this
1954                          override source root for the same directory; if it
1955                          exists, use that directory instead and ignore the
1956                          directory in the original source root
1957  --with-adds-and-overrides
1958                          use the subdirs 'adds' and 'overrides' in the
1959                          specified directory as add-source-root and
1960                          override-source-root
1961  --with-override-langtools
1962                          use this langtools dir for the build
1963  --with-override-corba   use this corba dir for the build
1964  --with-override-jaxp    use this jaxp dir for the build
1965  --with-override-jaxws   use this jaxws dir for the build
1966  --with-override-hotspot use this hotspot dir for the build
1967  --with-override-nashorn use this nashorn dir for the build
1968  --with-override-jdk     use this jdk dir for the build
1969  --with-import-hotspot   import hotspot binaries from this jdk image or
1970                          hotspot build dist dir instead of building from
1971                          source
1972  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1973                          to show possible values [platform dependent]
1974  --with-toolchain-version
1975                          the version of the toolchain to look for, use
1976                          '--help' to show possible values [platform
1977                          dependent]
1978  --with-jtreg            Regression Test Harness [probed]
1979  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1980  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1981  --with-extra-ldflags    extra flags to be used when linking jdk
1982  --with-x                use the X Window System
1983  --with-cups             specify prefix directory for the cups package
1984                          (expecting the headers under PATH/include)
1985  --with-cups-include     specify directory for the cups include files
1986  --with-freetype         specify prefix directory for the freetype package
1987                          (expecting the libraries under PATH/lib and the
1988                          headers under PATH/include)
1989  --with-freetype-include specify directory for the freetype include files
1990  --with-freetype-lib     specify directory for the freetype library
1991  --with-freetype-src     specify directory with freetype sources to
1992                          automatically build the library (experimental,
1993                          Windows-only)
1994  --with-alsa             specify prefix directory for the alsa package
1995                          (expecting the libraries under PATH/lib and the
1996                          headers under PATH/include)
1997  --with-alsa-include     specify directory for the alsa include files
1998  --with-alsa-lib         specify directory for the alsa library
1999  --with-libjpeg          use libjpeg from build system or OpenJDK source
2000                          (system, bundled) [bundled]
2001  --with-giflib           use giflib from build system or OpenJDK source
2002                          (system, bundled) [bundled]
2003  --with-lcms             use lcms2 from build system or OpenJDK source
2004                          (system, bundled) [bundled]
2005  --with-libpng           use libpng from build system or OpenJDK source
2006                          (system, bundled) [bundled]
2007  --with-zlib             use zlib from build system or OpenJDK source
2008                          (system, bundled) [bundled]
2009  --with-stdc++lib=<static>,<dynamic>,<default>
2010                          force linking of the C++ runtime on Linux to either
2011                          static or dynamic, default is static with dynamic as
2012                          fallback
2013  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2014                          (Windows only) [probed]
2015  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2016                          (Windows only) [probed]
2017  --with-dxsdk            Deprecated. Option is kept for backwards
2018                          compatibility and is ignored
2019  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-dxsdk-include    Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-num-cores        number of cores in the build system, e.g.
2024                          --with-num-cores=8 [probed]
2025  --with-memory-size      memory (in MB) available in the build system, e.g.
2026                          --with-memory-size=1024 [probed]
2027  --with-jobs             number of parallel jobs to let make run [calculated
2028                          based on cores and memory]
2029  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2030                          invocations of boot JDK, overriding the default
2031                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2032                          -enableassertions"
2033  --with-sjavac-server-java
2034                          use this java binary for running the sjavac
2035                          background server [Boot JDK java]
2036  --with-ccache-dir       where to store ccache files [~/.ccache]
2037
2038Some influential environment variables:
2039  BASENAME    Override default value for BASENAME
2040  BASH        Override default value for BASH
2041  CAT         Override default value for CAT
2042  CHMOD       Override default value for CHMOD
2043  CMP         Override default value for CMP
2044  COMM        Override default value for COMM
2045  CP          Override default value for CP
2046  CUT         Override default value for CUT
2047  DATE        Override default value for DATE
2048  DIFF        Override default value for DIFF
2049  DIRNAME     Override default value for DIRNAME
2050  ECHO        Override default value for ECHO
2051  EXPR        Override default value for EXPR
2052  FILE        Override default value for FILE
2053  FIND        Override default value for FIND
2054  HEAD        Override default value for HEAD
2055  LN          Override default value for LN
2056  LS          Override default value for LS
2057  MKDIR       Override default value for MKDIR
2058  MKTEMP      Override default value for MKTEMP
2059  MV          Override default value for MV
2060  NAWK        Override default value for NAWK
2061  PRINTF      Override default value for PRINTF
2062  RM          Override default value for RM
2063  SH          Override default value for SH
2064  SORT        Override default value for SORT
2065  TAIL        Override default value for TAIL
2066  TAR         Override default value for TAR
2067  TEE         Override default value for TEE
2068  TOUCH       Override default value for TOUCH
2069  TR          Override default value for TR
2070  UNAME       Override default value for UNAME
2071  UNIQ        Override default value for UNIQ
2072  WC          Override default value for WC
2073  WHICH       Override default value for WHICH
2074  XARGS       Override default value for XARGS
2075  AWK         Override default value for AWK
2076  GREP        Override default value for GREP
2077  EGREP       Override default value for EGREP
2078  FGREP       Override default value for FGREP
2079  SED         Override default value for SED
2080  CYGPATH     Override default value for CYGPATH
2081  READLINK    Override default value for READLINK
2082  DF          Override default value for DF
2083  CPIO        Override default value for CPIO
2084  UNZIP       Override default value for UNZIP
2085  ZIP         Override default value for ZIP
2086  LDD         Override default value for LDD
2087  OTOOL       Override default value for OTOOL
2088  READELF     Override default value for READELF
2089  HG          Override default value for HG
2090  STAT        Override default value for STAT
2091  TIME        Override default value for TIME
2092  PATCH       Override default value for PATCH
2093  DSYMUTIL    Override default value for DSYMUTIL
2094  XATTR       Override default value for XATTR
2095  CODESIGN    Override default value for CODESIGN
2096  SETFILE     Override default value for SETFILE
2097  PKG_CONFIG  path to pkg-config utility
2098  JAVA        Override default value for JAVA
2099  JAVAC       Override default value for JAVAC
2100  JAVAH       Override default value for JAVAH
2101  JAR         Override default value for JAR
2102  JARSIGNER   Override default value for JARSIGNER
2103  CC          C compiler command
2104  CFLAGS      C compiler flags
2105  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2106              nonstandard directory <lib dir>
2107  LIBS        libraries to pass to the linker, e.g. -l<library>
2108  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2109              you have headers in a nonstandard directory <include dir>
2110  CXX         C++ compiler command
2111  CXXFLAGS    C++ compiler flags
2112  CPP         C preprocessor
2113  CXXCPP      C++ preprocessor
2114  AS          Override default value for AS
2115  AR          Override default value for AR
2116  LIPO        Override default value for LIPO
2117  STRIP       Override default value for STRIP
2118  NM          Override default value for NM
2119  GNM         Override default value for GNM
2120  OBJCOPY     Override default value for OBJCOPY
2121  OBJDUMP     Override default value for OBJDUMP
2122  BUILD_CC    Override default value for BUILD_CC
2123  BUILD_CXX   Override default value for BUILD_CXX
2124  BUILD_LD    Override default value for BUILD_LD
2125  JTREGEXE    Override default value for JTREGEXE
2126  XMKMF       Path to xmkmf, Makefile generator for X Window System
2127  FREETYPE_CFLAGS
2128              C compiler flags for FREETYPE, overriding pkg-config
2129  FREETYPE_LIBS
2130              linker flags for FREETYPE, overriding pkg-config
2131  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2132  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2133  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2134  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2135  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2136  PNG_LIBS    linker flags for PNG, overriding pkg-config
2137  LIBFFI_CFLAGS
2138              C compiler flags for LIBFFI, overriding pkg-config
2139  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2140  CCACHE      Override default value for CCACHE
2141
2142Use these variables to override the choices made by `configure' or to help
2143it to find libraries and programs with nonstandard names/locations.
2144
2145Report bugs to <build-dev@openjdk.java.net>.
2146OpenJDK home page: <http://openjdk.java.net>.
2147_ACEOF
2148ac_status=$?
2149fi
2150
2151if test "$ac_init_help" = "recursive"; then
2152  # If there are subdirs, report their specific --help.
2153  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2154    test -d "$ac_dir" ||
2155      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2156      continue
2157    ac_builddir=.
2158
2159case "$ac_dir" in
2160.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2161*)
2162  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2163  # A ".." for each directory in $ac_dir_suffix.
2164  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2165  case $ac_top_builddir_sub in
2166  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2167  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2168  esac ;;
2169esac
2170ac_abs_top_builddir=$ac_pwd
2171ac_abs_builddir=$ac_pwd$ac_dir_suffix
2172# for backward compatibility:
2173ac_top_builddir=$ac_top_build_prefix
2174
2175case $srcdir in
2176  .)  # We are building in place.
2177    ac_srcdir=.
2178    ac_top_srcdir=$ac_top_builddir_sub
2179    ac_abs_top_srcdir=$ac_pwd ;;
2180  [\\/]* | ?:[\\/]* )  # Absolute name.
2181    ac_srcdir=$srcdir$ac_dir_suffix;
2182    ac_top_srcdir=$srcdir
2183    ac_abs_top_srcdir=$srcdir ;;
2184  *) # Relative name.
2185    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2186    ac_top_srcdir=$ac_top_build_prefix$srcdir
2187    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2188esac
2189ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2190
2191    cd "$ac_dir" || { ac_status=$?; continue; }
2192    # Check for guested configure.
2193    if test -f "$ac_srcdir/configure.gnu"; then
2194      echo &&
2195      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2196    elif test -f "$ac_srcdir/configure"; then
2197      echo &&
2198      $SHELL "$ac_srcdir/configure" --help=recursive
2199    else
2200      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2201    fi || ac_status=$?
2202    cd "$ac_pwd" || { ac_status=$?; break; }
2203  done
2204fi
2205
2206test -n "$ac_init_help" && exit $ac_status
2207if $ac_init_version; then
2208  cat <<\_ACEOF
2209OpenJDK configure jdk9
2210generated by GNU Autoconf 2.69
2211
2212Copyright (C) 2012 Free Software Foundation, Inc.
2213This configure script is free software; the Free Software Foundation
2214gives unlimited permission to copy, distribute and modify it.
2215_ACEOF
2216  exit
2217fi
2218
2219## ------------------------ ##
2220## Autoconf initialization. ##
2221## ------------------------ ##
2222
2223# ac_fn_c_try_compile LINENO
2224# --------------------------
2225# Try to compile conftest.$ac_ext, and return whether this succeeded.
2226ac_fn_c_try_compile ()
2227{
2228  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2229  rm -f conftest.$ac_objext
2230  if { { ac_try="$ac_compile"
2231case "(($ac_try" in
2232  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2233  *) ac_try_echo=$ac_try;;
2234esac
2235eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2236$as_echo "$ac_try_echo"; } >&5
2237  (eval "$ac_compile") 2>conftest.err
2238  ac_status=$?
2239  if test -s conftest.err; then
2240    grep -v '^ *+' conftest.err >conftest.er1
2241    cat conftest.er1 >&5
2242    mv -f conftest.er1 conftest.err
2243  fi
2244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2245  test $ac_status = 0; } && {
2246	 test -z "$ac_c_werror_flag" ||
2247	 test ! -s conftest.err
2248       } && test -s conftest.$ac_objext; then :
2249  ac_retval=0
2250else
2251  $as_echo "$as_me: failed program was:" >&5
2252sed 's/^/| /' conftest.$ac_ext >&5
2253
2254	ac_retval=1
2255fi
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_c_try_compile
2260
2261# ac_fn_cxx_try_compile LINENO
2262# ----------------------------
2263# Try to compile conftest.$ac_ext, and return whether this succeeded.
2264ac_fn_cxx_try_compile ()
2265{
2266  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2267  rm -f conftest.$ac_objext
2268  if { { ac_try="$ac_compile"
2269case "(($ac_try" in
2270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2271  *) ac_try_echo=$ac_try;;
2272esac
2273eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2274$as_echo "$ac_try_echo"; } >&5
2275  (eval "$ac_compile") 2>conftest.err
2276  ac_status=$?
2277  if test -s conftest.err; then
2278    grep -v '^ *+' conftest.err >conftest.er1
2279    cat conftest.er1 >&5
2280    mv -f conftest.er1 conftest.err
2281  fi
2282  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2283  test $ac_status = 0; } && {
2284	 test -z "$ac_cxx_werror_flag" ||
2285	 test ! -s conftest.err
2286       } && test -s conftest.$ac_objext; then :
2287  ac_retval=0
2288else
2289  $as_echo "$as_me: failed program was:" >&5
2290sed 's/^/| /' conftest.$ac_ext >&5
2291
2292	ac_retval=1
2293fi
2294  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295  as_fn_set_status $ac_retval
2296
2297} # ac_fn_cxx_try_compile
2298
2299# ac_fn_c_try_cpp LINENO
2300# ----------------------
2301# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2302ac_fn_c_try_cpp ()
2303{
2304  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305  if { { ac_try="$ac_cpp conftest.$ac_ext"
2306case "(($ac_try" in
2307  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2308  *) ac_try_echo=$ac_try;;
2309esac
2310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2311$as_echo "$ac_try_echo"; } >&5
2312  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2313  ac_status=$?
2314  if test -s conftest.err; then
2315    grep -v '^ *+' conftest.err >conftest.er1
2316    cat conftest.er1 >&5
2317    mv -f conftest.er1 conftest.err
2318  fi
2319  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2320  test $ac_status = 0; } > conftest.i && {
2321	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2322	 test ! -s conftest.err
2323       }; then :
2324  ac_retval=0
2325else
2326  $as_echo "$as_me: failed program was:" >&5
2327sed 's/^/| /' conftest.$ac_ext >&5
2328
2329    ac_retval=1
2330fi
2331  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2332  as_fn_set_status $ac_retval
2333
2334} # ac_fn_c_try_cpp
2335
2336# ac_fn_cxx_try_cpp LINENO
2337# ------------------------
2338# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2339ac_fn_cxx_try_cpp ()
2340{
2341  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342  if { { ac_try="$ac_cpp conftest.$ac_ext"
2343case "(($ac_try" in
2344  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2345  *) ac_try_echo=$ac_try;;
2346esac
2347eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2348$as_echo "$ac_try_echo"; } >&5
2349  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2350  ac_status=$?
2351  if test -s conftest.err; then
2352    grep -v '^ *+' conftest.err >conftest.er1
2353    cat conftest.er1 >&5
2354    mv -f conftest.er1 conftest.err
2355  fi
2356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2357  test $ac_status = 0; } > conftest.i && {
2358	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2359	 test ! -s conftest.err
2360       }; then :
2361  ac_retval=0
2362else
2363  $as_echo "$as_me: failed program was:" >&5
2364sed 's/^/| /' conftest.$ac_ext >&5
2365
2366    ac_retval=1
2367fi
2368  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369  as_fn_set_status $ac_retval
2370
2371} # ac_fn_cxx_try_cpp
2372
2373# ac_fn_c_try_link LINENO
2374# -----------------------
2375# Try to link conftest.$ac_ext, and return whether this succeeded.
2376ac_fn_c_try_link ()
2377{
2378  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379  rm -f conftest.$ac_objext conftest$ac_exeext
2380  if { { ac_try="$ac_link"
2381case "(($ac_try" in
2382  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2383  *) ac_try_echo=$ac_try;;
2384esac
2385eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2386$as_echo "$ac_try_echo"; } >&5
2387  (eval "$ac_link") 2>conftest.err
2388  ac_status=$?
2389  if test -s conftest.err; then
2390    grep -v '^ *+' conftest.err >conftest.er1
2391    cat conftest.er1 >&5
2392    mv -f conftest.er1 conftest.err
2393  fi
2394  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2395  test $ac_status = 0; } && {
2396	 test -z "$ac_c_werror_flag" ||
2397	 test ! -s conftest.err
2398       } && test -s conftest$ac_exeext && {
2399	 test "$cross_compiling" = yes ||
2400	 test -x conftest$ac_exeext
2401       }; then :
2402  ac_retval=0
2403else
2404  $as_echo "$as_me: failed program was:" >&5
2405sed 's/^/| /' conftest.$ac_ext >&5
2406
2407	ac_retval=1
2408fi
2409  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2410  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2411  # interfere with the next link command; also delete a directory that is
2412  # left behind by Apple's compiler.  We do this before executing the actions.
2413  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2414  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415  as_fn_set_status $ac_retval
2416
2417} # ac_fn_c_try_link
2418
2419# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2420# ---------------------------------------------------------
2421# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2422# the include files in INCLUDES and setting the cache variable VAR
2423# accordingly.
2424ac_fn_cxx_check_header_mongrel ()
2425{
2426  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427  if eval \${$3+:} false; then :
2428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2429$as_echo_n "checking for $2... " >&6; }
2430if eval \${$3+:} false; then :
2431  $as_echo_n "(cached) " >&6
2432fi
2433eval ac_res=\$$3
2434	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2435$as_echo "$ac_res" >&6; }
2436else
2437  # Is the header compilable?
2438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2439$as_echo_n "checking $2 usability... " >&6; }
2440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h.  */
2442$4
2443#include <$2>
2444_ACEOF
2445if ac_fn_cxx_try_compile "$LINENO"; then :
2446  ac_header_compiler=yes
2447else
2448  ac_header_compiler=no
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2452$as_echo "$ac_header_compiler" >&6; }
2453
2454# Is the header present?
2455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2456$as_echo_n "checking $2 presence... " >&6; }
2457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458/* end confdefs.h.  */
2459#include <$2>
2460_ACEOF
2461if ac_fn_cxx_try_cpp "$LINENO"; then :
2462  ac_header_preproc=yes
2463else
2464  ac_header_preproc=no
2465fi
2466rm -f conftest.err conftest.i conftest.$ac_ext
2467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2468$as_echo "$ac_header_preproc" >&6; }
2469
2470# So?  What about this header?
2471case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2472  yes:no: )
2473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2474$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2476$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2477    ;;
2478  no:yes:* )
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2480$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2482$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2484$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2486$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2488$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2489( $as_echo "## ----------------------------------------- ##
2490## Report this to build-dev@openjdk.java.net ##
2491## ----------------------------------------- ##"
2492     ) | sed "s/^/$as_me: WARNING:     /" >&2
2493    ;;
2494esac
2495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2496$as_echo_n "checking for $2... " >&6; }
2497if eval \${$3+:} false; then :
2498  $as_echo_n "(cached) " >&6
2499else
2500  eval "$3=\$ac_header_compiler"
2501fi
2502eval ac_res=\$$3
2503	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2504$as_echo "$ac_res" >&6; }
2505fi
2506  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2507
2508} # ac_fn_cxx_check_header_mongrel
2509
2510# ac_fn_cxx_try_run LINENO
2511# ------------------------
2512# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2513# that executables *can* be run.
2514ac_fn_cxx_try_run ()
2515{
2516  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2517  if { { ac_try="$ac_link"
2518case "(($ac_try" in
2519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2520  *) ac_try_echo=$ac_try;;
2521esac
2522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2523$as_echo "$ac_try_echo"; } >&5
2524  (eval "$ac_link") 2>&5
2525  ac_status=$?
2526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2527  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2528  { { case "(($ac_try" in
2529  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2530  *) ac_try_echo=$ac_try;;
2531esac
2532eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2533$as_echo "$ac_try_echo"; } >&5
2534  (eval "$ac_try") 2>&5
2535  ac_status=$?
2536  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2537  test $ac_status = 0; }; }; then :
2538  ac_retval=0
2539else
2540  $as_echo "$as_me: program exited with status $ac_status" >&5
2541       $as_echo "$as_me: failed program was:" >&5
2542sed 's/^/| /' conftest.$ac_ext >&5
2543
2544       ac_retval=$ac_status
2545fi
2546  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548  as_fn_set_status $ac_retval
2549
2550} # ac_fn_cxx_try_run
2551
2552# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2553# ---------------------------------------------------------
2554# Tests whether HEADER exists and can be compiled using the include files in
2555# INCLUDES, setting the cache variable VAR accordingly.
2556ac_fn_cxx_check_header_compile ()
2557{
2558  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2560$as_echo_n "checking for $2... " >&6; }
2561if eval \${$3+:} false; then :
2562  $as_echo_n "(cached) " >&6
2563else
2564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2565/* end confdefs.h.  */
2566$4
2567#include <$2>
2568_ACEOF
2569if ac_fn_cxx_try_compile "$LINENO"; then :
2570  eval "$3=yes"
2571else
2572  eval "$3=no"
2573fi
2574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2575fi
2576eval ac_res=\$$3
2577	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2578$as_echo "$ac_res" >&6; }
2579  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2580
2581} # ac_fn_cxx_check_header_compile
2582
2583# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2584# ----------------------------------------------
2585# Tries to find the compile-time value of EXPR in a program that includes
2586# INCLUDES, setting VAR accordingly. Returns whether the value could be
2587# computed
2588ac_fn_cxx_compute_int ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if test "$cross_compiling" = yes; then
2592    # Depending upon the size, compute the lo and hi bounds.
2593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594/* end confdefs.h.  */
2595$4
2596int
2597main ()
2598{
2599static int test_array [1 - 2 * !(($2) >= 0)];
2600test_array [0] = 0;
2601return test_array [0];
2602
2603  ;
2604  return 0;
2605}
2606_ACEOF
2607if ac_fn_cxx_try_compile "$LINENO"; then :
2608  ac_lo=0 ac_mid=0
2609  while :; do
2610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613int
2614main ()
2615{
2616static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2617test_array [0] = 0;
2618return test_array [0];
2619
2620  ;
2621  return 0;
2622}
2623_ACEOF
2624if ac_fn_cxx_try_compile "$LINENO"; then :
2625  ac_hi=$ac_mid; break
2626else
2627  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2628			if test $ac_lo -le $ac_mid; then
2629			  ac_lo= ac_hi=
2630			  break
2631			fi
2632			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2633fi
2634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2635  done
2636else
2637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h.  */
2639$4
2640int
2641main ()
2642{
2643static int test_array [1 - 2 * !(($2) < 0)];
2644test_array [0] = 0;
2645return test_array [0];
2646
2647  ;
2648  return 0;
2649}
2650_ACEOF
2651if ac_fn_cxx_try_compile "$LINENO"; then :
2652  ac_hi=-1 ac_mid=-1
2653  while :; do
2654    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2655/* end confdefs.h.  */
2656$4
2657int
2658main ()
2659{
2660static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2661test_array [0] = 0;
2662return test_array [0];
2663
2664  ;
2665  return 0;
2666}
2667_ACEOF
2668if ac_fn_cxx_try_compile "$LINENO"; then :
2669  ac_lo=$ac_mid; break
2670else
2671  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2672			if test $ac_mid -le $ac_hi; then
2673			  ac_lo= ac_hi=
2674			  break
2675			fi
2676			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679  done
2680else
2681  ac_lo= ac_hi=
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686# Binary search between lo and hi bounds.
2687while test "x$ac_lo" != "x$ac_hi"; do
2688  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2690/* end confdefs.h.  */
2691$4
2692int
2693main ()
2694{
2695static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2696test_array [0] = 0;
2697return test_array [0];
2698
2699  ;
2700  return 0;
2701}
2702_ACEOF
2703if ac_fn_cxx_try_compile "$LINENO"; then :
2704  ac_hi=$ac_mid
2705else
2706  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2707fi
2708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709done
2710case $ac_lo in #((
2711?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2712'') ac_retval=1 ;;
2713esac
2714  else
2715    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2716/* end confdefs.h.  */
2717$4
2718static long int longval () { return $2; }
2719static unsigned long int ulongval () { return $2; }
2720#include <stdio.h>
2721#include <stdlib.h>
2722int
2723main ()
2724{
2725
2726  FILE *f = fopen ("conftest.val", "w");
2727  if (! f)
2728    return 1;
2729  if (($2) < 0)
2730    {
2731      long int i = longval ();
2732      if (i != ($2))
2733	return 1;
2734      fprintf (f, "%ld", i);
2735    }
2736  else
2737    {
2738      unsigned long int i = ulongval ();
2739      if (i != ($2))
2740	return 1;
2741      fprintf (f, "%lu", i);
2742    }
2743  /* Do not output a trailing newline, as this causes \r\n confusion
2744     on some platforms.  */
2745  return ferror (f) || fclose (f) != 0;
2746
2747  ;
2748  return 0;
2749}
2750_ACEOF
2751if ac_fn_cxx_try_run "$LINENO"; then :
2752  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2753else
2754  ac_retval=1
2755fi
2756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2757  conftest.$ac_objext conftest.beam conftest.$ac_ext
2758rm -f conftest.val
2759
2760  fi
2761  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2762  as_fn_set_status $ac_retval
2763
2764} # ac_fn_cxx_compute_int
2765
2766# ac_fn_cxx_try_link LINENO
2767# -------------------------
2768# Try to link conftest.$ac_ext, and return whether this succeeded.
2769ac_fn_cxx_try_link ()
2770{
2771  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2772  rm -f conftest.$ac_objext conftest$ac_exeext
2773  if { { ac_try="$ac_link"
2774case "(($ac_try" in
2775  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2776  *) ac_try_echo=$ac_try;;
2777esac
2778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2779$as_echo "$ac_try_echo"; } >&5
2780  (eval "$ac_link") 2>conftest.err
2781  ac_status=$?
2782  if test -s conftest.err; then
2783    grep -v '^ *+' conftest.err >conftest.er1
2784    cat conftest.er1 >&5
2785    mv -f conftest.er1 conftest.err
2786  fi
2787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2788  test $ac_status = 0; } && {
2789	 test -z "$ac_cxx_werror_flag" ||
2790	 test ! -s conftest.err
2791       } && test -s conftest$ac_exeext && {
2792	 test "$cross_compiling" = yes ||
2793	 test -x conftest$ac_exeext
2794       }; then :
2795  ac_retval=0
2796else
2797  $as_echo "$as_me: failed program was:" >&5
2798sed 's/^/| /' conftest.$ac_ext >&5
2799
2800	ac_retval=1
2801fi
2802  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2803  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2804  # interfere with the next link command; also delete a directory that is
2805  # left behind by Apple's compiler.  We do this before executing the actions.
2806  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2807  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2808  as_fn_set_status $ac_retval
2809
2810} # ac_fn_cxx_try_link
2811
2812# ac_fn_cxx_check_func LINENO FUNC VAR
2813# ------------------------------------
2814# Tests whether FUNC exists, setting the cache variable VAR accordingly
2815ac_fn_cxx_check_func ()
2816{
2817  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2819$as_echo_n "checking for $2... " >&6; }
2820if eval \${$3+:} false; then :
2821  $as_echo_n "(cached) " >&6
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2826   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2827#define $2 innocuous_$2
2828
2829/* System header to define __stub macros and hopefully few prototypes,
2830    which can conflict with char $2 (); below.
2831    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2832    <limits.h> exists even on freestanding compilers.  */
2833
2834#ifdef __STDC__
2835# include <limits.h>
2836#else
2837# include <assert.h>
2838#endif
2839
2840#undef $2
2841
2842/* Override any GCC internal prototype to avoid an error.
2843   Use char because int might match the return type of a GCC
2844   builtin and then its argument prototype would still apply.  */
2845#ifdef __cplusplus
2846extern "C"
2847#endif
2848char $2 ();
2849/* The GNU C library defines this for functions which it implements
2850    to always fail with ENOSYS.  Some functions are actually named
2851    something starting with __ and the normal name is an alias.  */
2852#if defined __stub_$2 || defined __stub___$2
2853choke me
2854#endif
2855
2856int
2857main ()
2858{
2859return $2 ();
2860  ;
2861  return 0;
2862}
2863_ACEOF
2864if ac_fn_cxx_try_link "$LINENO"; then :
2865  eval "$3=yes"
2866else
2867  eval "$3=no"
2868fi
2869rm -f core conftest.err conftest.$ac_objext \
2870    conftest$ac_exeext conftest.$ac_ext
2871fi
2872eval ac_res=\$$3
2873	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2874$as_echo "$ac_res" >&6; }
2875  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2876
2877} # ac_fn_cxx_check_func
2878
2879# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2880# -------------------------------------------------------
2881# Tests whether HEADER exists and can be compiled using the include files in
2882# INCLUDES, setting the cache variable VAR accordingly.
2883ac_fn_c_check_header_compile ()
2884{
2885  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2887$as_echo_n "checking for $2... " >&6; }
2888if eval \${$3+:} false; then :
2889  $as_echo_n "(cached) " >&6
2890else
2891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892/* end confdefs.h.  */
2893$4
2894#include <$2>
2895_ACEOF
2896if ac_fn_c_try_compile "$LINENO"; then :
2897  eval "$3=yes"
2898else
2899  eval "$3=no"
2900fi
2901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2902fi
2903eval ac_res=\$$3
2904	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2905$as_echo "$ac_res" >&6; }
2906  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2907
2908} # ac_fn_c_check_header_compile
2909cat >config.log <<_ACEOF
2910This file contains any messages produced by compilers while
2911running configure, to aid debugging if configure makes a mistake.
2912
2913It was created by OpenJDK $as_me jdk9, which was
2914generated by GNU Autoconf 2.69.  Invocation command line was
2915
2916  $ $0 $@
2917
2918_ACEOF
2919exec 5>>config.log
2920{
2921cat <<_ASUNAME
2922## --------- ##
2923## Platform. ##
2924## --------- ##
2925
2926hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2927uname -m = `(uname -m) 2>/dev/null || echo unknown`
2928uname -r = `(uname -r) 2>/dev/null || echo unknown`
2929uname -s = `(uname -s) 2>/dev/null || echo unknown`
2930uname -v = `(uname -v) 2>/dev/null || echo unknown`
2931
2932/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2933/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2934
2935/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2936/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2937/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2938/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2939/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2940/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2941/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2942
2943_ASUNAME
2944
2945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2946for as_dir in $PATH
2947do
2948  IFS=$as_save_IFS
2949  test -z "$as_dir" && as_dir=.
2950    $as_echo "PATH: $as_dir"
2951  done
2952IFS=$as_save_IFS
2953
2954} >&5
2955
2956cat >&5 <<_ACEOF
2957
2958
2959## ----------- ##
2960## Core tests. ##
2961## ----------- ##
2962
2963_ACEOF
2964
2965
2966# Keep a trace of the command line.
2967# Strip out --no-create and --no-recursion so they do not pile up.
2968# Strip out --silent because we don't want to record it for future runs.
2969# Also quote any args containing shell meta-characters.
2970# Make two passes to allow for proper duplicate-argument suppression.
2971ac_configure_args=
2972ac_configure_args0=
2973ac_configure_args1=
2974ac_must_keep_next=false
2975for ac_pass in 1 2
2976do
2977  for ac_arg
2978  do
2979    case $ac_arg in
2980    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2981    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2982    | -silent | --silent | --silen | --sile | --sil)
2983      continue ;;
2984    *\'*)
2985      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2986    esac
2987    case $ac_pass in
2988    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2989    2)
2990      as_fn_append ac_configure_args1 " '$ac_arg'"
2991      if test $ac_must_keep_next = true; then
2992	ac_must_keep_next=false # Got value, back to normal.
2993      else
2994	case $ac_arg in
2995	  *=* | --config-cache | -C | -disable-* | --disable-* \
2996	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2997	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2998	  | -with-* | --with-* | -without-* | --without-* | --x)
2999	    case "$ac_configure_args0 " in
3000	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3001	    esac
3002	    ;;
3003	  -* ) ac_must_keep_next=true ;;
3004	esac
3005      fi
3006      as_fn_append ac_configure_args " '$ac_arg'"
3007      ;;
3008    esac
3009  done
3010done
3011{ ac_configure_args0=; unset ac_configure_args0;}
3012{ ac_configure_args1=; unset ac_configure_args1;}
3013
3014# When interrupted or exit'd, cleanup temporary files, and complete
3015# config.log.  We remove comments because anyway the quotes in there
3016# would cause problems or look ugly.
3017# WARNING: Use '\'' to represent an apostrophe within the trap.
3018# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3019trap 'exit_status=$?
3020  # Save into config.log some information that might help in debugging.
3021  {
3022    echo
3023
3024    $as_echo "## ---------------- ##
3025## Cache variables. ##
3026## ---------------- ##"
3027    echo
3028    # The following way of writing the cache mishandles newlines in values,
3029(
3030  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3031    eval ac_val=\$$ac_var
3032    case $ac_val in #(
3033    *${as_nl}*)
3034      case $ac_var in #(
3035      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3036$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3037      esac
3038      case $ac_var in #(
3039      _ | IFS | as_nl) ;; #(
3040      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3041      *) { eval $ac_var=; unset $ac_var;} ;;
3042      esac ;;
3043    esac
3044  done
3045  (set) 2>&1 |
3046    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3047    *${as_nl}ac_space=\ *)
3048      sed -n \
3049	"s/'\''/'\''\\\\'\'''\''/g;
3050	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3051      ;; #(
3052    *)
3053      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3054      ;;
3055    esac |
3056    sort
3057)
3058    echo
3059
3060    $as_echo "## ----------------- ##
3061## Output variables. ##
3062## ----------------- ##"
3063    echo
3064    for ac_var in $ac_subst_vars
3065    do
3066      eval ac_val=\$$ac_var
3067      case $ac_val in
3068      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3069      esac
3070      $as_echo "$ac_var='\''$ac_val'\''"
3071    done | sort
3072    echo
3073
3074    if test -n "$ac_subst_files"; then
3075      $as_echo "## ------------------- ##
3076## File substitutions. ##
3077## ------------------- ##"
3078      echo
3079      for ac_var in $ac_subst_files
3080      do
3081	eval ac_val=\$$ac_var
3082	case $ac_val in
3083	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3084	esac
3085	$as_echo "$ac_var='\''$ac_val'\''"
3086      done | sort
3087      echo
3088    fi
3089
3090    if test -s confdefs.h; then
3091      $as_echo "## ----------- ##
3092## confdefs.h. ##
3093## ----------- ##"
3094      echo
3095      cat confdefs.h
3096      echo
3097    fi
3098    test "$ac_signal" != 0 &&
3099      $as_echo "$as_me: caught signal $ac_signal"
3100    $as_echo "$as_me: exit $exit_status"
3101  } >&5
3102  rm -f core *.core core.conftest.* &&
3103    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3104    exit $exit_status
3105' 0
3106for ac_signal in 1 2 13 15; do
3107  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3108done
3109ac_signal=0
3110
3111# confdefs.h avoids OS command line length limits that DEFS can exceed.
3112rm -f -r conftest* confdefs.h
3113
3114$as_echo "/* confdefs.h */" > confdefs.h
3115
3116# Predefined preprocessor variables.
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_NAME "$PACKAGE_NAME"
3120_ACEOF
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_VERSION "$PACKAGE_VERSION"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_STRING "$PACKAGE_STRING"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3136_ACEOF
3137
3138cat >>confdefs.h <<_ACEOF
3139#define PACKAGE_URL "$PACKAGE_URL"
3140_ACEOF
3141
3142
3143# Let the site file select an alternate cache file if it wants to.
3144# Prefer an explicitly selected file to automatically selected ones.
3145ac_site_file1=NONE
3146ac_site_file2=NONE
3147if test -n "$CONFIG_SITE"; then
3148  # We do not want a PATH search for config.site.
3149  case $CONFIG_SITE in #((
3150    -*)  ac_site_file1=./$CONFIG_SITE;;
3151    */*) ac_site_file1=$CONFIG_SITE;;
3152    *)   ac_site_file1=./$CONFIG_SITE;;
3153  esac
3154elif test "x$prefix" != xNONE; then
3155  ac_site_file1=$prefix/share/config.site
3156  ac_site_file2=$prefix/etc/config.site
3157else
3158  ac_site_file1=$ac_default_prefix/share/config.site
3159  ac_site_file2=$ac_default_prefix/etc/config.site
3160fi
3161for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3162do
3163  test "x$ac_site_file" = xNONE && continue
3164  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3165    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3166$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3167    sed 's/^/| /' "$ac_site_file" >&5
3168    . "$ac_site_file" \
3169      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3171as_fn_error $? "failed to load site script $ac_site_file
3172See \`config.log' for more details" "$LINENO" 5; }
3173  fi
3174done
3175
3176if test -r "$cache_file"; then
3177  # Some versions of bash will fail to source /dev/null (special files
3178  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3179  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3180    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3181$as_echo "$as_me: loading cache $cache_file" >&6;}
3182    case $cache_file in
3183      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3184      *)                      . "./$cache_file";;
3185    esac
3186  fi
3187else
3188  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3189$as_echo "$as_me: creating cache $cache_file" >&6;}
3190  >$cache_file
3191fi
3192
3193# Check that the precious variables saved in the cache have kept the same
3194# value.
3195ac_cache_corrupted=false
3196for ac_var in $ac_precious_vars; do
3197  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3198  eval ac_new_set=\$ac_env_${ac_var}_set
3199  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3200  eval ac_new_val=\$ac_env_${ac_var}_value
3201  case $ac_old_set,$ac_new_set in
3202    set,)
3203      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3204$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3205      ac_cache_corrupted=: ;;
3206    ,set)
3207      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3208$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3209      ac_cache_corrupted=: ;;
3210    ,);;
3211    *)
3212      if test "x$ac_old_val" != "x$ac_new_val"; then
3213	# differences in whitespace do not lead to failure.
3214	ac_old_val_w=`echo x $ac_old_val`
3215	ac_new_val_w=`echo x $ac_new_val`
3216	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3217	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3218$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3219	  ac_cache_corrupted=:
3220	else
3221	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3222$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3223	  eval $ac_var=\$ac_old_val
3224	fi
3225	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3226$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3227	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3228$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3229      fi;;
3230  esac
3231  # Pass precious variables to config.status.
3232  if test "$ac_new_set" = set; then
3233    case $ac_new_val in
3234    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3235    *) ac_arg=$ac_var=$ac_new_val ;;
3236    esac
3237    case " $ac_configure_args " in
3238      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3239      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3240    esac
3241  fi
3242done
3243if $ac_cache_corrupted; then
3244  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3246  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3247$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3248  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3249fi
3250## -------------------- ##
3251## Main body of script. ##
3252## -------------------- ##
3253
3254ac_ext=c
3255ac_cpp='$CPP $CPPFLAGS'
3256ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3257ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3258ac_compiler_gnu=$ac_cv_c_compiler_gnu
3259
3260
3261
3262ac_aux_dir=
3263for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3264  if test -f "$ac_dir/install-sh"; then
3265    ac_aux_dir=$ac_dir
3266    ac_install_sh="$ac_aux_dir/install-sh -c"
3267    break
3268  elif test -f "$ac_dir/install.sh"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/install.sh -c"
3271    break
3272  elif test -f "$ac_dir/shtool"; then
3273    ac_aux_dir=$ac_dir
3274    ac_install_sh="$ac_aux_dir/shtool install -c"
3275    break
3276  fi
3277done
3278if test -z "$ac_aux_dir"; then
3279  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
3280fi
3281
3282# These three variables are undocumented and unsupported,
3283# and are intended to be withdrawn in a future Autoconf release.
3284# They can cause serious problems if a builder's source tree is in a directory
3285# whose full name contains unusual characters.
3286ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3287ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3288ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3289
3290
3291# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3292
3293#
3294# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318#
3319# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3320#
3321# This program is free software; you can redistribute it and/or modify
3322# it under the terms of the GNU General Public License as published by
3323# the Free Software Foundation; either version 2 of the License, or
3324# (at your option) any later version.
3325#
3326# This program is distributed in the hope that it will be useful, but
3327# WITHOUT ANY WARRANTY; without even the implied warranty of
3328# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3329# General Public License for more details.
3330#
3331# You should have received a copy of the GNU General Public License
3332# along with this program; if not, write to the Free Software
3333# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3334#
3335# As a special exception to the GNU General Public License, if you
3336# distribute this file as part of a program that contains a
3337# configuration script generated by Autoconf, you may include it under
3338# the same distribution terms that you use for the rest of that program.
3339
3340# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3341# ----------------------------------
3342# PKG_PROG_PKG_CONFIG
3343
3344# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3345#
3346# Check to see whether a particular set of modules exists.  Similar
3347# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3348#
3349#
3350# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3351# this or PKG_CHECK_MODULES is called, or make sure to call
3352# PKG_CHECK_EXISTS manually
3353# --------------------------------------------------------------
3354
3355
3356
3357# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3358# ---------------------------------------------
3359# _PKG_CONFIG
3360
3361# _PKG_SHORT_ERRORS_SUPPORTED
3362# -----------------------------
3363# _PKG_SHORT_ERRORS_SUPPORTED
3364
3365
3366# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3367# [ACTION-IF-NOT-FOUND])
3368#
3369#
3370# Note that if there is a possibility the first call to
3371# PKG_CHECK_MODULES might not happen, you should be sure to include an
3372# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3373#
3374#
3375# --------------------------------------------------------------
3376# PKG_CHECK_MODULES
3377
3378
3379# Include these first...
3380#
3381# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3383#
3384# This code is free software; you can redistribute it and/or modify it
3385# under the terms of the GNU General Public License version 2 only, as
3386# published by the Free Software Foundation.  Oracle designates this
3387# particular file as subject to the "Classpath" exception as provided
3388# by Oracle in the LICENSE file that accompanied this code.
3389#
3390# This code is distributed in the hope that it will be useful, but WITHOUT
3391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3393# version 2 for more details (a copy is included in the LICENSE file that
3394# accompanied this code).
3395#
3396# You should have received a copy of the GNU General Public License version
3397# 2 along with this work; if not, write to the Free Software Foundation,
3398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3399#
3400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3401# or visit www.oracle.com if you need additional information or have any
3402# questions.
3403#
3404
3405# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3406# If so, then append $1 to $2 \
3407# Also set JVM_ARG_OK to true/false depending on outcome.
3408
3409
3410# Appends a string to a path variable, only adding the : when needed.
3411
3412
3413# Prepends a string to a path variable, only adding the : when needed.
3414
3415
3416# This will make sure the given variable points to a full and proper
3417# path. This means:
3418# 1) There will be no spaces in the path. On unix platforms,
3419#    spaces in the path will result in an error. On Windows,
3420#    the path will be rewritten using short-style to be space-free.
3421# 2) The path will be absolute, and it will be in unix-style (on
3422#     cygwin).
3423# $1: The name of the variable to fix
3424
3425
3426# This will make sure the given variable points to a executable
3427# with a full and proper path. This means:
3428# 1) There will be no spaces in the path. On unix platforms,
3429#    spaces in the path will result in an error. On Windows,
3430#    the path will be rewritten using short-style to be space-free.
3431# 2) The path will be absolute, and it will be in unix-style (on
3432#     cygwin).
3433# Any arguments given to the executable is preserved.
3434# If the input variable does not have a directory specification, then
3435# it need to be in the PATH.
3436# $1: The name of the variable to fix
3437
3438
3439
3440
3441# Register a --with argument but mark it as deprecated
3442# $1: The name of the with argument to deprecate, not including --with-
3443
3444
3445# Register a --enable argument but mark it as deprecated
3446# $1: The name of the with argument to deprecate, not including --enable-
3447# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3448
3449
3450
3451
3452# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3453# $1: variable to check
3454
3455
3456# Check that there are no unprocessed overridden variables left.
3457# If so, they are an incorrect argument and we will exit with an error.
3458
3459
3460# Setup a tool for the given variable. If correctly specified by the user,
3461# use that value, otherwise search for the tool using the supplied code snippet.
3462# $1: variable to set
3463# $2: code snippet to call to look for the tool
3464
3465
3466# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3467# $1: variable to set
3468# $2: executable name (or list of names) to look for
3469
3470
3471# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3472# $1: variable to set
3473# $2: executable name (or list of names) to look for
3474
3475
3476# Like BASIC_PATH_PROGS but fails if no tool was found.
3477# $1: variable to set
3478# $2: executable name (or list of names) to look for
3479
3480
3481# Like BASIC_SETUP_TOOL but fails if no tool was found.
3482# $1: variable to set
3483# $2: autoconf macro to call to look for the special tool
3484
3485
3486# Setup the most fundamental tools that relies on not much else to set up,
3487# but is used by much of the early bootstrap code.
3488
3489
3490# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3491
3492
3493# Evaluates platform specific overrides for devkit variables.
3494# $1: Name of variable
3495
3496
3497
3498
3499
3500
3501#%%% Simple tools %%%
3502
3503# Check if we have found a usable version of make
3504# $1: the path to a potential make binary (or empty)
3505# $2: the description on how we found this
3506
3507
3508
3509
3510# Goes looking for a usable version of GNU make.
3511
3512
3513
3514
3515
3516
3517# Check if build directory is on local disk. If not possible to determine,
3518# we prefer to claim it's local.
3519# Argument 1: directory to test
3520# Argument 2: what to do if it is on local disk
3521# Argument 3: what to do otherwise (remote disk or failure)
3522
3523
3524# Check that source files have basic read permissions set. This might
3525# not be the case in cygwin in certain conditions.
3526
3527
3528
3529
3530# Check for support for specific options in bash
3531
3532
3533# Code to run after AC_OUTPUT
3534
3535
3536#
3537# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3539#
3540# This code is free software; you can redistribute it and/or modify it
3541# under the terms of the GNU General Public License version 2 only, as
3542# published by the Free Software Foundation.  Oracle designates this
3543# particular file as subject to the "Classpath" exception as provided
3544# by Oracle in the LICENSE file that accompanied this code.
3545#
3546# This code is distributed in the hope that it will be useful, but WITHOUT
3547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3549# version 2 for more details (a copy is included in the LICENSE file that
3550# accompanied this code).
3551#
3552# You should have received a copy of the GNU General Public License version
3553# 2 along with this work; if not, write to the Free Software Foundation,
3554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3555#
3556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3557# or visit www.oracle.com if you need additional information or have any
3558# questions.
3559#
3560
3561
3562
3563
3564
3565# Helper function which possibly converts a path using DOS-style short mode.
3566# If so, the updated path is stored in $new_path.
3567# $1: The path to check
3568
3569
3570# Helper function which possibly converts a path using DOS-style short mode.
3571# If so, the updated path is stored in $new_path.
3572# $1: The path to check
3573
3574
3575# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3576# and could probably be heavily simplified. However, all changes in this
3577# area tend to need lot of testing in different scenarios, and in lack of
3578# proper unit testing, cleaning this up has not been deemed worth the effort
3579# at the moment.
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3590
3591
3592
3593
3594#
3595# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3596# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3597#
3598# This code is free software; you can redistribute it and/or modify it
3599# under the terms of the GNU General Public License version 2 only, as
3600# published by the Free Software Foundation.  Oracle designates this
3601# particular file as subject to the "Classpath" exception as provided
3602# by Oracle in the LICENSE file that accompanied this code.
3603#
3604# This code is distributed in the hope that it will be useful, but WITHOUT
3605# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3606# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3607# version 2 for more details (a copy is included in the LICENSE file that
3608# accompanied this code).
3609#
3610# You should have received a copy of the GNU General Public License version
3611# 2 along with this work; if not, write to the Free Software Foundation,
3612# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3613#
3614# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3615# or visit www.oracle.com if you need additional information or have any
3616# questions.
3617#
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629# ... then the rest
3630#
3631# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3632# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3633#
3634# This code is free software; you can redistribute it and/or modify it
3635# under the terms of the GNU General Public License version 2 only, as
3636# published by the Free Software Foundation.  Oracle designates this
3637# particular file as subject to the "Classpath" exception as provided
3638# by Oracle in the LICENSE file that accompanied this code.
3639#
3640# This code is distributed in the hope that it will be useful, but WITHOUT
3641# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3642# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3643# version 2 for more details (a copy is included in the LICENSE file that
3644# accompanied this code).
3645#
3646# You should have received a copy of the GNU General Public License version
3647# 2 along with this work; if not, write to the Free Software Foundation,
3648# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3649#
3650# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3651# or visit www.oracle.com if you need additional information or have any
3652# questions.
3653#
3654
3655########################################################################
3656# This file handles detection of the Boot JDK. The Boot JDK detection
3657# process has been developed as a response to solve a complex real-world
3658# problem. Initially, it was simple, but it has grown as platform after
3659# platform, idiosyncracy after idiosyncracy has been supported.
3660#
3661# The basic idea is this:
3662# 1) You need an acceptable *) JDK to use as a Boot JDK
3663# 2) There are several ways to locate a JDK, that are mostly platform
3664#    dependent **)
3665# 3) You can have multiple JDKs installed
3666# 4) If possible, configure should try to dig out an acceptable JDK
3667#    automatically, without having to resort to command-line options
3668#
3669# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3670#     javac) and not a JRE, etc.
3671#
3672# **) On Windows we typically use a well-known path.
3673#     On MacOSX we typically use the tool java_home.
3674#     On Linux we typically find javac in the $PATH, and then follow a
3675#     chain of symlinks that often ends up in a real JDK.
3676#
3677# This leads to the code where we check in different ways to locate a
3678# JDK, and if one is found, check if it is acceptable. If not, we print
3679# our reasons for rejecting it (useful when debugging non-working
3680# configure situations) and continue checking the next one.
3681########################################################################
3682
3683# Execute the check given as argument, and verify the result
3684# If the Boot JDK was previously found, do nothing
3685# $1 A command line (typically autoconf macro) to execute
3686
3687
3688# Test: Is bootjdk explicitely set by command line arguments?
3689
3690
3691# Test: Is bootjdk available from builddeps?
3692
3693
3694# Test: Is $JAVA_HOME set?
3695
3696
3697# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3698
3699
3700# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3701# $1: Argument to the java_home binary (optional)
3702
3703
3704# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3705
3706
3707# Look for a jdk in the given path. If there are multiple, try to select the newest.
3708# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3709# $1 = Path to directory containing jdk installations.
3710# $2 = String to append to the found JDK directory to get the proper JDK home
3711
3712
3713# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3714# environmental variable as base for where to look.
3715# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3716
3717
3718# Test: Is there a JDK installed in default, well-known locations?
3719
3720
3721# Check that a command-line tool in the Boot JDK is correct
3722# $1 = name of variable to assign
3723# $2 = name of binary
3724
3725
3726###############################################################################
3727#
3728# We need a Boot JDK to bootstrap the build.
3729#
3730
3731
3732
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779#
3780# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3781# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3782#
3783# This code is free software; you can redistribute it and/or modify it
3784# under the terms of the GNU General Public License version 2 only, as
3785# published by the Free Software Foundation.  Oracle designates this
3786# particular file as subject to the "Classpath" exception as provided
3787# by Oracle in the LICENSE file that accompanied this code.
3788#
3789# This code is distributed in the hope that it will be useful, but WITHOUT
3790# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3791# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3792# version 2 for more details (a copy is included in the LICENSE file that
3793# accompanied this code).
3794#
3795# You should have received a copy of the GNU General Public License version
3796# 2 along with this work; if not, write to the Free Software Foundation,
3797# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3798#
3799# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3800# or visit www.oracle.com if you need additional information or have any
3801# questions.
3802#
3803
3804
3805
3806
3807
3808# Documentation on common flags used for solstudio in HIGHEST.
3809#
3810# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3811#          done with care, there are some assumptions below that need to
3812#          be understood about the use of pointers, and IEEE behavior.
3813#
3814# -fns: Use non-standard floating point mode (not IEEE 754)
3815# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3816# -fsingle: Use single precision floating point with 'float'
3817# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3818#   (Source with excessing pointer casting and data access with mixed
3819#    pointer types are not recommended)
3820# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3821#   (If you expect perfect errno behavior, do not use this)
3822# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3823# -xrestrict: Pointer parameters to functions do not overlap
3824#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3825#    If you pass in multiple pointers to the same data, do not use this)
3826# -xlibmil: Inline some library routines
3827#   (If you expect perfect errno behavior, do not use this)
3828# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3829#   (If you expect perfect errno behavior, do not use this)
3830#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3831
3832    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3833    # Bug?
3834    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3835    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3836    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3837    #fi
3838
3839
3840
3841
3842
3843# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3844#                                   [RUN-IF-FALSE])
3845# ------------------------------------------------------------
3846# Check that the c and c++ compilers support an argument
3847
3848
3849# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3850#                                    [RUN-IF-FALSE])
3851# ------------------------------------------------------------
3852# Check that the linker support an argument
3853
3854
3855
3856
3857#
3858# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3859# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3860#
3861# This code is free software; you can redistribute it and/or modify it
3862# under the terms of the GNU General Public License version 2 only, as
3863# published by the Free Software Foundation.  Oracle designates this
3864# particular file as subject to the "Classpath" exception as provided
3865# by Oracle in the LICENSE file that accompanied this code.
3866#
3867# This code is distributed in the hope that it will be useful, but WITHOUT
3868# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3869# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3870# version 2 for more details (a copy is included in the LICENSE file that
3871# accompanied this code).
3872#
3873# You should have received a copy of the GNU General Public License version
3874# 2 along with this work; if not, write to the Free Software Foundation,
3875# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3876#
3877# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3878# or visit www.oracle.com if you need additional information or have any
3879# questions.
3880#
3881
3882
3883
3884
3885
3886cygwin_help() {
3887  case $1 in
3888    unzip)
3889      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3891      ;;
3892    zip)
3893      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3895      ;;
3896    make)
3897      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3898      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3899      ;;
3900    freetype)
3901      HELP_MSG="
3902The freetype library can now be build during the configure process.
3903Download the freetype sources and unpack them into an arbitrary directory:
3904
3905wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3906tar -xzf freetype-2.5.3.tar.gz
3907
3908Then run configure with '--with-freetype-src=<freetype_src>'. This will
3909automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3910builds or into '<freetype_src>/lib32' for 32-bit builds.
3911Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3912and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3913      ;;
3914  esac
3915}
3916
3917msys_help() {
3918  PKGHANDLER_COMMAND=""
3919}
3920
3921apt_help() {
3922  case $1 in
3923    devkit)
3924      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3925    openjdk)
3926      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3927    alsa)
3928      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3929    cups)
3930      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3931    freetype)
3932      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3933    pulse)
3934      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3935    x11)
3936      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3937    ccache)
3938      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3939  esac
3940}
3941
3942yum_help() {
3943  case $1 in
3944    devkit)
3945      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3946    openjdk)
3947      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3948    alsa)
3949      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3950    cups)
3951      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3952    freetype)
3953      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3954    pulse)
3955      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3956    x11)
3957      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3958    ccache)
3959      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3960  esac
3961}
3962
3963port_help() {
3964  PKGHANDLER_COMMAND=""
3965}
3966
3967pkgutil_help() {
3968  PKGHANDLER_COMMAND=""
3969}
3970
3971pkgadd_help() {
3972  PKGHANDLER_COMMAND=""
3973}
3974
3975# This function will check if we're called from the "configure" wrapper while
3976# printing --help. If so, we will print out additional information that can
3977# only be extracted within the autoconf script, and then exit. This must be
3978# called at the very beginning in configure.ac.
3979
3980
3981
3982
3983
3984
3985#
3986# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3987# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3988#
3989# This code is free software; you can redistribute it and/or modify it
3990# under the terms of the GNU General Public License version 2 only, as
3991# published by the Free Software Foundation.  Oracle designates this
3992# particular file as subject to the "Classpath" exception as provided
3993# by Oracle in the LICENSE file that accompanied this code.
3994#
3995# This code is distributed in the hope that it will be useful, but WITHOUT
3996# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3997# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3998# version 2 for more details (a copy is included in the LICENSE file that
3999# accompanied this code).
4000#
4001# You should have received a copy of the GNU General Public License version
4002# 2 along with this work; if not, write to the Free Software Foundation,
4003# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4004#
4005# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4006# or visit www.oracle.com if you need additional information or have any
4007# questions.
4008#
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019###############################################################################
4020#
4021# Should we build only OpenJDK even if closed sources are present?
4022#
4023
4024
4025
4026
4027
4028
4029###############################################################################
4030#
4031# Enable or disable the elliptic curve crypto implementation
4032#
4033
4034
4035
4036
4037
4038################################################################################
4039#
4040# Gcov coverage data for hotspot
4041#
4042
4043
4044#
4045# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4046# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4047#
4048# This code is free software; you can redistribute it and/or modify it
4049# under the terms of the GNU General Public License version 2 only, as
4050# published by the Free Software Foundation.  Oracle designates this
4051# particular file as subject to the "Classpath" exception as provided
4052# by Oracle in the LICENSE file that accompanied this code.
4053#
4054# This code is distributed in the hope that it will be useful, but WITHOUT
4055# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4056# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4057# version 2 for more details (a copy is included in the LICENSE file that
4058# accompanied this code).
4059#
4060# You should have received a copy of the GNU General Public License version
4061# 2 along with this work; if not, write to the Free Software Foundation,
4062# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4063#
4064# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4065# or visit www.oracle.com if you need additional information or have any
4066# questions.
4067#
4068
4069###############################################################################
4070#
4071# Setup version numbers
4072#
4073
4074# Verify that a given string represents a valid version number, and assign it
4075# to a variable.
4076
4077# Argument 1: the variable to assign to
4078# Argument 2: the value given by the user
4079
4080
4081
4082
4083#
4084# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4085# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4086#
4087# This code is free software; you can redistribute it and/or modify it
4088# under the terms of the GNU General Public License version 2 only, as
4089# published by the Free Software Foundation.  Oracle designates this
4090# particular file as subject to the "Classpath" exception as provided
4091# by Oracle in the LICENSE file that accompanied this code.
4092#
4093# This code is distributed in the hope that it will be useful, but WITHOUT
4094# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4095# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4096# version 2 for more details (a copy is included in the LICENSE file that
4097# accompanied this code).
4098#
4099# You should have received a copy of the GNU General Public License version
4100# 2 along with this work; if not, write to the Free Software Foundation,
4101# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4102#
4103# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4104# or visit www.oracle.com if you need additional information or have any
4105# questions.
4106#
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128#
4129# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4130# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4131#
4132# This code is free software; you can redistribute it and/or modify it
4133# under the terms of the GNU General Public License version 2 only, as
4134# published by the Free Software Foundation.  Oracle designates this
4135# particular file as subject to the "Classpath" exception as provided
4136# by Oracle in the LICENSE file that accompanied this code.
4137#
4138# This code is distributed in the hope that it will be useful, but WITHOUT
4139# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4140# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4141# version 2 for more details (a copy is included in the LICENSE file that
4142# accompanied this code).
4143#
4144# You should have received a copy of the GNU General Public License version
4145# 2 along with this work; if not, write to the Free Software Foundation,
4146# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4147#
4148# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4149# or visit www.oracle.com if you need additional information or have any
4150# questions.
4151#
4152
4153# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4154# Converts autoconf style CPU name to OpenJDK style, into
4155# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4156
4157
4158# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4159# Converts autoconf style OS name to OpenJDK style, into
4160# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4161
4162
4163# Expects $host_os $host_cpu $build_os and $build_cpu
4164# and $with_target_bits to have been setup!
4165#
4166# Translate the standard triplet(quadruplet) definition
4167# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4168# OPENJDK_BUILD_OS, etc.
4169
4170
4171# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4172# accordingly. Must be done after setting up build and target system, but before
4173# doing anything else with these values.
4174
4175
4176# Setup the legacy variables, for controlling the old makefiles.
4177#
4178
4179
4180
4181
4182#%%% Build and target systems %%%
4183
4184
4185
4186
4187# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4188# Add -mX to various FLAGS variables.
4189
4190
4191
4192
4193
4194
4195#
4196# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4197# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4198#
4199# This code is free software; you can redistribute it and/or modify it
4200# under the terms of the GNU General Public License version 2 only, as
4201# published by the Free Software Foundation.  Oracle designates this
4202# particular file as subject to the "Classpath" exception as provided
4203# by Oracle in the LICENSE file that accompanied this code.
4204#
4205# This code is distributed in the hope that it will be useful, but WITHOUT
4206# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4207# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4208# version 2 for more details (a copy is included in the LICENSE file that
4209# accompanied this code).
4210#
4211# You should have received a copy of the GNU General Public License version
4212# 2 along with this work; if not, write to the Free Software Foundation,
4213# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4214#
4215# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4216# or visit www.oracle.com if you need additional information or have any
4217# questions.
4218#
4219
4220
4221
4222
4223
4224
4225
4226
4227#
4228# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4229# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4230#
4231# This code is free software; you can redistribute it and/or modify it
4232# under the terms of the GNU General Public License version 2 only, as
4233# published by the Free Software Foundation.  Oracle designates this
4234# particular file as subject to the "Classpath" exception as provided
4235# by Oracle in the LICENSE file that accompanied this code.
4236#
4237# This code is distributed in the hope that it will be useful, but WITHOUT
4238# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4239# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4240# version 2 for more details (a copy is included in the LICENSE file that
4241# accompanied this code).
4242#
4243# You should have received a copy of the GNU General Public License version
4244# 2 along with this work; if not, write to the Free Software Foundation,
4245# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4246#
4247# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4248# or visit www.oracle.com if you need additional information or have any
4249# questions.
4250#
4251
4252########################################################################
4253# This file is responsible for detecting, verifying and setting up the
4254# toolchain, i.e. the compiler, linker and related utilities. It will setup
4255# proper paths to the binaries, but it will not setup any flags.
4256#
4257# The binaries used is determined by the toolchain type, which is the family of
4258# compilers and related tools that are used.
4259########################################################################
4260
4261
4262# All valid toolchains, regardless of platform (used by help.m4)
4263VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4264
4265# These toolchains are valid on different platforms
4266VALID_TOOLCHAINS_linux="gcc clang"
4267VALID_TOOLCHAINS_solaris="solstudio"
4268VALID_TOOLCHAINS_macosx="gcc clang"
4269VALID_TOOLCHAINS_aix="xlc"
4270VALID_TOOLCHAINS_windows="microsoft"
4271
4272# Toolchain descriptions
4273TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4274TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4275TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4276TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4277TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4278
4279# Setup a number of variables describing how native output files are
4280# named on this platform/toolchain.
4281
4282
4283# Determine which toolchain type to use, and make sure it is valid for this
4284# platform. Setup various information about the selected toolchain.
4285
4286
4287# Before we start detecting the toolchain executables, we might need some
4288# special setup, e.g. additional paths etc.
4289
4290
4291# Restore path, etc
4292
4293
4294# Check if a compiler is of the toolchain type we expect, and save the version
4295# information from it. If the compiler does not match the expected type,
4296# this function will abort using AC_MSG_ERROR. If it matches, the version will
4297# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4298# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4299#
4300# $1 = compiler to test (CC or CXX)
4301# $2 = human readable name of compiler (C or C++)
4302
4303
4304# Try to locate the given C or C++ compiler in the path, or otherwise.
4305#
4306# $1 = compiler to test (CC or CXX)
4307# $2 = human readable name of compiler (C or C++)
4308# $3 = list of compiler names to search for
4309
4310
4311# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4312# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4313# archiver (AR). Verify that the compilers are correct according to the
4314# toolchain type.
4315
4316
4317# Setup additional tools that is considered a part of the toolchain, but not the
4318# core part. Many of these are highly platform-specific and do not exist,
4319# and/or are not needed on all platforms.
4320
4321
4322# Setup the build tools (i.e, the compiler and linker used to build programs
4323# that should be run on the build platform, not the target platform, as a build
4324# helper). Since the non-cross-compile case uses the normal, target compilers
4325# for this, we can only do this after these have been setup.
4326
4327
4328# Setup legacy variables that are still needed as alternative ways to refer to
4329# parts of the toolchain.
4330
4331
4332# Do some additional checks on the detected tools.
4333
4334
4335# Setup the JTReg Regression Test Harness.
4336
4337
4338#
4339# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4340# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4341#
4342# This code is free software; you can redistribute it and/or modify it
4343# under the terms of the GNU General Public License version 2 only, as
4344# published by the Free Software Foundation.  Oracle designates this
4345# particular file as subject to the "Classpath" exception as provided
4346# by Oracle in the LICENSE file that accompanied this code.
4347#
4348# This code is distributed in the hope that it will be useful, but WITHOUT
4349# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4350# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4351# version 2 for more details (a copy is included in the LICENSE file that
4352# accompanied this code).
4353#
4354# You should have received a copy of the GNU General Public License version
4355# 2 along with this work; if not, write to the Free Software Foundation,
4356# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4357#
4358# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4359# or visit www.oracle.com if you need additional information or have any
4360# questions.
4361#
4362
4363################################################################################
4364# The order of these defines the priority by which we try to find them.
4365VALID_VS_VERSIONS="2013 2012 2010"
4366
4367VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4368VS_VERSION_INTERNAL_2010=100
4369VS_MSVCR_2010=msvcr100.dll
4370# We don't use msvcp on Visual Studio 2010
4371#VS_MSVCP_2010=msvcp100.dll
4372VS_ENVVAR_2010="VS100COMNTOOLS"
4373VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4374VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4375VS_VS_PLATFORM_NAME_2010="v100"
4376VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4377
4378VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4379VS_VERSION_INTERNAL_2012=110
4380VS_MSVCR_2012=msvcr110.dll
4381VS_MSVCP_2012=msvcp110.dll
4382VS_ENVVAR_2012="VS110COMNTOOLS"
4383VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4384VS_SDK_INSTALLDIR_2012=
4385VS_VS_PLATFORM_NAME_2012="v110"
4386VS_SDK_PLATFORM_NAME_2012=
4387
4388VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4389VS_VERSION_INTERNAL_2013=120
4390VS_MSVCR_2013=msvcr120.dll
4391VS_MSVCP_2013=msvcp120.dll
4392VS_ENVVAR_2013="VS120COMNTOOLS"
4393VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4394VS_SDK_INSTALLDIR_2013=
4395VS_VS_PLATFORM_NAME_2013="v120"
4396VS_SDK_PLATFORM_NAME_2013=
4397
4398################################################################################
4399
4400
4401
4402################################################################################
4403
4404
4405
4406################################################################################
4407# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4408# build environment and assigns it to VS_ENV_CMD
4409
4410
4411################################################################################
4412
4413
4414
4415################################################################################
4416# Check if the VS env variables were setup prior to running configure.
4417# If not, then find vcvarsall.bat and run it automatically, and integrate
4418# the set env variables into the spec file.
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433# This line needs to be here, verbatim, after all includes and the dummy hook
4434# definitions. It is replaced with custom functionality when building
4435# custom sources.
4436#CUSTOM_AUTOCONF_INCLUDE
4437
4438# Do not change or remove the following line, it is needed for consistency checks:
4439DATE_WHEN_GENERATED=1444104121
4440
4441###############################################################################
4442#
4443# Initialization / Boot-strapping
4444#
4445# The bootstrapping process needs to solve the "chicken or the egg" problem,
4446# thus it jumps back and forth, each time gaining something needed later on.
4447#
4448###############################################################################
4449
4450# If we are requested to print additional help, do that and then exit.
4451# This must be the very first call.
4452
4453  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4454    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4455    $PRINTF "Which are valid to use depends on the build platform.\n"
4456    for toolchain in $VALID_TOOLCHAINS_all; do
4457      # Use indirect variable referencing
4458      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4459      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4460      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4461    done
4462
4463    # And now exit directly
4464    exit 0
4465  fi
4466
4467
4468# Basic initialization that must happen first of all in the normal process.
4469
4470  # Save the original command line. This is passed to us by the wrapper configure script.
4471
4472  # Save the path variable before it gets changed
4473  ORIGINAL_PATH="$PATH"
4474
4475  DATE_WHEN_CONFIGURED=`LANG=C date`
4476
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4478$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4480$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4481
4482
4483  # Start with tools that do not need have cross compilation support
4484  # and can be expected to be found in the default PATH. These tools are
4485  # used by configure. Nor are these tools expected to be found in the
4486  # devkit from the builddeps server either, since they are
4487  # needed to download the devkit.
4488
4489  # First are all the simple required tools.
4490
4491
4492
4493  # Publish this variable in the help.
4494
4495
4496  if test "x$BASENAME" = x; then
4497    # The variable is not set by user, try to locate tool using the code snippet
4498    for ac_prog in basename
4499do
4500  # Extract the first word of "$ac_prog", so it can be a program name with args.
4501set dummy $ac_prog; ac_word=$2
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4503$as_echo_n "checking for $ac_word... " >&6; }
4504if ${ac_cv_path_BASENAME+:} false; then :
4505  $as_echo_n "(cached) " >&6
4506else
4507  case $BASENAME in
4508  [\\/]* | ?:[\\/]*)
4509  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4510  ;;
4511  *)
4512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513for as_dir in $PATH
4514do
4515  IFS=$as_save_IFS
4516  test -z "$as_dir" && as_dir=.
4517    for ac_exec_ext in '' $ac_executable_extensions; do
4518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4519    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4521    break 2
4522  fi
4523done
4524  done
4525IFS=$as_save_IFS
4526
4527  ;;
4528esac
4529fi
4530BASENAME=$ac_cv_path_BASENAME
4531if test -n "$BASENAME"; then
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4533$as_echo "$BASENAME" >&6; }
4534else
4535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536$as_echo "no" >&6; }
4537fi
4538
4539
4540  test -n "$BASENAME" && break
4541done
4542
4543  else
4544    # The variable is set, but is it from the command line or the environment?
4545
4546    # Try to remove the string !BASENAME! from our list.
4547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4549      # If it failed, the variable was not from the command line. Ignore it,
4550      # but warn the user (except for BASH, which is always set by the calling BASH).
4551      if test "xBASENAME" != xBASH; then
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4553$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4554      fi
4555      # Try to locate tool using the code snippet
4556      for ac_prog in basename
4557do
4558  # Extract the first word of "$ac_prog", so it can be a program name with args.
4559set dummy $ac_prog; ac_word=$2
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4561$as_echo_n "checking for $ac_word... " >&6; }
4562if ${ac_cv_path_BASENAME+:} false; then :
4563  $as_echo_n "(cached) " >&6
4564else
4565  case $BASENAME in
4566  [\\/]* | ?:[\\/]*)
4567  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4568  ;;
4569  *)
4570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4571for as_dir in $PATH
4572do
4573  IFS=$as_save_IFS
4574  test -z "$as_dir" && as_dir=.
4575    for ac_exec_ext in '' $ac_executable_extensions; do
4576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4577    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4579    break 2
4580  fi
4581done
4582  done
4583IFS=$as_save_IFS
4584
4585  ;;
4586esac
4587fi
4588BASENAME=$ac_cv_path_BASENAME
4589if test -n "$BASENAME"; then
4590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4591$as_echo "$BASENAME" >&6; }
4592else
4593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4594$as_echo "no" >&6; }
4595fi
4596
4597
4598  test -n "$BASENAME" && break
4599done
4600
4601    else
4602      # If it succeeded, then it was overridden by the user. We will use it
4603      # for the tool.
4604
4605      # First remove it from the list of overridden variables, so we can test
4606      # for unknown variables in the end.
4607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4608
4609      # Check if the provided tool contains a complete path.
4610      tool_specified="$BASENAME"
4611      tool_basename="${tool_specified##*/}"
4612      if test "x$tool_basename" = "x$tool_specified"; then
4613        # A command without a complete path is provided, search $PATH.
4614        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4615$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4616        # Extract the first word of "$tool_basename", so it can be a program name with args.
4617set dummy $tool_basename; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_BASENAME+:} false; then :
4621  $as_echo_n "(cached) " >&6
4622else
4623  case $BASENAME in
4624  [\\/]* | ?:[\\/]*)
4625  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4626  ;;
4627  *)
4628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in $PATH
4630do
4631  IFS=$as_save_IFS
4632  test -z "$as_dir" && as_dir=.
4633    for ac_exec_ext in '' $ac_executable_extensions; do
4634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4635    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637    break 2
4638  fi
4639done
4640  done
4641IFS=$as_save_IFS
4642
4643  ;;
4644esac
4645fi
4646BASENAME=$ac_cv_path_BASENAME
4647if test -n "$BASENAME"; then
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4649$as_echo "$BASENAME" >&6; }
4650else
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656        if test "x$BASENAME" = x; then
4657          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4658        fi
4659      else
4660        # Otherwise we believe it is a complete path. Use it as it is.
4661        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4662$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4664$as_echo_n "checking for BASENAME... " >&6; }
4665        if test ! -x "$tool_specified"; then
4666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4667$as_echo "not found" >&6; }
4668          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4669        fi
4670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4671$as_echo "$tool_specified" >&6; }
4672      fi
4673    fi
4674  fi
4675
4676
4677
4678  if test "x$BASENAME" = x; then
4679    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4680  fi
4681
4682
4683
4684
4685
4686  # Publish this variable in the help.
4687
4688
4689  if test "x$BASH" = x; then
4690    # The variable is not set by user, try to locate tool using the code snippet
4691    for ac_prog in bash
4692do
4693  # Extract the first word of "$ac_prog", so it can be a program name with args.
4694set dummy $ac_prog; ac_word=$2
4695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4696$as_echo_n "checking for $ac_word... " >&6; }
4697if ${ac_cv_path_BASH+:} false; then :
4698  $as_echo_n "(cached) " >&6
4699else
4700  case $BASH in
4701  [\\/]* | ?:[\\/]*)
4702  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4703  ;;
4704  *)
4705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4706for as_dir in $PATH
4707do
4708  IFS=$as_save_IFS
4709  test -z "$as_dir" && as_dir=.
4710    for ac_exec_ext in '' $ac_executable_extensions; do
4711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4712    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4714    break 2
4715  fi
4716done
4717  done
4718IFS=$as_save_IFS
4719
4720  ;;
4721esac
4722fi
4723BASH=$ac_cv_path_BASH
4724if test -n "$BASH"; then
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4726$as_echo "$BASH" >&6; }
4727else
4728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4729$as_echo "no" >&6; }
4730fi
4731
4732
4733  test -n "$BASH" && break
4734done
4735
4736  else
4737    # The variable is set, but is it from the command line or the environment?
4738
4739    # Try to remove the string !BASH! from our list.
4740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4742      # If it failed, the variable was not from the command line. Ignore it,
4743      # but warn the user (except for BASH, which is always set by the calling BASH).
4744      if test "xBASH" != xBASH; then
4745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4746$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4747      fi
4748      # Try to locate tool using the code snippet
4749      for ac_prog in bash
4750do
4751  # Extract the first word of "$ac_prog", so it can be a program name with args.
4752set dummy $ac_prog; ac_word=$2
4753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754$as_echo_n "checking for $ac_word... " >&6; }
4755if ${ac_cv_path_BASH+:} false; then :
4756  $as_echo_n "(cached) " >&6
4757else
4758  case $BASH in
4759  [\\/]* | ?:[\\/]*)
4760  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4761  ;;
4762  *)
4763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764for as_dir in $PATH
4765do
4766  IFS=$as_save_IFS
4767  test -z "$as_dir" && as_dir=.
4768    for ac_exec_ext in '' $ac_executable_extensions; do
4769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4770    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4772    break 2
4773  fi
4774done
4775  done
4776IFS=$as_save_IFS
4777
4778  ;;
4779esac
4780fi
4781BASH=$ac_cv_path_BASH
4782if test -n "$BASH"; then
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4784$as_echo "$BASH" >&6; }
4785else
4786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4787$as_echo "no" >&6; }
4788fi
4789
4790
4791  test -n "$BASH" && break
4792done
4793
4794    else
4795      # If it succeeded, then it was overridden by the user. We will use it
4796      # for the tool.
4797
4798      # First remove it from the list of overridden variables, so we can test
4799      # for unknown variables in the end.
4800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4801
4802      # Check if the provided tool contains a complete path.
4803      tool_specified="$BASH"
4804      tool_basename="${tool_specified##*/}"
4805      if test "x$tool_basename" = "x$tool_specified"; then
4806        # A command without a complete path is provided, search $PATH.
4807        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4808$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4809        # Extract the first word of "$tool_basename", so it can be a program name with args.
4810set dummy $tool_basename; ac_word=$2
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812$as_echo_n "checking for $ac_word... " >&6; }
4813if ${ac_cv_path_BASH+:} false; then :
4814  $as_echo_n "(cached) " >&6
4815else
4816  case $BASH in
4817  [\\/]* | ?:[\\/]*)
4818  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4819  ;;
4820  *)
4821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in $PATH
4823do
4824  IFS=$as_save_IFS
4825  test -z "$as_dir" && as_dir=.
4826    for ac_exec_ext in '' $ac_executable_extensions; do
4827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4828    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4830    break 2
4831  fi
4832done
4833  done
4834IFS=$as_save_IFS
4835
4836  ;;
4837esac
4838fi
4839BASH=$ac_cv_path_BASH
4840if test -n "$BASH"; then
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4842$as_echo "$BASH" >&6; }
4843else
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
4846fi
4847
4848
4849        if test "x$BASH" = x; then
4850          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4851        fi
4852      else
4853        # Otherwise we believe it is a complete path. Use it as it is.
4854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4855$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4857$as_echo_n "checking for BASH... " >&6; }
4858        if test ! -x "$tool_specified"; then
4859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4860$as_echo "not found" >&6; }
4861          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4862        fi
4863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4864$as_echo "$tool_specified" >&6; }
4865      fi
4866    fi
4867  fi
4868
4869
4870
4871  if test "x$BASH" = x; then
4872    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4873  fi
4874
4875
4876
4877
4878
4879  # Publish this variable in the help.
4880
4881
4882  if test "x$CAT" = x; then
4883    # The variable is not set by user, try to locate tool using the code snippet
4884    for ac_prog in cat
4885do
4886  # Extract the first word of "$ac_prog", so it can be a program name with args.
4887set dummy $ac_prog; ac_word=$2
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4889$as_echo_n "checking for $ac_word... " >&6; }
4890if ${ac_cv_path_CAT+:} false; then :
4891  $as_echo_n "(cached) " >&6
4892else
4893  case $CAT in
4894  [\\/]* | ?:[\\/]*)
4895  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4896  ;;
4897  *)
4898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in $PATH
4900do
4901  IFS=$as_save_IFS
4902  test -z "$as_dir" && as_dir=.
4903    for ac_exec_ext in '' $ac_executable_extensions; do
4904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4905    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4907    break 2
4908  fi
4909done
4910  done
4911IFS=$as_save_IFS
4912
4913  ;;
4914esac
4915fi
4916CAT=$ac_cv_path_CAT
4917if test -n "$CAT"; then
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4919$as_echo "$CAT" >&6; }
4920else
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
4923fi
4924
4925
4926  test -n "$CAT" && break
4927done
4928
4929  else
4930    # The variable is set, but is it from the command line or the environment?
4931
4932    # Try to remove the string !CAT! from our list.
4933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4935      # If it failed, the variable was not from the command line. Ignore it,
4936      # but warn the user (except for BASH, which is always set by the calling BASH).
4937      if test "xCAT" != xBASH; then
4938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4939$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4940      fi
4941      # Try to locate tool using the code snippet
4942      for ac_prog in cat
4943do
4944  # Extract the first word of "$ac_prog", so it can be a program name with args.
4945set dummy $ac_prog; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if ${ac_cv_path_CAT+:} false; then :
4949  $as_echo_n "(cached) " >&6
4950else
4951  case $CAT in
4952  [\\/]* | ?:[\\/]*)
4953  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4954  ;;
4955  *)
4956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in $PATH
4958do
4959  IFS=$as_save_IFS
4960  test -z "$as_dir" && as_dir=.
4961    for ac_exec_ext in '' $ac_executable_extensions; do
4962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4963    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965    break 2
4966  fi
4967done
4968  done
4969IFS=$as_save_IFS
4970
4971  ;;
4972esac
4973fi
4974CAT=$ac_cv_path_CAT
4975if test -n "$CAT"; then
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4977$as_echo "$CAT" >&6; }
4978else
4979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
4981fi
4982
4983
4984  test -n "$CAT" && break
4985done
4986
4987    else
4988      # If it succeeded, then it was overridden by the user. We will use it
4989      # for the tool.
4990
4991      # First remove it from the list of overridden variables, so we can test
4992      # for unknown variables in the end.
4993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4994
4995      # Check if the provided tool contains a complete path.
4996      tool_specified="$CAT"
4997      tool_basename="${tool_specified##*/}"
4998      if test "x$tool_basename" = "x$tool_specified"; then
4999        # A command without a complete path is provided, search $PATH.
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5001$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5002        # Extract the first word of "$tool_basename", so it can be a program name with args.
5003set dummy $tool_basename; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
5006if ${ac_cv_path_CAT+:} false; then :
5007  $as_echo_n "(cached) " >&6
5008else
5009  case $CAT in
5010  [\\/]* | ?:[\\/]*)
5011  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5012  ;;
5013  *)
5014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in $PATH
5016do
5017  IFS=$as_save_IFS
5018  test -z "$as_dir" && as_dir=.
5019    for ac_exec_ext in '' $ac_executable_extensions; do
5020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023    break 2
5024  fi
5025done
5026  done
5027IFS=$as_save_IFS
5028
5029  ;;
5030esac
5031fi
5032CAT=$ac_cv_path_CAT
5033if test -n "$CAT"; then
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5035$as_echo "$CAT" >&6; }
5036else
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041
5042        if test "x$CAT" = x; then
5043          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5044        fi
5045      else
5046        # Otherwise we believe it is a complete path. Use it as it is.
5047        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5048$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5050$as_echo_n "checking for CAT... " >&6; }
5051        if test ! -x "$tool_specified"; then
5052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5053$as_echo "not found" >&6; }
5054          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5055        fi
5056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5057$as_echo "$tool_specified" >&6; }
5058      fi
5059    fi
5060  fi
5061
5062
5063
5064  if test "x$CAT" = x; then
5065    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5066  fi
5067
5068
5069
5070
5071
5072  # Publish this variable in the help.
5073
5074
5075  if test "x$CHMOD" = x; then
5076    # The variable is not set by user, try to locate tool using the code snippet
5077    for ac_prog in chmod
5078do
5079  # Extract the first word of "$ac_prog", so it can be a program name with args.
5080set dummy $ac_prog; ac_word=$2
5081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082$as_echo_n "checking for $ac_word... " >&6; }
5083if ${ac_cv_path_CHMOD+:} false; then :
5084  $as_echo_n "(cached) " >&6
5085else
5086  case $CHMOD in
5087  [\\/]* | ?:[\\/]*)
5088  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5089  ;;
5090  *)
5091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094  IFS=$as_save_IFS
5095  test -z "$as_dir" && as_dir=.
5096    for ac_exec_ext in '' $ac_executable_extensions; do
5097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5098    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5100    break 2
5101  fi
5102done
5103  done
5104IFS=$as_save_IFS
5105
5106  ;;
5107esac
5108fi
5109CHMOD=$ac_cv_path_CHMOD
5110if test -n "$CHMOD"; then
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5112$as_echo "$CHMOD" >&6; }
5113else
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115$as_echo "no" >&6; }
5116fi
5117
5118
5119  test -n "$CHMOD" && break
5120done
5121
5122  else
5123    # The variable is set, but is it from the command line or the environment?
5124
5125    # Try to remove the string !CHMOD! from our list.
5126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5128      # If it failed, the variable was not from the command line. Ignore it,
5129      # but warn the user (except for BASH, which is always set by the calling BASH).
5130      if test "xCHMOD" != xBASH; then
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5132$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5133      fi
5134      # Try to locate tool using the code snippet
5135      for ac_prog in chmod
5136do
5137  # Extract the first word of "$ac_prog", so it can be a program name with args.
5138set dummy $ac_prog; ac_word=$2
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
5141if ${ac_cv_path_CHMOD+:} false; then :
5142  $as_echo_n "(cached) " >&6
5143else
5144  case $CHMOD in
5145  [\\/]* | ?:[\\/]*)
5146  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5147  ;;
5148  *)
5149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152  IFS=$as_save_IFS
5153  test -z "$as_dir" && as_dir=.
5154    for ac_exec_ext in '' $ac_executable_extensions; do
5155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5156    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5158    break 2
5159  fi
5160done
5161  done
5162IFS=$as_save_IFS
5163
5164  ;;
5165esac
5166fi
5167CHMOD=$ac_cv_path_CHMOD
5168if test -n "$CHMOD"; then
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5170$as_echo "$CHMOD" >&6; }
5171else
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177  test -n "$CHMOD" && break
5178done
5179
5180    else
5181      # If it succeeded, then it was overridden by the user. We will use it
5182      # for the tool.
5183
5184      # First remove it from the list of overridden variables, so we can test
5185      # for unknown variables in the end.
5186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5187
5188      # Check if the provided tool contains a complete path.
5189      tool_specified="$CHMOD"
5190      tool_basename="${tool_specified##*/}"
5191      if test "x$tool_basename" = "x$tool_specified"; then
5192        # A command without a complete path is provided, search $PATH.
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5194$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5195        # Extract the first word of "$tool_basename", so it can be a program name with args.
5196set dummy $tool_basename; ac_word=$2
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5198$as_echo_n "checking for $ac_word... " >&6; }
5199if ${ac_cv_path_CHMOD+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  case $CHMOD in
5203  [\\/]* | ?:[\\/]*)
5204  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5205  ;;
5206  *)
5207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210  IFS=$as_save_IFS
5211  test -z "$as_dir" && as_dir=.
5212    for ac_exec_ext in '' $ac_executable_extensions; do
5213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5214    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5216    break 2
5217  fi
5218done
5219  done
5220IFS=$as_save_IFS
5221
5222  ;;
5223esac
5224fi
5225CHMOD=$ac_cv_path_CHMOD
5226if test -n "$CHMOD"; then
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5228$as_echo "$CHMOD" >&6; }
5229else
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
5232fi
5233
5234
5235        if test "x$CHMOD" = x; then
5236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5237        fi
5238      else
5239        # Otherwise we believe it is a complete path. Use it as it is.
5240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5241$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5243$as_echo_n "checking for CHMOD... " >&6; }
5244        if test ! -x "$tool_specified"; then
5245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5246$as_echo "not found" >&6; }
5247          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5248        fi
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5250$as_echo "$tool_specified" >&6; }
5251      fi
5252    fi
5253  fi
5254
5255
5256
5257  if test "x$CHMOD" = x; then
5258    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5259  fi
5260
5261
5262
5263
5264
5265  # Publish this variable in the help.
5266
5267
5268  if test "x$CMP" = x; then
5269    # The variable is not set by user, try to locate tool using the code snippet
5270    for ac_prog in cmp
5271do
5272  # Extract the first word of "$ac_prog", so it can be a program name with args.
5273set dummy $ac_prog; ac_word=$2
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275$as_echo_n "checking for $ac_word... " >&6; }
5276if ${ac_cv_path_CMP+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  case $CMP in
5280  [\\/]* | ?:[\\/]*)
5281  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5282  ;;
5283  *)
5284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299  ;;
5300esac
5301fi
5302CMP=$ac_cv_path_CMP
5303if test -n "$CMP"; then
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5305$as_echo "$CMP" >&6; }
5306else
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
5309fi
5310
5311
5312  test -n "$CMP" && break
5313done
5314
5315  else
5316    # The variable is set, but is it from the command line or the environment?
5317
5318    # Try to remove the string !CMP! from our list.
5319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5321      # If it failed, the variable was not from the command line. Ignore it,
5322      # but warn the user (except for BASH, which is always set by the calling BASH).
5323      if test "xCMP" != xBASH; then
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5325$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5326      fi
5327      # Try to locate tool using the code snippet
5328      for ac_prog in cmp
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_CMP+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $CMP in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360CMP=$ac_cv_path_CMP
5361if test -n "$CMP"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5363$as_echo "$CMP" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$CMP" && break
5371done
5372
5373    else
5374      # If it succeeded, then it was overridden by the user. We will use it
5375      # for the tool.
5376
5377      # First remove it from the list of overridden variables, so we can test
5378      # for unknown variables in the end.
5379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5380
5381      # Check if the provided tool contains a complete path.
5382      tool_specified="$CMP"
5383      tool_basename="${tool_specified##*/}"
5384      if test "x$tool_basename" = "x$tool_specified"; then
5385        # A command without a complete path is provided, search $PATH.
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5387$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5388        # Extract the first word of "$tool_basename", so it can be a program name with args.
5389set dummy $tool_basename; ac_word=$2
5390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5391$as_echo_n "checking for $ac_word... " >&6; }
5392if ${ac_cv_path_CMP+:} false; then :
5393  $as_echo_n "(cached) " >&6
5394else
5395  case $CMP in
5396  [\\/]* | ?:[\\/]*)
5397  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5398  ;;
5399  *)
5400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5401for as_dir in $PATH
5402do
5403  IFS=$as_save_IFS
5404  test -z "$as_dir" && as_dir=.
5405    for ac_exec_ext in '' $ac_executable_extensions; do
5406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5407    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5409    break 2
5410  fi
5411done
5412  done
5413IFS=$as_save_IFS
5414
5415  ;;
5416esac
5417fi
5418CMP=$ac_cv_path_CMP
5419if test -n "$CMP"; then
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5421$as_echo "$CMP" >&6; }
5422else
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5424$as_echo "no" >&6; }
5425fi
5426
5427
5428        if test "x$CMP" = x; then
5429          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5430        fi
5431      else
5432        # Otherwise we believe it is a complete path. Use it as it is.
5433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5434$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5436$as_echo_n "checking for CMP... " >&6; }
5437        if test ! -x "$tool_specified"; then
5438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5439$as_echo "not found" >&6; }
5440          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5441        fi
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5443$as_echo "$tool_specified" >&6; }
5444      fi
5445    fi
5446  fi
5447
5448
5449
5450  if test "x$CMP" = x; then
5451    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5452  fi
5453
5454
5455
5456
5457
5458  # Publish this variable in the help.
5459
5460
5461  if test "x$COMM" = x; then
5462    # The variable is not set by user, try to locate tool using the code snippet
5463    for ac_prog in comm
5464do
5465  # Extract the first word of "$ac_prog", so it can be a program name with args.
5466set dummy $ac_prog; ac_word=$2
5467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5468$as_echo_n "checking for $ac_word... " >&6; }
5469if ${ac_cv_path_COMM+:} false; then :
5470  $as_echo_n "(cached) " >&6
5471else
5472  case $COMM in
5473  [\\/]* | ?:[\\/]*)
5474  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5475  ;;
5476  *)
5477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5478for as_dir in $PATH
5479do
5480  IFS=$as_save_IFS
5481  test -z "$as_dir" && as_dir=.
5482    for ac_exec_ext in '' $ac_executable_extensions; do
5483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5484    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5486    break 2
5487  fi
5488done
5489  done
5490IFS=$as_save_IFS
5491
5492  ;;
5493esac
5494fi
5495COMM=$ac_cv_path_COMM
5496if test -n "$COMM"; then
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5498$as_echo "$COMM" >&6; }
5499else
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5501$as_echo "no" >&6; }
5502fi
5503
5504
5505  test -n "$COMM" && break
5506done
5507
5508  else
5509    # The variable is set, but is it from the command line or the environment?
5510
5511    # Try to remove the string !COMM! from our list.
5512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5514      # If it failed, the variable was not from the command line. Ignore it,
5515      # but warn the user (except for BASH, which is always set by the calling BASH).
5516      if test "xCOMM" != xBASH; then
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5518$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5519      fi
5520      # Try to locate tool using the code snippet
5521      for ac_prog in comm
5522do
5523  # Extract the first word of "$ac_prog", so it can be a program name with args.
5524set dummy $ac_prog; ac_word=$2
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5526$as_echo_n "checking for $ac_word... " >&6; }
5527if ${ac_cv_path_COMM+:} false; then :
5528  $as_echo_n "(cached) " >&6
5529else
5530  case $COMM in
5531  [\\/]* | ?:[\\/]*)
5532  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5533  ;;
5534  *)
5535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5536for as_dir in $PATH
5537do
5538  IFS=$as_save_IFS
5539  test -z "$as_dir" && as_dir=.
5540    for ac_exec_ext in '' $ac_executable_extensions; do
5541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5542    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5544    break 2
5545  fi
5546done
5547  done
5548IFS=$as_save_IFS
5549
5550  ;;
5551esac
5552fi
5553COMM=$ac_cv_path_COMM
5554if test -n "$COMM"; then
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5556$as_echo "$COMM" >&6; }
5557else
5558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559$as_echo "no" >&6; }
5560fi
5561
5562
5563  test -n "$COMM" && break
5564done
5565
5566    else
5567      # If it succeeded, then it was overridden by the user. We will use it
5568      # for the tool.
5569
5570      # First remove it from the list of overridden variables, so we can test
5571      # for unknown variables in the end.
5572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5573
5574      # Check if the provided tool contains a complete path.
5575      tool_specified="$COMM"
5576      tool_basename="${tool_specified##*/}"
5577      if test "x$tool_basename" = "x$tool_specified"; then
5578        # A command without a complete path is provided, search $PATH.
5579        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5580$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5581        # Extract the first word of "$tool_basename", so it can be a program name with args.
5582set dummy $tool_basename; ac_word=$2
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5584$as_echo_n "checking for $ac_word... " >&6; }
5585if ${ac_cv_path_COMM+:} false; then :
5586  $as_echo_n "(cached) " >&6
5587else
5588  case $COMM in
5589  [\\/]* | ?:[\\/]*)
5590  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5591  ;;
5592  *)
5593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5594for as_dir in $PATH
5595do
5596  IFS=$as_save_IFS
5597  test -z "$as_dir" && as_dir=.
5598    for ac_exec_ext in '' $ac_executable_extensions; do
5599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5600    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5602    break 2
5603  fi
5604done
5605  done
5606IFS=$as_save_IFS
5607
5608  ;;
5609esac
5610fi
5611COMM=$ac_cv_path_COMM
5612if test -n "$COMM"; then
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5614$as_echo "$COMM" >&6; }
5615else
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617$as_echo "no" >&6; }
5618fi
5619
5620
5621        if test "x$COMM" = x; then
5622          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5623        fi
5624      else
5625        # Otherwise we believe it is a complete path. Use it as it is.
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5627$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5629$as_echo_n "checking for COMM... " >&6; }
5630        if test ! -x "$tool_specified"; then
5631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5632$as_echo "not found" >&6; }
5633          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5634        fi
5635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5636$as_echo "$tool_specified" >&6; }
5637      fi
5638    fi
5639  fi
5640
5641
5642
5643  if test "x$COMM" = x; then
5644    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5645  fi
5646
5647
5648
5649
5650
5651  # Publish this variable in the help.
5652
5653
5654  if test "x$CP" = x; then
5655    # The variable is not set by user, try to locate tool using the code snippet
5656    for ac_prog in cp
5657do
5658  # Extract the first word of "$ac_prog", so it can be a program name with args.
5659set dummy $ac_prog; ac_word=$2
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661$as_echo_n "checking for $ac_word... " >&6; }
5662if ${ac_cv_path_CP+:} false; then :
5663  $as_echo_n "(cached) " >&6
5664else
5665  case $CP in
5666  [\\/]* | ?:[\\/]*)
5667  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5668  ;;
5669  *)
5670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673  IFS=$as_save_IFS
5674  test -z "$as_dir" && as_dir=.
5675    for ac_exec_ext in '' $ac_executable_extensions; do
5676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5677    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5679    break 2
5680  fi
5681done
5682  done
5683IFS=$as_save_IFS
5684
5685  ;;
5686esac
5687fi
5688CP=$ac_cv_path_CP
5689if test -n "$CP"; then
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5691$as_echo "$CP" >&6; }
5692else
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
5695fi
5696
5697
5698  test -n "$CP" && break
5699done
5700
5701  else
5702    # The variable is set, but is it from the command line or the environment?
5703
5704    # Try to remove the string !CP! from our list.
5705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5707      # If it failed, the variable was not from the command line. Ignore it,
5708      # but warn the user (except for BASH, which is always set by the calling BASH).
5709      if test "xCP" != xBASH; then
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5711$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5712      fi
5713      # Try to locate tool using the code snippet
5714      for ac_prog in cp
5715do
5716  # Extract the first word of "$ac_prog", so it can be a program name with args.
5717set dummy $ac_prog; ac_word=$2
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5719$as_echo_n "checking for $ac_word... " >&6; }
5720if ${ac_cv_path_CP+:} false; then :
5721  $as_echo_n "(cached) " >&6
5722else
5723  case $CP in
5724  [\\/]* | ?:[\\/]*)
5725  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5726  ;;
5727  *)
5728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5729for as_dir in $PATH
5730do
5731  IFS=$as_save_IFS
5732  test -z "$as_dir" && as_dir=.
5733    for ac_exec_ext in '' $ac_executable_extensions; do
5734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5735    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5737    break 2
5738  fi
5739done
5740  done
5741IFS=$as_save_IFS
5742
5743  ;;
5744esac
5745fi
5746CP=$ac_cv_path_CP
5747if test -n "$CP"; then
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5749$as_echo "$CP" >&6; }
5750else
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752$as_echo "no" >&6; }
5753fi
5754
5755
5756  test -n "$CP" && break
5757done
5758
5759    else
5760      # If it succeeded, then it was overridden by the user. We will use it
5761      # for the tool.
5762
5763      # First remove it from the list of overridden variables, so we can test
5764      # for unknown variables in the end.
5765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5766
5767      # Check if the provided tool contains a complete path.
5768      tool_specified="$CP"
5769      tool_basename="${tool_specified##*/}"
5770      if test "x$tool_basename" = "x$tool_specified"; then
5771        # A command without a complete path is provided, search $PATH.
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5773$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5774        # Extract the first word of "$tool_basename", so it can be a program name with args.
5775set dummy $tool_basename; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CP+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CP in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CP=$ac_cv_path_CP
5805if test -n "$CP"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5807$as_echo "$CP" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814        if test "x$CP" = x; then
5815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5816        fi
5817      else
5818        # Otherwise we believe it is a complete path. Use it as it is.
5819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5820$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5822$as_echo_n "checking for CP... " >&6; }
5823        if test ! -x "$tool_specified"; then
5824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5825$as_echo "not found" >&6; }
5826          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5827        fi
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5829$as_echo "$tool_specified" >&6; }
5830      fi
5831    fi
5832  fi
5833
5834
5835
5836  if test "x$CP" = x; then
5837    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5838  fi
5839
5840
5841
5842
5843
5844  # Publish this variable in the help.
5845
5846
5847  if test "x$CUT" = x; then
5848    # The variable is not set by user, try to locate tool using the code snippet
5849    for ac_prog in cut
5850do
5851  # Extract the first word of "$ac_prog", so it can be a program name with args.
5852set dummy $ac_prog; ac_word=$2
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5854$as_echo_n "checking for $ac_word... " >&6; }
5855if ${ac_cv_path_CUT+:} false; then :
5856  $as_echo_n "(cached) " >&6
5857else
5858  case $CUT in
5859  [\\/]* | ?:[\\/]*)
5860  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5861  ;;
5862  *)
5863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5864for as_dir in $PATH
5865do
5866  IFS=$as_save_IFS
5867  test -z "$as_dir" && as_dir=.
5868    for ac_exec_ext in '' $ac_executable_extensions; do
5869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5870    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5872    break 2
5873  fi
5874done
5875  done
5876IFS=$as_save_IFS
5877
5878  ;;
5879esac
5880fi
5881CUT=$ac_cv_path_CUT
5882if test -n "$CUT"; then
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5884$as_echo "$CUT" >&6; }
5885else
5886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887$as_echo "no" >&6; }
5888fi
5889
5890
5891  test -n "$CUT" && break
5892done
5893
5894  else
5895    # The variable is set, but is it from the command line or the environment?
5896
5897    # Try to remove the string !CUT! from our list.
5898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5900      # If it failed, the variable was not from the command line. Ignore it,
5901      # but warn the user (except for BASH, which is always set by the calling BASH).
5902      if test "xCUT" != xBASH; then
5903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5904$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5905      fi
5906      # Try to locate tool using the code snippet
5907      for ac_prog in cut
5908do
5909  # Extract the first word of "$ac_prog", so it can be a program name with args.
5910set dummy $ac_prog; ac_word=$2
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5912$as_echo_n "checking for $ac_word... " >&6; }
5913if ${ac_cv_path_CUT+:} false; then :
5914  $as_echo_n "(cached) " >&6
5915else
5916  case $CUT in
5917  [\\/]* | ?:[\\/]*)
5918  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5919  ;;
5920  *)
5921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924  IFS=$as_save_IFS
5925  test -z "$as_dir" && as_dir=.
5926    for ac_exec_ext in '' $ac_executable_extensions; do
5927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5928    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930    break 2
5931  fi
5932done
5933  done
5934IFS=$as_save_IFS
5935
5936  ;;
5937esac
5938fi
5939CUT=$ac_cv_path_CUT
5940if test -n "$CUT"; then
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5942$as_echo "$CUT" >&6; }
5943else
5944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
5946fi
5947
5948
5949  test -n "$CUT" && break
5950done
5951
5952    else
5953      # If it succeeded, then it was overridden by the user. We will use it
5954      # for the tool.
5955
5956      # First remove it from the list of overridden variables, so we can test
5957      # for unknown variables in the end.
5958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5959
5960      # Check if the provided tool contains a complete path.
5961      tool_specified="$CUT"
5962      tool_basename="${tool_specified##*/}"
5963      if test "x$tool_basename" = "x$tool_specified"; then
5964        # A command without a complete path is provided, search $PATH.
5965        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5966$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5967        # Extract the first word of "$tool_basename", so it can be a program name with args.
5968set dummy $tool_basename; ac_word=$2
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if ${ac_cv_path_CUT+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  case $CUT in
5975  [\\/]* | ?:[\\/]*)
5976  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5977  ;;
5978  *)
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_exec_ext in '' $ac_executable_extensions; do
5985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5986    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5988    break 2
5989  fi
5990done
5991  done
5992IFS=$as_save_IFS
5993
5994  ;;
5995esac
5996fi
5997CUT=$ac_cv_path_CUT
5998if test -n "$CUT"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6000$as_echo "$CUT" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007        if test "x$CUT" = x; then
6008          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6009        fi
6010      else
6011        # Otherwise we believe it is a complete path. Use it as it is.
6012        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6013$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6015$as_echo_n "checking for CUT... " >&6; }
6016        if test ! -x "$tool_specified"; then
6017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6018$as_echo "not found" >&6; }
6019          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6020        fi
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6022$as_echo "$tool_specified" >&6; }
6023      fi
6024    fi
6025  fi
6026
6027
6028
6029  if test "x$CUT" = x; then
6030    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6031  fi
6032
6033
6034
6035
6036
6037  # Publish this variable in the help.
6038
6039
6040  if test "x$DATE" = x; then
6041    # The variable is not set by user, try to locate tool using the code snippet
6042    for ac_prog in date
6043do
6044  # Extract the first word of "$ac_prog", so it can be a program name with args.
6045set dummy $ac_prog; ac_word=$2
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6047$as_echo_n "checking for $ac_word... " >&6; }
6048if ${ac_cv_path_DATE+:} false; then :
6049  $as_echo_n "(cached) " >&6
6050else
6051  case $DATE in
6052  [\\/]* | ?:[\\/]*)
6053  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6054  ;;
6055  *)
6056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH
6058do
6059  IFS=$as_save_IFS
6060  test -z "$as_dir" && as_dir=.
6061    for ac_exec_ext in '' $ac_executable_extensions; do
6062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6063    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6065    break 2
6066  fi
6067done
6068  done
6069IFS=$as_save_IFS
6070
6071  ;;
6072esac
6073fi
6074DATE=$ac_cv_path_DATE
6075if test -n "$DATE"; then
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6077$as_echo "$DATE" >&6; }
6078else
6079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
6081fi
6082
6083
6084  test -n "$DATE" && break
6085done
6086
6087  else
6088    # The variable is set, but is it from the command line or the environment?
6089
6090    # Try to remove the string !DATE! from our list.
6091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6093      # If it failed, the variable was not from the command line. Ignore it,
6094      # but warn the user (except for BASH, which is always set by the calling BASH).
6095      if test "xDATE" != xBASH; then
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6097$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6098      fi
6099      # Try to locate tool using the code snippet
6100      for ac_prog in date
6101do
6102  # Extract the first word of "$ac_prog", so it can be a program name with args.
6103set dummy $ac_prog; ac_word=$2
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
6106if ${ac_cv_path_DATE+:} false; then :
6107  $as_echo_n "(cached) " >&6
6108else
6109  case $DATE in
6110  [\\/]* | ?:[\\/]*)
6111  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6112  ;;
6113  *)
6114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117  IFS=$as_save_IFS
6118  test -z "$as_dir" && as_dir=.
6119    for ac_exec_ext in '' $ac_executable_extensions; do
6120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6121    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6123    break 2
6124  fi
6125done
6126  done
6127IFS=$as_save_IFS
6128
6129  ;;
6130esac
6131fi
6132DATE=$ac_cv_path_DATE
6133if test -n "$DATE"; then
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6135$as_echo "$DATE" >&6; }
6136else
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138$as_echo "no" >&6; }
6139fi
6140
6141
6142  test -n "$DATE" && break
6143done
6144
6145    else
6146      # If it succeeded, then it was overridden by the user. We will use it
6147      # for the tool.
6148
6149      # First remove it from the list of overridden variables, so we can test
6150      # for unknown variables in the end.
6151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6152
6153      # Check if the provided tool contains a complete path.
6154      tool_specified="$DATE"
6155      tool_basename="${tool_specified##*/}"
6156      if test "x$tool_basename" = "x$tool_specified"; then
6157        # A command without a complete path is provided, search $PATH.
6158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6159$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6160        # Extract the first word of "$tool_basename", so it can be a program name with args.
6161set dummy $tool_basename; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_DATE+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $DATE in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190DATE=$ac_cv_path_DATE
6191if test -n "$DATE"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6193$as_echo "$DATE" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200        if test "x$DATE" = x; then
6201          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6202        fi
6203      else
6204        # Otherwise we believe it is a complete path. Use it as it is.
6205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6206$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6208$as_echo_n "checking for DATE... " >&6; }
6209        if test ! -x "$tool_specified"; then
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6211$as_echo "not found" >&6; }
6212          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6213        fi
6214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6215$as_echo "$tool_specified" >&6; }
6216      fi
6217    fi
6218  fi
6219
6220
6221
6222  if test "x$DATE" = x; then
6223    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6224  fi
6225
6226
6227
6228
6229
6230  # Publish this variable in the help.
6231
6232
6233  if test "x$DIFF" = x; then
6234    # The variable is not set by user, try to locate tool using the code snippet
6235    for ac_prog in gdiff diff
6236do
6237  # Extract the first word of "$ac_prog", so it can be a program name with args.
6238set dummy $ac_prog; ac_word=$2
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6240$as_echo_n "checking for $ac_word... " >&6; }
6241if ${ac_cv_path_DIFF+:} false; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  case $DIFF in
6245  [\\/]* | ?:[\\/]*)
6246  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6247  ;;
6248  *)
6249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252  IFS=$as_save_IFS
6253  test -z "$as_dir" && as_dir=.
6254    for ac_exec_ext in '' $ac_executable_extensions; do
6255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6256    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258    break 2
6259  fi
6260done
6261  done
6262IFS=$as_save_IFS
6263
6264  ;;
6265esac
6266fi
6267DIFF=$ac_cv_path_DIFF
6268if test -n "$DIFF"; then
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6270$as_echo "$DIFF" >&6; }
6271else
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6273$as_echo "no" >&6; }
6274fi
6275
6276
6277  test -n "$DIFF" && break
6278done
6279
6280  else
6281    # The variable is set, but is it from the command line or the environment?
6282
6283    # Try to remove the string !DIFF! from our list.
6284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6286      # If it failed, the variable was not from the command line. Ignore it,
6287      # but warn the user (except for BASH, which is always set by the calling BASH).
6288      if test "xDIFF" != xBASH; then
6289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6290$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6291      fi
6292      # Try to locate tool using the code snippet
6293      for ac_prog in gdiff diff
6294do
6295  # Extract the first word of "$ac_prog", so it can be a program name with args.
6296set dummy $ac_prog; ac_word=$2
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6298$as_echo_n "checking for $ac_word... " >&6; }
6299if ${ac_cv_path_DIFF+:} false; then :
6300  $as_echo_n "(cached) " >&6
6301else
6302  case $DIFF in
6303  [\\/]* | ?:[\\/]*)
6304  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6305  ;;
6306  *)
6307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310  IFS=$as_save_IFS
6311  test -z "$as_dir" && as_dir=.
6312    for ac_exec_ext in '' $ac_executable_extensions; do
6313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6314    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6316    break 2
6317  fi
6318done
6319  done
6320IFS=$as_save_IFS
6321
6322  ;;
6323esac
6324fi
6325DIFF=$ac_cv_path_DIFF
6326if test -n "$DIFF"; then
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6328$as_echo "$DIFF" >&6; }
6329else
6330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }
6332fi
6333
6334
6335  test -n "$DIFF" && break
6336done
6337
6338    else
6339      # If it succeeded, then it was overridden by the user. We will use it
6340      # for the tool.
6341
6342      # First remove it from the list of overridden variables, so we can test
6343      # for unknown variables in the end.
6344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6345
6346      # Check if the provided tool contains a complete path.
6347      tool_specified="$DIFF"
6348      tool_basename="${tool_specified##*/}"
6349      if test "x$tool_basename" = "x$tool_specified"; then
6350        # A command without a complete path is provided, search $PATH.
6351        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6352$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6353        # Extract the first word of "$tool_basename", so it can be a program name with args.
6354set dummy $tool_basename; ac_word=$2
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6356$as_echo_n "checking for $ac_word... " >&6; }
6357if ${ac_cv_path_DIFF+:} false; then :
6358  $as_echo_n "(cached) " >&6
6359else
6360  case $DIFF in
6361  [\\/]* | ?:[\\/]*)
6362  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6363  ;;
6364  *)
6365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368  IFS=$as_save_IFS
6369  test -z "$as_dir" && as_dir=.
6370    for ac_exec_ext in '' $ac_executable_extensions; do
6371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6372    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6374    break 2
6375  fi
6376done
6377  done
6378IFS=$as_save_IFS
6379
6380  ;;
6381esac
6382fi
6383DIFF=$ac_cv_path_DIFF
6384if test -n "$DIFF"; then
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6386$as_echo "$DIFF" >&6; }
6387else
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; }
6390fi
6391
6392
6393        if test "x$DIFF" = x; then
6394          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6395        fi
6396      else
6397        # Otherwise we believe it is a complete path. Use it as it is.
6398        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6399$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6401$as_echo_n "checking for DIFF... " >&6; }
6402        if test ! -x "$tool_specified"; then
6403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6404$as_echo "not found" >&6; }
6405          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6406        fi
6407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6408$as_echo "$tool_specified" >&6; }
6409      fi
6410    fi
6411  fi
6412
6413
6414
6415  if test "x$DIFF" = x; then
6416    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6417  fi
6418
6419
6420
6421
6422
6423  # Publish this variable in the help.
6424
6425
6426  if test "x$DIRNAME" = x; then
6427    # The variable is not set by user, try to locate tool using the code snippet
6428    for ac_prog in dirname
6429do
6430  # Extract the first word of "$ac_prog", so it can be a program name with args.
6431set dummy $ac_prog; ac_word=$2
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6433$as_echo_n "checking for $ac_word... " >&6; }
6434if ${ac_cv_path_DIRNAME+:} false; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  case $DIRNAME in
6438  [\\/]* | ?:[\\/]*)
6439  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6440  ;;
6441  *)
6442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6443for as_dir in $PATH
6444do
6445  IFS=$as_save_IFS
6446  test -z "$as_dir" && as_dir=.
6447    for ac_exec_ext in '' $ac_executable_extensions; do
6448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6449    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6451    break 2
6452  fi
6453done
6454  done
6455IFS=$as_save_IFS
6456
6457  ;;
6458esac
6459fi
6460DIRNAME=$ac_cv_path_DIRNAME
6461if test -n "$DIRNAME"; then
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6463$as_echo "$DIRNAME" >&6; }
6464else
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469
6470  test -n "$DIRNAME" && break
6471done
6472
6473  else
6474    # The variable is set, but is it from the command line or the environment?
6475
6476    # Try to remove the string !DIRNAME! from our list.
6477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6479      # If it failed, the variable was not from the command line. Ignore it,
6480      # but warn the user (except for BASH, which is always set by the calling BASH).
6481      if test "xDIRNAME" != xBASH; then
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6483$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6484      fi
6485      # Try to locate tool using the code snippet
6486      for ac_prog in dirname
6487do
6488  # Extract the first word of "$ac_prog", so it can be a program name with args.
6489set dummy $ac_prog; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_path_DIRNAME+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  case $DIRNAME in
6496  [\\/]* | ?:[\\/]*)
6497  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6498  ;;
6499  *)
6500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
6503  IFS=$as_save_IFS
6504  test -z "$as_dir" && as_dir=.
6505    for ac_exec_ext in '' $ac_executable_extensions; do
6506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509    break 2
6510  fi
6511done
6512  done
6513IFS=$as_save_IFS
6514
6515  ;;
6516esac
6517fi
6518DIRNAME=$ac_cv_path_DIRNAME
6519if test -n "$DIRNAME"; then
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6521$as_echo "$DIRNAME" >&6; }
6522else
6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527
6528  test -n "$DIRNAME" && break
6529done
6530
6531    else
6532      # If it succeeded, then it was overridden by the user. We will use it
6533      # for the tool.
6534
6535      # First remove it from the list of overridden variables, so we can test
6536      # for unknown variables in the end.
6537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6538
6539      # Check if the provided tool contains a complete path.
6540      tool_specified="$DIRNAME"
6541      tool_basename="${tool_specified##*/}"
6542      if test "x$tool_basename" = "x$tool_specified"; then
6543        # A command without a complete path is provided, search $PATH.
6544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6545$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6546        # Extract the first word of "$tool_basename", so it can be a program name with args.
6547set dummy $tool_basename; ac_word=$2
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6549$as_echo_n "checking for $ac_word... " >&6; }
6550if ${ac_cv_path_DIRNAME+:} false; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  case $DIRNAME in
6554  [\\/]* | ?:[\\/]*)
6555  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6556  ;;
6557  *)
6558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559for as_dir in $PATH
6560do
6561  IFS=$as_save_IFS
6562  test -z "$as_dir" && as_dir=.
6563    for ac_exec_ext in '' $ac_executable_extensions; do
6564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567    break 2
6568  fi
6569done
6570  done
6571IFS=$as_save_IFS
6572
6573  ;;
6574esac
6575fi
6576DIRNAME=$ac_cv_path_DIRNAME
6577if test -n "$DIRNAME"; then
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6579$as_echo "$DIRNAME" >&6; }
6580else
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585
6586        if test "x$DIRNAME" = x; then
6587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6588        fi
6589      else
6590        # Otherwise we believe it is a complete path. Use it as it is.
6591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6592$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6594$as_echo_n "checking for DIRNAME... " >&6; }
6595        if test ! -x "$tool_specified"; then
6596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6597$as_echo "not found" >&6; }
6598          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6599        fi
6600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6601$as_echo "$tool_specified" >&6; }
6602      fi
6603    fi
6604  fi
6605
6606
6607
6608  if test "x$DIRNAME" = x; then
6609    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6610  fi
6611
6612
6613
6614
6615
6616  # Publish this variable in the help.
6617
6618
6619  if test "x$ECHO" = x; then
6620    # The variable is not set by user, try to locate tool using the code snippet
6621    for ac_prog in echo
6622do
6623  # Extract the first word of "$ac_prog", so it can be a program name with args.
6624set dummy $ac_prog; ac_word=$2
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626$as_echo_n "checking for $ac_word... " >&6; }
6627if ${ac_cv_path_ECHO+:} false; then :
6628  $as_echo_n "(cached) " >&6
6629else
6630  case $ECHO in
6631  [\\/]* | ?:[\\/]*)
6632  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6633  ;;
6634  *)
6635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636for as_dir in $PATH
6637do
6638  IFS=$as_save_IFS
6639  test -z "$as_dir" && as_dir=.
6640    for ac_exec_ext in '' $ac_executable_extensions; do
6641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6642    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6644    break 2
6645  fi
6646done
6647  done
6648IFS=$as_save_IFS
6649
6650  ;;
6651esac
6652fi
6653ECHO=$ac_cv_path_ECHO
6654if test -n "$ECHO"; then
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6656$as_echo "$ECHO" >&6; }
6657else
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659$as_echo "no" >&6; }
6660fi
6661
6662
6663  test -n "$ECHO" && break
6664done
6665
6666  else
6667    # The variable is set, but is it from the command line or the environment?
6668
6669    # Try to remove the string !ECHO! from our list.
6670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6672      # If it failed, the variable was not from the command line. Ignore it,
6673      # but warn the user (except for BASH, which is always set by the calling BASH).
6674      if test "xECHO" != xBASH; then
6675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6676$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6677      fi
6678      # Try to locate tool using the code snippet
6679      for ac_prog in echo
6680do
6681  # Extract the first word of "$ac_prog", so it can be a program name with args.
6682set dummy $ac_prog; ac_word=$2
6683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6684$as_echo_n "checking for $ac_word... " >&6; }
6685if ${ac_cv_path_ECHO+:} false; then :
6686  $as_echo_n "(cached) " >&6
6687else
6688  case $ECHO in
6689  [\\/]* | ?:[\\/]*)
6690  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6691  ;;
6692  *)
6693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6694for as_dir in $PATH
6695do
6696  IFS=$as_save_IFS
6697  test -z "$as_dir" && as_dir=.
6698    for ac_exec_ext in '' $ac_executable_extensions; do
6699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6700    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6702    break 2
6703  fi
6704done
6705  done
6706IFS=$as_save_IFS
6707
6708  ;;
6709esac
6710fi
6711ECHO=$ac_cv_path_ECHO
6712if test -n "$ECHO"; then
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6714$as_echo "$ECHO" >&6; }
6715else
6716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6717$as_echo "no" >&6; }
6718fi
6719
6720
6721  test -n "$ECHO" && break
6722done
6723
6724    else
6725      # If it succeeded, then it was overridden by the user. We will use it
6726      # for the tool.
6727
6728      # First remove it from the list of overridden variables, so we can test
6729      # for unknown variables in the end.
6730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6731
6732      # Check if the provided tool contains a complete path.
6733      tool_specified="$ECHO"
6734      tool_basename="${tool_specified##*/}"
6735      if test "x$tool_basename" = "x$tool_specified"; then
6736        # A command without a complete path is provided, search $PATH.
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6738$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6739        # Extract the first word of "$tool_basename", so it can be a program name with args.
6740set dummy $tool_basename; ac_word=$2
6741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6742$as_echo_n "checking for $ac_word... " >&6; }
6743if ${ac_cv_path_ECHO+:} false; then :
6744  $as_echo_n "(cached) " >&6
6745else
6746  case $ECHO in
6747  [\\/]* | ?:[\\/]*)
6748  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6749  ;;
6750  *)
6751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6752for as_dir in $PATH
6753do
6754  IFS=$as_save_IFS
6755  test -z "$as_dir" && as_dir=.
6756    for ac_exec_ext in '' $ac_executable_extensions; do
6757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6758    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6760    break 2
6761  fi
6762done
6763  done
6764IFS=$as_save_IFS
6765
6766  ;;
6767esac
6768fi
6769ECHO=$ac_cv_path_ECHO
6770if test -n "$ECHO"; then
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6772$as_echo "$ECHO" >&6; }
6773else
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6775$as_echo "no" >&6; }
6776fi
6777
6778
6779        if test "x$ECHO" = x; then
6780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6781        fi
6782      else
6783        # Otherwise we believe it is a complete path. Use it as it is.
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6785$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6787$as_echo_n "checking for ECHO... " >&6; }
6788        if test ! -x "$tool_specified"; then
6789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6790$as_echo "not found" >&6; }
6791          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6792        fi
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6794$as_echo "$tool_specified" >&6; }
6795      fi
6796    fi
6797  fi
6798
6799
6800
6801  if test "x$ECHO" = x; then
6802    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6803  fi
6804
6805
6806
6807
6808
6809  # Publish this variable in the help.
6810
6811
6812  if test "x$EXPR" = x; then
6813    # The variable is not set by user, try to locate tool using the code snippet
6814    for ac_prog in expr
6815do
6816  # Extract the first word of "$ac_prog", so it can be a program name with args.
6817set dummy $ac_prog; ac_word=$2
6818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819$as_echo_n "checking for $ac_word... " >&6; }
6820if ${ac_cv_path_EXPR+:} false; then :
6821  $as_echo_n "(cached) " >&6
6822else
6823  case $EXPR in
6824  [\\/]* | ?:[\\/]*)
6825  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6826  ;;
6827  *)
6828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829for as_dir in $PATH
6830do
6831  IFS=$as_save_IFS
6832  test -z "$as_dir" && as_dir=.
6833    for ac_exec_ext in '' $ac_executable_extensions; do
6834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837    break 2
6838  fi
6839done
6840  done
6841IFS=$as_save_IFS
6842
6843  ;;
6844esac
6845fi
6846EXPR=$ac_cv_path_EXPR
6847if test -n "$EXPR"; then
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6849$as_echo "$EXPR" >&6; }
6850else
6851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6852$as_echo "no" >&6; }
6853fi
6854
6855
6856  test -n "$EXPR" && break
6857done
6858
6859  else
6860    # The variable is set, but is it from the command line or the environment?
6861
6862    # Try to remove the string !EXPR! from our list.
6863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6865      # If it failed, the variable was not from the command line. Ignore it,
6866      # but warn the user (except for BASH, which is always set by the calling BASH).
6867      if test "xEXPR" != xBASH; then
6868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6869$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6870      fi
6871      # Try to locate tool using the code snippet
6872      for ac_prog in expr
6873do
6874  # Extract the first word of "$ac_prog", so it can be a program name with args.
6875set dummy $ac_prog; ac_word=$2
6876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6877$as_echo_n "checking for $ac_word... " >&6; }
6878if ${ac_cv_path_EXPR+:} false; then :
6879  $as_echo_n "(cached) " >&6
6880else
6881  case $EXPR in
6882  [\\/]* | ?:[\\/]*)
6883  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6884  ;;
6885  *)
6886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6887for as_dir in $PATH
6888do
6889  IFS=$as_save_IFS
6890  test -z "$as_dir" && as_dir=.
6891    for ac_exec_ext in '' $ac_executable_extensions; do
6892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6893    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6895    break 2
6896  fi
6897done
6898  done
6899IFS=$as_save_IFS
6900
6901  ;;
6902esac
6903fi
6904EXPR=$ac_cv_path_EXPR
6905if test -n "$EXPR"; then
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6907$as_echo "$EXPR" >&6; }
6908else
6909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6910$as_echo "no" >&6; }
6911fi
6912
6913
6914  test -n "$EXPR" && break
6915done
6916
6917    else
6918      # If it succeeded, then it was overridden by the user. We will use it
6919      # for the tool.
6920
6921      # First remove it from the list of overridden variables, so we can test
6922      # for unknown variables in the end.
6923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6924
6925      # Check if the provided tool contains a complete path.
6926      tool_specified="$EXPR"
6927      tool_basename="${tool_specified##*/}"
6928      if test "x$tool_basename" = "x$tool_specified"; then
6929        # A command without a complete path is provided, search $PATH.
6930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6931$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6932        # Extract the first word of "$tool_basename", so it can be a program name with args.
6933set dummy $tool_basename; ac_word=$2
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6935$as_echo_n "checking for $ac_word... " >&6; }
6936if ${ac_cv_path_EXPR+:} false; then :
6937  $as_echo_n "(cached) " >&6
6938else
6939  case $EXPR in
6940  [\\/]* | ?:[\\/]*)
6941  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6942  ;;
6943  *)
6944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6945for as_dir in $PATH
6946do
6947  IFS=$as_save_IFS
6948  test -z "$as_dir" && as_dir=.
6949    for ac_exec_ext in '' $ac_executable_extensions; do
6950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6951    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6953    break 2
6954  fi
6955done
6956  done
6957IFS=$as_save_IFS
6958
6959  ;;
6960esac
6961fi
6962EXPR=$ac_cv_path_EXPR
6963if test -n "$EXPR"; then
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6965$as_echo "$EXPR" >&6; }
6966else
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6968$as_echo "no" >&6; }
6969fi
6970
6971
6972        if test "x$EXPR" = x; then
6973          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6974        fi
6975      else
6976        # Otherwise we believe it is a complete path. Use it as it is.
6977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6978$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6980$as_echo_n "checking for EXPR... " >&6; }
6981        if test ! -x "$tool_specified"; then
6982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6983$as_echo "not found" >&6; }
6984          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6985        fi
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6987$as_echo "$tool_specified" >&6; }
6988      fi
6989    fi
6990  fi
6991
6992
6993
6994  if test "x$EXPR" = x; then
6995    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6996  fi
6997
6998
6999
7000
7001
7002  # Publish this variable in the help.
7003
7004
7005  if test "x$FILE" = x; then
7006    # The variable is not set by user, try to locate tool using the code snippet
7007    for ac_prog in file
7008do
7009  # Extract the first word of "$ac_prog", so it can be a program name with args.
7010set dummy $ac_prog; ac_word=$2
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7012$as_echo_n "checking for $ac_word... " >&6; }
7013if ${ac_cv_path_FILE+:} false; then :
7014  $as_echo_n "(cached) " >&6
7015else
7016  case $FILE in
7017  [\\/]* | ?:[\\/]*)
7018  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7019  ;;
7020  *)
7021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7022for as_dir in $PATH
7023do
7024  IFS=$as_save_IFS
7025  test -z "$as_dir" && as_dir=.
7026    for ac_exec_ext in '' $ac_executable_extensions; do
7027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7028    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7030    break 2
7031  fi
7032done
7033  done
7034IFS=$as_save_IFS
7035
7036  ;;
7037esac
7038fi
7039FILE=$ac_cv_path_FILE
7040if test -n "$FILE"; then
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7042$as_echo "$FILE" >&6; }
7043else
7044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7045$as_echo "no" >&6; }
7046fi
7047
7048
7049  test -n "$FILE" && break
7050done
7051
7052  else
7053    # The variable is set, but is it from the command line or the environment?
7054
7055    # Try to remove the string !FILE! from our list.
7056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7058      # If it failed, the variable was not from the command line. Ignore it,
7059      # but warn the user (except for BASH, which is always set by the calling BASH).
7060      if test "xFILE" != xBASH; then
7061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7062$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7063      fi
7064      # Try to locate tool using the code snippet
7065      for ac_prog in file
7066do
7067  # Extract the first word of "$ac_prog", so it can be a program name with args.
7068set dummy $ac_prog; ac_word=$2
7069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7070$as_echo_n "checking for $ac_word... " >&6; }
7071if ${ac_cv_path_FILE+:} false; then :
7072  $as_echo_n "(cached) " >&6
7073else
7074  case $FILE in
7075  [\\/]* | ?:[\\/]*)
7076  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7077  ;;
7078  *)
7079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7080for as_dir in $PATH
7081do
7082  IFS=$as_save_IFS
7083  test -z "$as_dir" && as_dir=.
7084    for ac_exec_ext in '' $ac_executable_extensions; do
7085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7086    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7088    break 2
7089  fi
7090done
7091  done
7092IFS=$as_save_IFS
7093
7094  ;;
7095esac
7096fi
7097FILE=$ac_cv_path_FILE
7098if test -n "$FILE"; then
7099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7100$as_echo "$FILE" >&6; }
7101else
7102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7103$as_echo "no" >&6; }
7104fi
7105
7106
7107  test -n "$FILE" && break
7108done
7109
7110    else
7111      # If it succeeded, then it was overridden by the user. We will use it
7112      # for the tool.
7113
7114      # First remove it from the list of overridden variables, so we can test
7115      # for unknown variables in the end.
7116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7117
7118      # Check if the provided tool contains a complete path.
7119      tool_specified="$FILE"
7120      tool_basename="${tool_specified##*/}"
7121      if test "x$tool_basename" = "x$tool_specified"; then
7122        # A command without a complete path is provided, search $PATH.
7123        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7124$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7125        # Extract the first word of "$tool_basename", so it can be a program name with args.
7126set dummy $tool_basename; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_FILE+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $FILE in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155FILE=$ac_cv_path_FILE
7156if test -n "$FILE"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7158$as_echo "$FILE" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165        if test "x$FILE" = x; then
7166          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167        fi
7168      else
7169        # Otherwise we believe it is a complete path. Use it as it is.
7170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7171$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7173$as_echo_n "checking for FILE... " >&6; }
7174        if test ! -x "$tool_specified"; then
7175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176$as_echo "not found" >&6; }
7177          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7178        fi
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180$as_echo "$tool_specified" >&6; }
7181      fi
7182    fi
7183  fi
7184
7185
7186
7187  if test "x$FILE" = x; then
7188    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7189  fi
7190
7191
7192
7193
7194
7195  # Publish this variable in the help.
7196
7197
7198  if test "x$FIND" = x; then
7199    # The variable is not set by user, try to locate tool using the code snippet
7200    for ac_prog in find
7201do
7202  # Extract the first word of "$ac_prog", so it can be a program name with args.
7203set dummy $ac_prog; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_FIND+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $FIND in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232FIND=$ac_cv_path_FIND
7233if test -n "$FIND"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7235$as_echo "$FIND" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242  test -n "$FIND" && break
7243done
7244
7245  else
7246    # The variable is set, but is it from the command line or the environment?
7247
7248    # Try to remove the string !FIND! from our list.
7249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7251      # If it failed, the variable was not from the command line. Ignore it,
7252      # but warn the user (except for BASH, which is always set by the calling BASH).
7253      if test "xFIND" != xBASH; then
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7255$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7256      fi
7257      # Try to locate tool using the code snippet
7258      for ac_prog in find
7259do
7260  # Extract the first word of "$ac_prog", so it can be a program name with args.
7261set dummy $ac_prog; ac_word=$2
7262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263$as_echo_n "checking for $ac_word... " >&6; }
7264if ${ac_cv_path_FIND+:} false; then :
7265  $as_echo_n "(cached) " >&6
7266else
7267  case $FIND in
7268  [\\/]* | ?:[\\/]*)
7269  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7270  ;;
7271  *)
7272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7273for as_dir in $PATH
7274do
7275  IFS=$as_save_IFS
7276  test -z "$as_dir" && as_dir=.
7277    for ac_exec_ext in '' $ac_executable_extensions; do
7278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7279    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7281    break 2
7282  fi
7283done
7284  done
7285IFS=$as_save_IFS
7286
7287  ;;
7288esac
7289fi
7290FIND=$ac_cv_path_FIND
7291if test -n "$FIND"; then
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7293$as_echo "$FIND" >&6; }
7294else
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7296$as_echo "no" >&6; }
7297fi
7298
7299
7300  test -n "$FIND" && break
7301done
7302
7303    else
7304      # If it succeeded, then it was overridden by the user. We will use it
7305      # for the tool.
7306
7307      # First remove it from the list of overridden variables, so we can test
7308      # for unknown variables in the end.
7309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7310
7311      # Check if the provided tool contains a complete path.
7312      tool_specified="$FIND"
7313      tool_basename="${tool_specified##*/}"
7314      if test "x$tool_basename" = "x$tool_specified"; then
7315        # A command without a complete path is provided, search $PATH.
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7317$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7318        # Extract the first word of "$tool_basename", so it can be a program name with args.
7319set dummy $tool_basename; ac_word=$2
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321$as_echo_n "checking for $ac_word... " >&6; }
7322if ${ac_cv_path_FIND+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $FIND in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7328  ;;
7329  *)
7330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333  IFS=$as_save_IFS
7334  test -z "$as_dir" && as_dir=.
7335    for ac_exec_ext in '' $ac_executable_extensions; do
7336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7337    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7339    break 2
7340  fi
7341done
7342  done
7343IFS=$as_save_IFS
7344
7345  ;;
7346esac
7347fi
7348FIND=$ac_cv_path_FIND
7349if test -n "$FIND"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7351$as_echo "$FIND" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358        if test "x$FIND" = x; then
7359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7360        fi
7361      else
7362        # Otherwise we believe it is a complete path. Use it as it is.
7363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7364$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7366$as_echo_n "checking for FIND... " >&6; }
7367        if test ! -x "$tool_specified"; then
7368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7369$as_echo "not found" >&6; }
7370          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7371        fi
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7373$as_echo "$tool_specified" >&6; }
7374      fi
7375    fi
7376  fi
7377
7378
7379
7380  if test "x$FIND" = x; then
7381    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7382  fi
7383
7384
7385
7386
7387
7388  # Publish this variable in the help.
7389
7390
7391  if test "x$HEAD" = x; then
7392    # The variable is not set by user, try to locate tool using the code snippet
7393    for ac_prog in head
7394do
7395  # Extract the first word of "$ac_prog", so it can be a program name with args.
7396set dummy $ac_prog; ac_word=$2
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7398$as_echo_n "checking for $ac_word... " >&6; }
7399if ${ac_cv_path_HEAD+:} false; then :
7400  $as_echo_n "(cached) " >&6
7401else
7402  case $HEAD in
7403  [\\/]* | ?:[\\/]*)
7404  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7405  ;;
7406  *)
7407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7408for as_dir in $PATH
7409do
7410  IFS=$as_save_IFS
7411  test -z "$as_dir" && as_dir=.
7412    for ac_exec_ext in '' $ac_executable_extensions; do
7413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7414    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7416    break 2
7417  fi
7418done
7419  done
7420IFS=$as_save_IFS
7421
7422  ;;
7423esac
7424fi
7425HEAD=$ac_cv_path_HEAD
7426if test -n "$HEAD"; then
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7428$as_echo "$HEAD" >&6; }
7429else
7430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7431$as_echo "no" >&6; }
7432fi
7433
7434
7435  test -n "$HEAD" && break
7436done
7437
7438  else
7439    # The variable is set, but is it from the command line or the environment?
7440
7441    # Try to remove the string !HEAD! from our list.
7442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7444      # If it failed, the variable was not from the command line. Ignore it,
7445      # but warn the user (except for BASH, which is always set by the calling BASH).
7446      if test "xHEAD" != xBASH; then
7447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7448$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7449      fi
7450      # Try to locate tool using the code snippet
7451      for ac_prog in head
7452do
7453  # Extract the first word of "$ac_prog", so it can be a program name with args.
7454set dummy $ac_prog; ac_word=$2
7455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7456$as_echo_n "checking for $ac_word... " >&6; }
7457if ${ac_cv_path_HEAD+:} false; then :
7458  $as_echo_n "(cached) " >&6
7459else
7460  case $HEAD in
7461  [\\/]* | ?:[\\/]*)
7462  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7463  ;;
7464  *)
7465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7466for as_dir in $PATH
7467do
7468  IFS=$as_save_IFS
7469  test -z "$as_dir" && as_dir=.
7470    for ac_exec_ext in '' $ac_executable_extensions; do
7471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7472    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7474    break 2
7475  fi
7476done
7477  done
7478IFS=$as_save_IFS
7479
7480  ;;
7481esac
7482fi
7483HEAD=$ac_cv_path_HEAD
7484if test -n "$HEAD"; then
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7486$as_echo "$HEAD" >&6; }
7487else
7488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
7490fi
7491
7492
7493  test -n "$HEAD" && break
7494done
7495
7496    else
7497      # If it succeeded, then it was overridden by the user. We will use it
7498      # for the tool.
7499
7500      # First remove it from the list of overridden variables, so we can test
7501      # for unknown variables in the end.
7502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7503
7504      # Check if the provided tool contains a complete path.
7505      tool_specified="$HEAD"
7506      tool_basename="${tool_specified##*/}"
7507      if test "x$tool_basename" = "x$tool_specified"; then
7508        # A command without a complete path is provided, search $PATH.
7509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7510$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7511        # Extract the first word of "$tool_basename", so it can be a program name with args.
7512set dummy $tool_basename; ac_word=$2
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7514$as_echo_n "checking for $ac_word... " >&6; }
7515if ${ac_cv_path_HEAD+:} false; then :
7516  $as_echo_n "(cached) " >&6
7517else
7518  case $HEAD in
7519  [\\/]* | ?:[\\/]*)
7520  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7521  ;;
7522  *)
7523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7524for as_dir in $PATH
7525do
7526  IFS=$as_save_IFS
7527  test -z "$as_dir" && as_dir=.
7528    for ac_exec_ext in '' $ac_executable_extensions; do
7529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7530    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7532    break 2
7533  fi
7534done
7535  done
7536IFS=$as_save_IFS
7537
7538  ;;
7539esac
7540fi
7541HEAD=$ac_cv_path_HEAD
7542if test -n "$HEAD"; then
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7544$as_echo "$HEAD" >&6; }
7545else
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
7548fi
7549
7550
7551        if test "x$HEAD" = x; then
7552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7553        fi
7554      else
7555        # Otherwise we believe it is a complete path. Use it as it is.
7556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7557$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7559$as_echo_n "checking for HEAD... " >&6; }
7560        if test ! -x "$tool_specified"; then
7561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7562$as_echo "not found" >&6; }
7563          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7564        fi
7565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7566$as_echo "$tool_specified" >&6; }
7567      fi
7568    fi
7569  fi
7570
7571
7572
7573  if test "x$HEAD" = x; then
7574    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7575  fi
7576
7577
7578
7579
7580
7581  # Publish this variable in the help.
7582
7583
7584  if test "x$LN" = x; then
7585    # The variable is not set by user, try to locate tool using the code snippet
7586    for ac_prog in ln
7587do
7588  # Extract the first word of "$ac_prog", so it can be a program name with args.
7589set dummy $ac_prog; ac_word=$2
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
7592if ${ac_cv_path_LN+:} false; then :
7593  $as_echo_n "(cached) " >&6
7594else
7595  case $LN in
7596  [\\/]* | ?:[\\/]*)
7597  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7598  ;;
7599  *)
7600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601for as_dir in $PATH
7602do
7603  IFS=$as_save_IFS
7604  test -z "$as_dir" && as_dir=.
7605    for ac_exec_ext in '' $ac_executable_extensions; do
7606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609    break 2
7610  fi
7611done
7612  done
7613IFS=$as_save_IFS
7614
7615  ;;
7616esac
7617fi
7618LN=$ac_cv_path_LN
7619if test -n "$LN"; then
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7621$as_echo "$LN" >&6; }
7622else
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
7625fi
7626
7627
7628  test -n "$LN" && break
7629done
7630
7631  else
7632    # The variable is set, but is it from the command line or the environment?
7633
7634    # Try to remove the string !LN! from our list.
7635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7637      # If it failed, the variable was not from the command line. Ignore it,
7638      # but warn the user (except for BASH, which is always set by the calling BASH).
7639      if test "xLN" != xBASH; then
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7641$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7642      fi
7643      # Try to locate tool using the code snippet
7644      for ac_prog in ln
7645do
7646  # Extract the first word of "$ac_prog", so it can be a program name with args.
7647set dummy $ac_prog; ac_word=$2
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7649$as_echo_n "checking for $ac_word... " >&6; }
7650if ${ac_cv_path_LN+:} false; then :
7651  $as_echo_n "(cached) " >&6
7652else
7653  case $LN in
7654  [\\/]* | ?:[\\/]*)
7655  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7656  ;;
7657  *)
7658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7659for as_dir in $PATH
7660do
7661  IFS=$as_save_IFS
7662  test -z "$as_dir" && as_dir=.
7663    for ac_exec_ext in '' $ac_executable_extensions; do
7664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7665    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7667    break 2
7668  fi
7669done
7670  done
7671IFS=$as_save_IFS
7672
7673  ;;
7674esac
7675fi
7676LN=$ac_cv_path_LN
7677if test -n "$LN"; then
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7679$as_echo "$LN" >&6; }
7680else
7681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7682$as_echo "no" >&6; }
7683fi
7684
7685
7686  test -n "$LN" && break
7687done
7688
7689    else
7690      # If it succeeded, then it was overridden by the user. We will use it
7691      # for the tool.
7692
7693      # First remove it from the list of overridden variables, so we can test
7694      # for unknown variables in the end.
7695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7696
7697      # Check if the provided tool contains a complete path.
7698      tool_specified="$LN"
7699      tool_basename="${tool_specified##*/}"
7700      if test "x$tool_basename" = "x$tool_specified"; then
7701        # A command without a complete path is provided, search $PATH.
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7703$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7704        # Extract the first word of "$tool_basename", so it can be a program name with args.
7705set dummy $tool_basename; ac_word=$2
7706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707$as_echo_n "checking for $ac_word... " >&6; }
7708if ${ac_cv_path_LN+:} false; then :
7709  $as_echo_n "(cached) " >&6
7710else
7711  case $LN in
7712  [\\/]* | ?:[\\/]*)
7713  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7714  ;;
7715  *)
7716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7717for as_dir in $PATH
7718do
7719  IFS=$as_save_IFS
7720  test -z "$as_dir" && as_dir=.
7721    for ac_exec_ext in '' $ac_executable_extensions; do
7722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7723    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7725    break 2
7726  fi
7727done
7728  done
7729IFS=$as_save_IFS
7730
7731  ;;
7732esac
7733fi
7734LN=$ac_cv_path_LN
7735if test -n "$LN"; then
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7737$as_echo "$LN" >&6; }
7738else
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
7741fi
7742
7743
7744        if test "x$LN" = x; then
7745          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7746        fi
7747      else
7748        # Otherwise we believe it is a complete path. Use it as it is.
7749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7750$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7752$as_echo_n "checking for LN... " >&6; }
7753        if test ! -x "$tool_specified"; then
7754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7755$as_echo "not found" >&6; }
7756          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7757        fi
7758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7759$as_echo "$tool_specified" >&6; }
7760      fi
7761    fi
7762  fi
7763
7764
7765
7766  if test "x$LN" = x; then
7767    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7768  fi
7769
7770
7771
7772
7773
7774  # Publish this variable in the help.
7775
7776
7777  if test "x$LS" = x; then
7778    # The variable is not set by user, try to locate tool using the code snippet
7779    for ac_prog in ls
7780do
7781  # Extract the first word of "$ac_prog", so it can be a program name with args.
7782set dummy $ac_prog; ac_word=$2
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7784$as_echo_n "checking for $ac_word... " >&6; }
7785if ${ac_cv_path_LS+:} false; then :
7786  $as_echo_n "(cached) " >&6
7787else
7788  case $LS in
7789  [\\/]* | ?:[\\/]*)
7790  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7791  ;;
7792  *)
7793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7794for as_dir in $PATH
7795do
7796  IFS=$as_save_IFS
7797  test -z "$as_dir" && as_dir=.
7798    for ac_exec_ext in '' $ac_executable_extensions; do
7799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7800    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7802    break 2
7803  fi
7804done
7805  done
7806IFS=$as_save_IFS
7807
7808  ;;
7809esac
7810fi
7811LS=$ac_cv_path_LS
7812if test -n "$LS"; then
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7814$as_echo "$LS" >&6; }
7815else
7816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7817$as_echo "no" >&6; }
7818fi
7819
7820
7821  test -n "$LS" && break
7822done
7823
7824  else
7825    # The variable is set, but is it from the command line or the environment?
7826
7827    # Try to remove the string !LS! from our list.
7828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7830      # If it failed, the variable was not from the command line. Ignore it,
7831      # but warn the user (except for BASH, which is always set by the calling BASH).
7832      if test "xLS" != xBASH; then
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7834$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7835      fi
7836      # Try to locate tool using the code snippet
7837      for ac_prog in ls
7838do
7839  # Extract the first word of "$ac_prog", so it can be a program name with args.
7840set dummy $ac_prog; ac_word=$2
7841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7842$as_echo_n "checking for $ac_word... " >&6; }
7843if ${ac_cv_path_LS+:} false; then :
7844  $as_echo_n "(cached) " >&6
7845else
7846  case $LS in
7847  [\\/]* | ?:[\\/]*)
7848  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7849  ;;
7850  *)
7851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7852for as_dir in $PATH
7853do
7854  IFS=$as_save_IFS
7855  test -z "$as_dir" && as_dir=.
7856    for ac_exec_ext in '' $ac_executable_extensions; do
7857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7858    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7860    break 2
7861  fi
7862done
7863  done
7864IFS=$as_save_IFS
7865
7866  ;;
7867esac
7868fi
7869LS=$ac_cv_path_LS
7870if test -n "$LS"; then
7871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7872$as_echo "$LS" >&6; }
7873else
7874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875$as_echo "no" >&6; }
7876fi
7877
7878
7879  test -n "$LS" && break
7880done
7881
7882    else
7883      # If it succeeded, then it was overridden by the user. We will use it
7884      # for the tool.
7885
7886      # First remove it from the list of overridden variables, so we can test
7887      # for unknown variables in the end.
7888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7889
7890      # Check if the provided tool contains a complete path.
7891      tool_specified="$LS"
7892      tool_basename="${tool_specified##*/}"
7893      if test "x$tool_basename" = "x$tool_specified"; then
7894        # A command without a complete path is provided, search $PATH.
7895        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7896$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7897        # Extract the first word of "$tool_basename", so it can be a program name with args.
7898set dummy $tool_basename; ac_word=$2
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900$as_echo_n "checking for $ac_word... " >&6; }
7901if ${ac_cv_path_LS+:} false; then :
7902  $as_echo_n "(cached) " >&6
7903else
7904  case $LS in
7905  [\\/]* | ?:[\\/]*)
7906  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7907  ;;
7908  *)
7909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910for as_dir in $PATH
7911do
7912  IFS=$as_save_IFS
7913  test -z "$as_dir" && as_dir=.
7914    for ac_exec_ext in '' $ac_executable_extensions; do
7915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7916    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918    break 2
7919  fi
7920done
7921  done
7922IFS=$as_save_IFS
7923
7924  ;;
7925esac
7926fi
7927LS=$ac_cv_path_LS
7928if test -n "$LS"; then
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7930$as_echo "$LS" >&6; }
7931else
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933$as_echo "no" >&6; }
7934fi
7935
7936
7937        if test "x$LS" = x; then
7938          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7939        fi
7940      else
7941        # Otherwise we believe it is a complete path. Use it as it is.
7942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7943$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7945$as_echo_n "checking for LS... " >&6; }
7946        if test ! -x "$tool_specified"; then
7947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7948$as_echo "not found" >&6; }
7949          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7950        fi
7951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7952$as_echo "$tool_specified" >&6; }
7953      fi
7954    fi
7955  fi
7956
7957
7958
7959  if test "x$LS" = x; then
7960    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7961  fi
7962
7963
7964
7965
7966
7967  # Publish this variable in the help.
7968
7969
7970  if test "x$MKDIR" = x; then
7971    # The variable is not set by user, try to locate tool using the code snippet
7972    for ac_prog in mkdir
7973do
7974  # Extract the first word of "$ac_prog", so it can be a program name with args.
7975set dummy $ac_prog; ac_word=$2
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7977$as_echo_n "checking for $ac_word... " >&6; }
7978if ${ac_cv_path_MKDIR+:} false; then :
7979  $as_echo_n "(cached) " >&6
7980else
7981  case $MKDIR in
7982  [\\/]* | ?:[\\/]*)
7983  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7984  ;;
7985  *)
7986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7987for as_dir in $PATH
7988do
7989  IFS=$as_save_IFS
7990  test -z "$as_dir" && as_dir=.
7991    for ac_exec_ext in '' $ac_executable_extensions; do
7992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7993    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7995    break 2
7996  fi
7997done
7998  done
7999IFS=$as_save_IFS
8000
8001  ;;
8002esac
8003fi
8004MKDIR=$ac_cv_path_MKDIR
8005if test -n "$MKDIR"; then
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8007$as_echo "$MKDIR" >&6; }
8008else
8009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8010$as_echo "no" >&6; }
8011fi
8012
8013
8014  test -n "$MKDIR" && break
8015done
8016
8017  else
8018    # The variable is set, but is it from the command line or the environment?
8019
8020    # Try to remove the string !MKDIR! from our list.
8021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8023      # If it failed, the variable was not from the command line. Ignore it,
8024      # but warn the user (except for BASH, which is always set by the calling BASH).
8025      if test "xMKDIR" != xBASH; then
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8027$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8028      fi
8029      # Try to locate tool using the code snippet
8030      for ac_prog in mkdir
8031do
8032  # Extract the first word of "$ac_prog", so it can be a program name with args.
8033set dummy $ac_prog; ac_word=$2
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8035$as_echo_n "checking for $ac_word... " >&6; }
8036if ${ac_cv_path_MKDIR+:} false; then :
8037  $as_echo_n "(cached) " >&6
8038else
8039  case $MKDIR in
8040  [\\/]* | ?:[\\/]*)
8041  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8042  ;;
8043  *)
8044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8045for as_dir in $PATH
8046do
8047  IFS=$as_save_IFS
8048  test -z "$as_dir" && as_dir=.
8049    for ac_exec_ext in '' $ac_executable_extensions; do
8050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8051    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8053    break 2
8054  fi
8055done
8056  done
8057IFS=$as_save_IFS
8058
8059  ;;
8060esac
8061fi
8062MKDIR=$ac_cv_path_MKDIR
8063if test -n "$MKDIR"; then
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8065$as_echo "$MKDIR" >&6; }
8066else
8067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8068$as_echo "no" >&6; }
8069fi
8070
8071
8072  test -n "$MKDIR" && break
8073done
8074
8075    else
8076      # If it succeeded, then it was overridden by the user. We will use it
8077      # for the tool.
8078
8079      # First remove it from the list of overridden variables, so we can test
8080      # for unknown variables in the end.
8081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8082
8083      # Check if the provided tool contains a complete path.
8084      tool_specified="$MKDIR"
8085      tool_basename="${tool_specified##*/}"
8086      if test "x$tool_basename" = "x$tool_specified"; then
8087        # A command without a complete path is provided, search $PATH.
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8089$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8090        # Extract the first word of "$tool_basename", so it can be a program name with args.
8091set dummy $tool_basename; ac_word=$2
8092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8093$as_echo_n "checking for $ac_word... " >&6; }
8094if ${ac_cv_path_MKDIR+:} false; then :
8095  $as_echo_n "(cached) " >&6
8096else
8097  case $MKDIR in
8098  [\\/]* | ?:[\\/]*)
8099  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8100  ;;
8101  *)
8102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8103for as_dir in $PATH
8104do
8105  IFS=$as_save_IFS
8106  test -z "$as_dir" && as_dir=.
8107    for ac_exec_ext in '' $ac_executable_extensions; do
8108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8109    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8111    break 2
8112  fi
8113done
8114  done
8115IFS=$as_save_IFS
8116
8117  ;;
8118esac
8119fi
8120MKDIR=$ac_cv_path_MKDIR
8121if test -n "$MKDIR"; then
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8123$as_echo "$MKDIR" >&6; }
8124else
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126$as_echo "no" >&6; }
8127fi
8128
8129
8130        if test "x$MKDIR" = x; then
8131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8132        fi
8133      else
8134        # Otherwise we believe it is a complete path. Use it as it is.
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8136$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8138$as_echo_n "checking for MKDIR... " >&6; }
8139        if test ! -x "$tool_specified"; then
8140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8141$as_echo "not found" >&6; }
8142          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8143        fi
8144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8145$as_echo "$tool_specified" >&6; }
8146      fi
8147    fi
8148  fi
8149
8150
8151
8152  if test "x$MKDIR" = x; then
8153    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8154  fi
8155
8156
8157
8158
8159
8160  # Publish this variable in the help.
8161
8162
8163  if test "x$MKTEMP" = x; then
8164    # The variable is not set by user, try to locate tool using the code snippet
8165    for ac_prog in mktemp
8166do
8167  # Extract the first word of "$ac_prog", so it can be a program name with args.
8168set dummy $ac_prog; ac_word=$2
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8170$as_echo_n "checking for $ac_word... " >&6; }
8171if ${ac_cv_path_MKTEMP+:} false; then :
8172  $as_echo_n "(cached) " >&6
8173else
8174  case $MKTEMP in
8175  [\\/]* | ?:[\\/]*)
8176  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8177  ;;
8178  *)
8179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8180for as_dir in $PATH
8181do
8182  IFS=$as_save_IFS
8183  test -z "$as_dir" && as_dir=.
8184    for ac_exec_ext in '' $ac_executable_extensions; do
8185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8186    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8188    break 2
8189  fi
8190done
8191  done
8192IFS=$as_save_IFS
8193
8194  ;;
8195esac
8196fi
8197MKTEMP=$ac_cv_path_MKTEMP
8198if test -n "$MKTEMP"; then
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8200$as_echo "$MKTEMP" >&6; }
8201else
8202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8203$as_echo "no" >&6; }
8204fi
8205
8206
8207  test -n "$MKTEMP" && break
8208done
8209
8210  else
8211    # The variable is set, but is it from the command line or the environment?
8212
8213    # Try to remove the string !MKTEMP! from our list.
8214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8216      # If it failed, the variable was not from the command line. Ignore it,
8217      # but warn the user (except for BASH, which is always set by the calling BASH).
8218      if test "xMKTEMP" != xBASH; then
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8220$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8221      fi
8222      # Try to locate tool using the code snippet
8223      for ac_prog in mktemp
8224do
8225  # Extract the first word of "$ac_prog", so it can be a program name with args.
8226set dummy $ac_prog; ac_word=$2
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228$as_echo_n "checking for $ac_word... " >&6; }
8229if ${ac_cv_path_MKTEMP+:} false; then :
8230  $as_echo_n "(cached) " >&6
8231else
8232  case $MKTEMP in
8233  [\\/]* | ?:[\\/]*)
8234  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8235  ;;
8236  *)
8237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  test -z "$as_dir" && as_dir=.
8242    for ac_exec_ext in '' $ac_executable_extensions; do
8243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8244    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8246    break 2
8247  fi
8248done
8249  done
8250IFS=$as_save_IFS
8251
8252  ;;
8253esac
8254fi
8255MKTEMP=$ac_cv_path_MKTEMP
8256if test -n "$MKTEMP"; then
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8258$as_echo "$MKTEMP" >&6; }
8259else
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8261$as_echo "no" >&6; }
8262fi
8263
8264
8265  test -n "$MKTEMP" && break
8266done
8267
8268    else
8269      # If it succeeded, then it was overridden by the user. We will use it
8270      # for the tool.
8271
8272      # First remove it from the list of overridden variables, so we can test
8273      # for unknown variables in the end.
8274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8275
8276      # Check if the provided tool contains a complete path.
8277      tool_specified="$MKTEMP"
8278      tool_basename="${tool_specified##*/}"
8279      if test "x$tool_basename" = "x$tool_specified"; then
8280        # A command without a complete path is provided, search $PATH.
8281        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8282$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8283        # Extract the first word of "$tool_basename", so it can be a program name with args.
8284set dummy $tool_basename; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_MKTEMP+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $MKTEMP in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313MKTEMP=$ac_cv_path_MKTEMP
8314if test -n "$MKTEMP"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8316$as_echo "$MKTEMP" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323        if test "x$MKTEMP" = x; then
8324          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8325        fi
8326      else
8327        # Otherwise we believe it is a complete path. Use it as it is.
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8329$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8331$as_echo_n "checking for MKTEMP... " >&6; }
8332        if test ! -x "$tool_specified"; then
8333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8334$as_echo "not found" >&6; }
8335          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8336        fi
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8338$as_echo "$tool_specified" >&6; }
8339      fi
8340    fi
8341  fi
8342
8343
8344
8345  if test "x$MKTEMP" = x; then
8346    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8347  fi
8348
8349
8350
8351
8352
8353  # Publish this variable in the help.
8354
8355
8356  if test "x$MV" = x; then
8357    # The variable is not set by user, try to locate tool using the code snippet
8358    for ac_prog in mv
8359do
8360  # Extract the first word of "$ac_prog", so it can be a program name with args.
8361set dummy $ac_prog; ac_word=$2
8362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8363$as_echo_n "checking for $ac_word... " >&6; }
8364if ${ac_cv_path_MV+:} false; then :
8365  $as_echo_n "(cached) " >&6
8366else
8367  case $MV in
8368  [\\/]* | ?:[\\/]*)
8369  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8370  ;;
8371  *)
8372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8373for as_dir in $PATH
8374do
8375  IFS=$as_save_IFS
8376  test -z "$as_dir" && as_dir=.
8377    for ac_exec_ext in '' $ac_executable_extensions; do
8378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8379    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8381    break 2
8382  fi
8383done
8384  done
8385IFS=$as_save_IFS
8386
8387  ;;
8388esac
8389fi
8390MV=$ac_cv_path_MV
8391if test -n "$MV"; then
8392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8393$as_echo "$MV" >&6; }
8394else
8395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396$as_echo "no" >&6; }
8397fi
8398
8399
8400  test -n "$MV" && break
8401done
8402
8403  else
8404    # The variable is set, but is it from the command line or the environment?
8405
8406    # Try to remove the string !MV! from our list.
8407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8409      # If it failed, the variable was not from the command line. Ignore it,
8410      # but warn the user (except for BASH, which is always set by the calling BASH).
8411      if test "xMV" != xBASH; then
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8413$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8414      fi
8415      # Try to locate tool using the code snippet
8416      for ac_prog in mv
8417do
8418  # Extract the first word of "$ac_prog", so it can be a program name with args.
8419set dummy $ac_prog; ac_word=$2
8420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8421$as_echo_n "checking for $ac_word... " >&6; }
8422if ${ac_cv_path_MV+:} false; then :
8423  $as_echo_n "(cached) " >&6
8424else
8425  case $MV in
8426  [\\/]* | ?:[\\/]*)
8427  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8428  ;;
8429  *)
8430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8431for as_dir in $PATH
8432do
8433  IFS=$as_save_IFS
8434  test -z "$as_dir" && as_dir=.
8435    for ac_exec_ext in '' $ac_executable_extensions; do
8436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8437    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8439    break 2
8440  fi
8441done
8442  done
8443IFS=$as_save_IFS
8444
8445  ;;
8446esac
8447fi
8448MV=$ac_cv_path_MV
8449if test -n "$MV"; then
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8451$as_echo "$MV" >&6; }
8452else
8453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454$as_echo "no" >&6; }
8455fi
8456
8457
8458  test -n "$MV" && break
8459done
8460
8461    else
8462      # If it succeeded, then it was overridden by the user. We will use it
8463      # for the tool.
8464
8465      # First remove it from the list of overridden variables, so we can test
8466      # for unknown variables in the end.
8467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8468
8469      # Check if the provided tool contains a complete path.
8470      tool_specified="$MV"
8471      tool_basename="${tool_specified##*/}"
8472      if test "x$tool_basename" = "x$tool_specified"; then
8473        # A command without a complete path is provided, search $PATH.
8474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8475$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8476        # Extract the first word of "$tool_basename", so it can be a program name with args.
8477set dummy $tool_basename; ac_word=$2
8478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8479$as_echo_n "checking for $ac_word... " >&6; }
8480if ${ac_cv_path_MV+:} false; then :
8481  $as_echo_n "(cached) " >&6
8482else
8483  case $MV in
8484  [\\/]* | ?:[\\/]*)
8485  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8486  ;;
8487  *)
8488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8489for as_dir in $PATH
8490do
8491  IFS=$as_save_IFS
8492  test -z "$as_dir" && as_dir=.
8493    for ac_exec_ext in '' $ac_executable_extensions; do
8494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8495    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8497    break 2
8498  fi
8499done
8500  done
8501IFS=$as_save_IFS
8502
8503  ;;
8504esac
8505fi
8506MV=$ac_cv_path_MV
8507if test -n "$MV"; then
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8509$as_echo "$MV" >&6; }
8510else
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
8513fi
8514
8515
8516        if test "x$MV" = x; then
8517          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8518        fi
8519      else
8520        # Otherwise we believe it is a complete path. Use it as it is.
8521        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8522$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8524$as_echo_n "checking for MV... " >&6; }
8525        if test ! -x "$tool_specified"; then
8526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8527$as_echo "not found" >&6; }
8528          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8529        fi
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8531$as_echo "$tool_specified" >&6; }
8532      fi
8533    fi
8534  fi
8535
8536
8537
8538  if test "x$MV" = x; then
8539    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8540  fi
8541
8542
8543
8544
8545
8546  # Publish this variable in the help.
8547
8548
8549  if test "x$NAWK" = x; then
8550    # The variable is not set by user, try to locate tool using the code snippet
8551    for ac_prog in nawk gawk awk
8552do
8553  # Extract the first word of "$ac_prog", so it can be a program name with args.
8554set dummy $ac_prog; ac_word=$2
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if ${ac_cv_path_NAWK+:} false; then :
8558  $as_echo_n "(cached) " >&6
8559else
8560  case $NAWK in
8561  [\\/]* | ?:[\\/]*)
8562  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8563  ;;
8564  *)
8565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568  IFS=$as_save_IFS
8569  test -z "$as_dir" && as_dir=.
8570    for ac_exec_ext in '' $ac_executable_extensions; do
8571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574    break 2
8575  fi
8576done
8577  done
8578IFS=$as_save_IFS
8579
8580  ;;
8581esac
8582fi
8583NAWK=$ac_cv_path_NAWK
8584if test -n "$NAWK"; then
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8586$as_echo "$NAWK" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591
8592
8593  test -n "$NAWK" && break
8594done
8595
8596  else
8597    # The variable is set, but is it from the command line or the environment?
8598
8599    # Try to remove the string !NAWK! from our list.
8600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8602      # If it failed, the variable was not from the command line. Ignore it,
8603      # but warn the user (except for BASH, which is always set by the calling BASH).
8604      if test "xNAWK" != xBASH; then
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8606$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8607      fi
8608      # Try to locate tool using the code snippet
8609      for ac_prog in nawk gawk awk
8610do
8611  # Extract the first word of "$ac_prog", so it can be a program name with args.
8612set dummy $ac_prog; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
8615if ${ac_cv_path_NAWK+:} false; then :
8616  $as_echo_n "(cached) " >&6
8617else
8618  case $NAWK in
8619  [\\/]* | ?:[\\/]*)
8620  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8621  ;;
8622  *)
8623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH
8625do
8626  IFS=$as_save_IFS
8627  test -z "$as_dir" && as_dir=.
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8630    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632    break 2
8633  fi
8634done
8635  done
8636IFS=$as_save_IFS
8637
8638  ;;
8639esac
8640fi
8641NAWK=$ac_cv_path_NAWK
8642if test -n "$NAWK"; then
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8644$as_echo "$NAWK" >&6; }
8645else
8646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648fi
8649
8650
8651  test -n "$NAWK" && break
8652done
8653
8654    else
8655      # If it succeeded, then it was overridden by the user. We will use it
8656      # for the tool.
8657
8658      # First remove it from the list of overridden variables, so we can test
8659      # for unknown variables in the end.
8660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8661
8662      # Check if the provided tool contains a complete path.
8663      tool_specified="$NAWK"
8664      tool_basename="${tool_specified##*/}"
8665      if test "x$tool_basename" = "x$tool_specified"; then
8666        # A command without a complete path is provided, search $PATH.
8667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8668$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8669        # Extract the first word of "$tool_basename", so it can be a program name with args.
8670set dummy $tool_basename; ac_word=$2
8671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672$as_echo_n "checking for $ac_word... " >&6; }
8673if ${ac_cv_path_NAWK+:} false; then :
8674  $as_echo_n "(cached) " >&6
8675else
8676  case $NAWK in
8677  [\\/]* | ?:[\\/]*)
8678  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8679  ;;
8680  *)
8681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8682for as_dir in $PATH
8683do
8684  IFS=$as_save_IFS
8685  test -z "$as_dir" && as_dir=.
8686    for ac_exec_ext in '' $ac_executable_extensions; do
8687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8688    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8690    break 2
8691  fi
8692done
8693  done
8694IFS=$as_save_IFS
8695
8696  ;;
8697esac
8698fi
8699NAWK=$ac_cv_path_NAWK
8700if test -n "$NAWK"; then
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8702$as_echo "$NAWK" >&6; }
8703else
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705$as_echo "no" >&6; }
8706fi
8707
8708
8709        if test "x$NAWK" = x; then
8710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8711        fi
8712      else
8713        # Otherwise we believe it is a complete path. Use it as it is.
8714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8715$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8717$as_echo_n "checking for NAWK... " >&6; }
8718        if test ! -x "$tool_specified"; then
8719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8720$as_echo "not found" >&6; }
8721          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8722        fi
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8724$as_echo "$tool_specified" >&6; }
8725      fi
8726    fi
8727  fi
8728
8729
8730
8731  if test "x$NAWK" = x; then
8732    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8733  fi
8734
8735
8736
8737
8738
8739  # Publish this variable in the help.
8740
8741
8742  if test "x$PRINTF" = x; then
8743    # The variable is not set by user, try to locate tool using the code snippet
8744    for ac_prog in printf
8745do
8746  # Extract the first word of "$ac_prog", so it can be a program name with args.
8747set dummy $ac_prog; ac_word=$2
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749$as_echo_n "checking for $ac_word... " >&6; }
8750if ${ac_cv_path_PRINTF+:} false; then :
8751  $as_echo_n "(cached) " >&6
8752else
8753  case $PRINTF in
8754  [\\/]* | ?:[\\/]*)
8755  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8756  ;;
8757  *)
8758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8759for as_dir in $PATH
8760do
8761  IFS=$as_save_IFS
8762  test -z "$as_dir" && as_dir=.
8763    for ac_exec_ext in '' $ac_executable_extensions; do
8764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8765    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8767    break 2
8768  fi
8769done
8770  done
8771IFS=$as_save_IFS
8772
8773  ;;
8774esac
8775fi
8776PRINTF=$ac_cv_path_PRINTF
8777if test -n "$PRINTF"; then
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8779$as_echo "$PRINTF" >&6; }
8780else
8781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782$as_echo "no" >&6; }
8783fi
8784
8785
8786  test -n "$PRINTF" && break
8787done
8788
8789  else
8790    # The variable is set, but is it from the command line or the environment?
8791
8792    # Try to remove the string !PRINTF! from our list.
8793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8795      # If it failed, the variable was not from the command line. Ignore it,
8796      # but warn the user (except for BASH, which is always set by the calling BASH).
8797      if test "xPRINTF" != xBASH; then
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8799$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8800      fi
8801      # Try to locate tool using the code snippet
8802      for ac_prog in printf
8803do
8804  # Extract the first word of "$ac_prog", so it can be a program name with args.
8805set dummy $ac_prog; ac_word=$2
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8807$as_echo_n "checking for $ac_word... " >&6; }
8808if ${ac_cv_path_PRINTF+:} false; then :
8809  $as_echo_n "(cached) " >&6
8810else
8811  case $PRINTF in
8812  [\\/]* | ?:[\\/]*)
8813  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8814  ;;
8815  *)
8816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8817for as_dir in $PATH
8818do
8819  IFS=$as_save_IFS
8820  test -z "$as_dir" && as_dir=.
8821    for ac_exec_ext in '' $ac_executable_extensions; do
8822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8823    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8825    break 2
8826  fi
8827done
8828  done
8829IFS=$as_save_IFS
8830
8831  ;;
8832esac
8833fi
8834PRINTF=$ac_cv_path_PRINTF
8835if test -n "$PRINTF"; then
8836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8837$as_echo "$PRINTF" >&6; }
8838else
8839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8840$as_echo "no" >&6; }
8841fi
8842
8843
8844  test -n "$PRINTF" && break
8845done
8846
8847    else
8848      # If it succeeded, then it was overridden by the user. We will use it
8849      # for the tool.
8850
8851      # First remove it from the list of overridden variables, so we can test
8852      # for unknown variables in the end.
8853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8854
8855      # Check if the provided tool contains a complete path.
8856      tool_specified="$PRINTF"
8857      tool_basename="${tool_specified##*/}"
8858      if test "x$tool_basename" = "x$tool_specified"; then
8859        # A command without a complete path is provided, search $PATH.
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8861$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8862        # Extract the first word of "$tool_basename", so it can be a program name with args.
8863set dummy $tool_basename; ac_word=$2
8864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8865$as_echo_n "checking for $ac_word... " >&6; }
8866if ${ac_cv_path_PRINTF+:} false; then :
8867  $as_echo_n "(cached) " >&6
8868else
8869  case $PRINTF in
8870  [\\/]* | ?:[\\/]*)
8871  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8872  ;;
8873  *)
8874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8875for as_dir in $PATH
8876do
8877  IFS=$as_save_IFS
8878  test -z "$as_dir" && as_dir=.
8879    for ac_exec_ext in '' $ac_executable_extensions; do
8880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8881    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8883    break 2
8884  fi
8885done
8886  done
8887IFS=$as_save_IFS
8888
8889  ;;
8890esac
8891fi
8892PRINTF=$ac_cv_path_PRINTF
8893if test -n "$PRINTF"; then
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8895$as_echo "$PRINTF" >&6; }
8896else
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898$as_echo "no" >&6; }
8899fi
8900
8901
8902        if test "x$PRINTF" = x; then
8903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8904        fi
8905      else
8906        # Otherwise we believe it is a complete path. Use it as it is.
8907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8908$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8910$as_echo_n "checking for PRINTF... " >&6; }
8911        if test ! -x "$tool_specified"; then
8912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8913$as_echo "not found" >&6; }
8914          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8915        fi
8916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8917$as_echo "$tool_specified" >&6; }
8918      fi
8919    fi
8920  fi
8921
8922
8923
8924  if test "x$PRINTF" = x; then
8925    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8926  fi
8927
8928
8929
8930
8931
8932  # Publish this variable in the help.
8933
8934
8935  if test "x$RM" = x; then
8936    # The variable is not set by user, try to locate tool using the code snippet
8937    for ac_prog in rm
8938do
8939  # Extract the first word of "$ac_prog", so it can be a program name with args.
8940set dummy $ac_prog; ac_word=$2
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8942$as_echo_n "checking for $ac_word... " >&6; }
8943if ${ac_cv_path_RM+:} false; then :
8944  $as_echo_n "(cached) " >&6
8945else
8946  case $RM in
8947  [\\/]* | ?:[\\/]*)
8948  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8949  ;;
8950  *)
8951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8952for as_dir in $PATH
8953do
8954  IFS=$as_save_IFS
8955  test -z "$as_dir" && as_dir=.
8956    for ac_exec_ext in '' $ac_executable_extensions; do
8957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8958    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8960    break 2
8961  fi
8962done
8963  done
8964IFS=$as_save_IFS
8965
8966  ;;
8967esac
8968fi
8969RM=$ac_cv_path_RM
8970if test -n "$RM"; then
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8972$as_echo "$RM" >&6; }
8973else
8974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
8976fi
8977
8978
8979  test -n "$RM" && break
8980done
8981
8982  else
8983    # The variable is set, but is it from the command line or the environment?
8984
8985    # Try to remove the string !RM! from our list.
8986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8988      # If it failed, the variable was not from the command line. Ignore it,
8989      # but warn the user (except for BASH, which is always set by the calling BASH).
8990      if test "xRM" != xBASH; then
8991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8992$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8993      fi
8994      # Try to locate tool using the code snippet
8995      for ac_prog in rm
8996do
8997  # Extract the first word of "$ac_prog", so it can be a program name with args.
8998set dummy $ac_prog; ac_word=$2
8999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9000$as_echo_n "checking for $ac_word... " >&6; }
9001if ${ac_cv_path_RM+:} false; then :
9002  $as_echo_n "(cached) " >&6
9003else
9004  case $RM in
9005  [\\/]* | ?:[\\/]*)
9006  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9007  ;;
9008  *)
9009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9010for as_dir in $PATH
9011do
9012  IFS=$as_save_IFS
9013  test -z "$as_dir" && as_dir=.
9014    for ac_exec_ext in '' $ac_executable_extensions; do
9015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9016    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9018    break 2
9019  fi
9020done
9021  done
9022IFS=$as_save_IFS
9023
9024  ;;
9025esac
9026fi
9027RM=$ac_cv_path_RM
9028if test -n "$RM"; then
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9030$as_echo "$RM" >&6; }
9031else
9032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
9034fi
9035
9036
9037  test -n "$RM" && break
9038done
9039
9040    else
9041      # If it succeeded, then it was overridden by the user. We will use it
9042      # for the tool.
9043
9044      # First remove it from the list of overridden variables, so we can test
9045      # for unknown variables in the end.
9046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9047
9048      # Check if the provided tool contains a complete path.
9049      tool_specified="$RM"
9050      tool_basename="${tool_specified##*/}"
9051      if test "x$tool_basename" = "x$tool_specified"; then
9052        # A command without a complete path is provided, search $PATH.
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9054$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9055        # Extract the first word of "$tool_basename", so it can be a program name with args.
9056set dummy $tool_basename; ac_word=$2
9057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9058$as_echo_n "checking for $ac_word... " >&6; }
9059if ${ac_cv_path_RM+:} false; then :
9060  $as_echo_n "(cached) " >&6
9061else
9062  case $RM in
9063  [\\/]* | ?:[\\/]*)
9064  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9065  ;;
9066  *)
9067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068for as_dir in $PATH
9069do
9070  IFS=$as_save_IFS
9071  test -z "$as_dir" && as_dir=.
9072    for ac_exec_ext in '' $ac_executable_extensions; do
9073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076    break 2
9077  fi
9078done
9079  done
9080IFS=$as_save_IFS
9081
9082  ;;
9083esac
9084fi
9085RM=$ac_cv_path_RM
9086if test -n "$RM"; then
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9088$as_echo "$RM" >&6; }
9089else
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092fi
9093
9094
9095        if test "x$RM" = x; then
9096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9097        fi
9098      else
9099        # Otherwise we believe it is a complete path. Use it as it is.
9100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9101$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9103$as_echo_n "checking for RM... " >&6; }
9104        if test ! -x "$tool_specified"; then
9105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9106$as_echo "not found" >&6; }
9107          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9108        fi
9109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9110$as_echo "$tool_specified" >&6; }
9111      fi
9112    fi
9113  fi
9114
9115
9116
9117  if test "x$RM" = x; then
9118    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9119  fi
9120
9121
9122
9123
9124
9125  # Publish this variable in the help.
9126
9127
9128  if test "x$SH" = x; then
9129    # The variable is not set by user, try to locate tool using the code snippet
9130    for ac_prog in sh
9131do
9132  # Extract the first word of "$ac_prog", so it can be a program name with args.
9133set dummy $ac_prog; ac_word=$2
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135$as_echo_n "checking for $ac_word... " >&6; }
9136if ${ac_cv_path_SH+:} false; then :
9137  $as_echo_n "(cached) " >&6
9138else
9139  case $SH in
9140  [\\/]* | ?:[\\/]*)
9141  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9142  ;;
9143  *)
9144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9145for as_dir in $PATH
9146do
9147  IFS=$as_save_IFS
9148  test -z "$as_dir" && as_dir=.
9149    for ac_exec_ext in '' $ac_executable_extensions; do
9150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9151    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9153    break 2
9154  fi
9155done
9156  done
9157IFS=$as_save_IFS
9158
9159  ;;
9160esac
9161fi
9162SH=$ac_cv_path_SH
9163if test -n "$SH"; then
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9165$as_echo "$SH" >&6; }
9166else
9167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
9169fi
9170
9171
9172  test -n "$SH" && break
9173done
9174
9175  else
9176    # The variable is set, but is it from the command line or the environment?
9177
9178    # Try to remove the string !SH! from our list.
9179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9181      # If it failed, the variable was not from the command line. Ignore it,
9182      # but warn the user (except for BASH, which is always set by the calling BASH).
9183      if test "xSH" != xBASH; then
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9185$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9186      fi
9187      # Try to locate tool using the code snippet
9188      for ac_prog in sh
9189do
9190  # Extract the first word of "$ac_prog", so it can be a program name with args.
9191set dummy $ac_prog; ac_word=$2
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9193$as_echo_n "checking for $ac_word... " >&6; }
9194if ${ac_cv_path_SH+:} false; then :
9195  $as_echo_n "(cached) " >&6
9196else
9197  case $SH in
9198  [\\/]* | ?:[\\/]*)
9199  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9200  ;;
9201  *)
9202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9203for as_dir in $PATH
9204do
9205  IFS=$as_save_IFS
9206  test -z "$as_dir" && as_dir=.
9207    for ac_exec_ext in '' $ac_executable_extensions; do
9208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9209    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9211    break 2
9212  fi
9213done
9214  done
9215IFS=$as_save_IFS
9216
9217  ;;
9218esac
9219fi
9220SH=$ac_cv_path_SH
9221if test -n "$SH"; then
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9223$as_echo "$SH" >&6; }
9224else
9225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9226$as_echo "no" >&6; }
9227fi
9228
9229
9230  test -n "$SH" && break
9231done
9232
9233    else
9234      # If it succeeded, then it was overridden by the user. We will use it
9235      # for the tool.
9236
9237      # First remove it from the list of overridden variables, so we can test
9238      # for unknown variables in the end.
9239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9240
9241      # Check if the provided tool contains a complete path.
9242      tool_specified="$SH"
9243      tool_basename="${tool_specified##*/}"
9244      if test "x$tool_basename" = "x$tool_specified"; then
9245        # A command without a complete path is provided, search $PATH.
9246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9247$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9248        # Extract the first word of "$tool_basename", so it can be a program name with args.
9249set dummy $tool_basename; ac_word=$2
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9251$as_echo_n "checking for $ac_word... " >&6; }
9252if ${ac_cv_path_SH+:} false; then :
9253  $as_echo_n "(cached) " >&6
9254else
9255  case $SH in
9256  [\\/]* | ?:[\\/]*)
9257  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9258  ;;
9259  *)
9260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9261for as_dir in $PATH
9262do
9263  IFS=$as_save_IFS
9264  test -z "$as_dir" && as_dir=.
9265    for ac_exec_ext in '' $ac_executable_extensions; do
9266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9267    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9269    break 2
9270  fi
9271done
9272  done
9273IFS=$as_save_IFS
9274
9275  ;;
9276esac
9277fi
9278SH=$ac_cv_path_SH
9279if test -n "$SH"; then
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9281$as_echo "$SH" >&6; }
9282else
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
9285fi
9286
9287
9288        if test "x$SH" = x; then
9289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9290        fi
9291      else
9292        # Otherwise we believe it is a complete path. Use it as it is.
9293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9294$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9296$as_echo_n "checking for SH... " >&6; }
9297        if test ! -x "$tool_specified"; then
9298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9299$as_echo "not found" >&6; }
9300          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9301        fi
9302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9303$as_echo "$tool_specified" >&6; }
9304      fi
9305    fi
9306  fi
9307
9308
9309
9310  if test "x$SH" = x; then
9311    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9312  fi
9313
9314
9315
9316
9317
9318  # Publish this variable in the help.
9319
9320
9321  if test "x$SORT" = x; then
9322    # The variable is not set by user, try to locate tool using the code snippet
9323    for ac_prog in sort
9324do
9325  # Extract the first word of "$ac_prog", so it can be a program name with args.
9326set dummy $ac_prog; ac_word=$2
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9328$as_echo_n "checking for $ac_word... " >&6; }
9329if ${ac_cv_path_SORT+:} false; then :
9330  $as_echo_n "(cached) " >&6
9331else
9332  case $SORT in
9333  [\\/]* | ?:[\\/]*)
9334  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9335  ;;
9336  *)
9337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9338for as_dir in $PATH
9339do
9340  IFS=$as_save_IFS
9341  test -z "$as_dir" && as_dir=.
9342    for ac_exec_ext in '' $ac_executable_extensions; do
9343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9344    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9346    break 2
9347  fi
9348done
9349  done
9350IFS=$as_save_IFS
9351
9352  ;;
9353esac
9354fi
9355SORT=$ac_cv_path_SORT
9356if test -n "$SORT"; then
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9358$as_echo "$SORT" >&6; }
9359else
9360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361$as_echo "no" >&6; }
9362fi
9363
9364
9365  test -n "$SORT" && break
9366done
9367
9368  else
9369    # The variable is set, but is it from the command line or the environment?
9370
9371    # Try to remove the string !SORT! from our list.
9372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9374      # If it failed, the variable was not from the command line. Ignore it,
9375      # but warn the user (except for BASH, which is always set by the calling BASH).
9376      if test "xSORT" != xBASH; then
9377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9378$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9379      fi
9380      # Try to locate tool using the code snippet
9381      for ac_prog in sort
9382do
9383  # Extract the first word of "$ac_prog", so it can be a program name with args.
9384set dummy $ac_prog; ac_word=$2
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9386$as_echo_n "checking for $ac_word... " >&6; }
9387if ${ac_cv_path_SORT+:} false; then :
9388  $as_echo_n "(cached) " >&6
9389else
9390  case $SORT in
9391  [\\/]* | ?:[\\/]*)
9392  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9393  ;;
9394  *)
9395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396for as_dir in $PATH
9397do
9398  IFS=$as_save_IFS
9399  test -z "$as_dir" && as_dir=.
9400    for ac_exec_ext in '' $ac_executable_extensions; do
9401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9402    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9404    break 2
9405  fi
9406done
9407  done
9408IFS=$as_save_IFS
9409
9410  ;;
9411esac
9412fi
9413SORT=$ac_cv_path_SORT
9414if test -n "$SORT"; then
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9416$as_echo "$SORT" >&6; }
9417else
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419$as_echo "no" >&6; }
9420fi
9421
9422
9423  test -n "$SORT" && break
9424done
9425
9426    else
9427      # If it succeeded, then it was overridden by the user. We will use it
9428      # for the tool.
9429
9430      # First remove it from the list of overridden variables, so we can test
9431      # for unknown variables in the end.
9432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9433
9434      # Check if the provided tool contains a complete path.
9435      tool_specified="$SORT"
9436      tool_basename="${tool_specified##*/}"
9437      if test "x$tool_basename" = "x$tool_specified"; then
9438        # A command without a complete path is provided, search $PATH.
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9440$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9441        # Extract the first word of "$tool_basename", so it can be a program name with args.
9442set dummy $tool_basename; ac_word=$2
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444$as_echo_n "checking for $ac_word... " >&6; }
9445if ${ac_cv_path_SORT+:} false; then :
9446  $as_echo_n "(cached) " >&6
9447else
9448  case $SORT in
9449  [\\/]* | ?:[\\/]*)
9450  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9451  ;;
9452  *)
9453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9454for as_dir in $PATH
9455do
9456  IFS=$as_save_IFS
9457  test -z "$as_dir" && as_dir=.
9458    for ac_exec_ext in '' $ac_executable_extensions; do
9459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9460    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9462    break 2
9463  fi
9464done
9465  done
9466IFS=$as_save_IFS
9467
9468  ;;
9469esac
9470fi
9471SORT=$ac_cv_path_SORT
9472if test -n "$SORT"; then
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9474$as_echo "$SORT" >&6; }
9475else
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478fi
9479
9480
9481        if test "x$SORT" = x; then
9482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9483        fi
9484      else
9485        # Otherwise we believe it is a complete path. Use it as it is.
9486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9487$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9489$as_echo_n "checking for SORT... " >&6; }
9490        if test ! -x "$tool_specified"; then
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9492$as_echo "not found" >&6; }
9493          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9494        fi
9495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9496$as_echo "$tool_specified" >&6; }
9497      fi
9498    fi
9499  fi
9500
9501
9502
9503  if test "x$SORT" = x; then
9504    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9505  fi
9506
9507
9508
9509
9510
9511  # Publish this variable in the help.
9512
9513
9514  if test "x$TAIL" = x; then
9515    # The variable is not set by user, try to locate tool using the code snippet
9516    for ac_prog in tail
9517do
9518  # Extract the first word of "$ac_prog", so it can be a program name with args.
9519set dummy $ac_prog; ac_word=$2
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9521$as_echo_n "checking for $ac_word... " >&6; }
9522if ${ac_cv_path_TAIL+:} false; then :
9523  $as_echo_n "(cached) " >&6
9524else
9525  case $TAIL in
9526  [\\/]* | ?:[\\/]*)
9527  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9528  ;;
9529  *)
9530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9531for as_dir in $PATH
9532do
9533  IFS=$as_save_IFS
9534  test -z "$as_dir" && as_dir=.
9535    for ac_exec_ext in '' $ac_executable_extensions; do
9536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9537    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9539    break 2
9540  fi
9541done
9542  done
9543IFS=$as_save_IFS
9544
9545  ;;
9546esac
9547fi
9548TAIL=$ac_cv_path_TAIL
9549if test -n "$TAIL"; then
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9551$as_echo "$TAIL" >&6; }
9552else
9553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
9555fi
9556
9557
9558  test -n "$TAIL" && break
9559done
9560
9561  else
9562    # The variable is set, but is it from the command line or the environment?
9563
9564    # Try to remove the string !TAIL! from our list.
9565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9567      # If it failed, the variable was not from the command line. Ignore it,
9568      # but warn the user (except for BASH, which is always set by the calling BASH).
9569      if test "xTAIL" != xBASH; then
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9571$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9572      fi
9573      # Try to locate tool using the code snippet
9574      for ac_prog in tail
9575do
9576  # Extract the first word of "$ac_prog", so it can be a program name with args.
9577set dummy $ac_prog; ac_word=$2
9578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9579$as_echo_n "checking for $ac_word... " >&6; }
9580if ${ac_cv_path_TAIL+:} false; then :
9581  $as_echo_n "(cached) " >&6
9582else
9583  case $TAIL in
9584  [\\/]* | ?:[\\/]*)
9585  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9586  ;;
9587  *)
9588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9589for as_dir in $PATH
9590do
9591  IFS=$as_save_IFS
9592  test -z "$as_dir" && as_dir=.
9593    for ac_exec_ext in '' $ac_executable_extensions; do
9594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9595    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9597    break 2
9598  fi
9599done
9600  done
9601IFS=$as_save_IFS
9602
9603  ;;
9604esac
9605fi
9606TAIL=$ac_cv_path_TAIL
9607if test -n "$TAIL"; then
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9609$as_echo "$TAIL" >&6; }
9610else
9611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9612$as_echo "no" >&6; }
9613fi
9614
9615
9616  test -n "$TAIL" && break
9617done
9618
9619    else
9620      # If it succeeded, then it was overridden by the user. We will use it
9621      # for the tool.
9622
9623      # First remove it from the list of overridden variables, so we can test
9624      # for unknown variables in the end.
9625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9626
9627      # Check if the provided tool contains a complete path.
9628      tool_specified="$TAIL"
9629      tool_basename="${tool_specified##*/}"
9630      if test "x$tool_basename" = "x$tool_specified"; then
9631        # A command without a complete path is provided, search $PATH.
9632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9633$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9634        # Extract the first word of "$tool_basename", so it can be a program name with args.
9635set dummy $tool_basename; ac_word=$2
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9637$as_echo_n "checking for $ac_word... " >&6; }
9638if ${ac_cv_path_TAIL+:} false; then :
9639  $as_echo_n "(cached) " >&6
9640else
9641  case $TAIL in
9642  [\\/]* | ?:[\\/]*)
9643  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9644  ;;
9645  *)
9646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647for as_dir in $PATH
9648do
9649  IFS=$as_save_IFS
9650  test -z "$as_dir" && as_dir=.
9651    for ac_exec_ext in '' $ac_executable_extensions; do
9652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9653    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9655    break 2
9656  fi
9657done
9658  done
9659IFS=$as_save_IFS
9660
9661  ;;
9662esac
9663fi
9664TAIL=$ac_cv_path_TAIL
9665if test -n "$TAIL"; then
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9667$as_echo "$TAIL" >&6; }
9668else
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
9671fi
9672
9673
9674        if test "x$TAIL" = x; then
9675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9676        fi
9677      else
9678        # Otherwise we believe it is a complete path. Use it as it is.
9679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9680$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9682$as_echo_n "checking for TAIL... " >&6; }
9683        if test ! -x "$tool_specified"; then
9684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9685$as_echo "not found" >&6; }
9686          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9687        fi
9688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9689$as_echo "$tool_specified" >&6; }
9690      fi
9691    fi
9692  fi
9693
9694
9695
9696  if test "x$TAIL" = x; then
9697    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9698  fi
9699
9700
9701
9702
9703
9704  # Publish this variable in the help.
9705
9706
9707  if test "x$TAR" = x; then
9708    # The variable is not set by user, try to locate tool using the code snippet
9709    for ac_prog in tar
9710do
9711  # Extract the first word of "$ac_prog", so it can be a program name with args.
9712set dummy $ac_prog; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_TAR+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $TAR in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741TAR=$ac_cv_path_TAR
9742if test -n "$TAR"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9744$as_echo "$TAR" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751  test -n "$TAR" && break
9752done
9753
9754  else
9755    # The variable is set, but is it from the command line or the environment?
9756
9757    # Try to remove the string !TAR! from our list.
9758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9760      # If it failed, the variable was not from the command line. Ignore it,
9761      # but warn the user (except for BASH, which is always set by the calling BASH).
9762      if test "xTAR" != xBASH; then
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9764$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9765      fi
9766      # Try to locate tool using the code snippet
9767      for ac_prog in tar
9768do
9769  # Extract the first word of "$ac_prog", so it can be a program name with args.
9770set dummy $ac_prog; ac_word=$2
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9772$as_echo_n "checking for $ac_word... " >&6; }
9773if ${ac_cv_path_TAR+:} false; then :
9774  $as_echo_n "(cached) " >&6
9775else
9776  case $TAR in
9777  [\\/]* | ?:[\\/]*)
9778  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9779  ;;
9780  *)
9781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9782for as_dir in $PATH
9783do
9784  IFS=$as_save_IFS
9785  test -z "$as_dir" && as_dir=.
9786    for ac_exec_ext in '' $ac_executable_extensions; do
9787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9788    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9790    break 2
9791  fi
9792done
9793  done
9794IFS=$as_save_IFS
9795
9796  ;;
9797esac
9798fi
9799TAR=$ac_cv_path_TAR
9800if test -n "$TAR"; then
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9802$as_echo "$TAR" >&6; }
9803else
9804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
9806fi
9807
9808
9809  test -n "$TAR" && break
9810done
9811
9812    else
9813      # If it succeeded, then it was overridden by the user. We will use it
9814      # for the tool.
9815
9816      # First remove it from the list of overridden variables, so we can test
9817      # for unknown variables in the end.
9818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9819
9820      # Check if the provided tool contains a complete path.
9821      tool_specified="$TAR"
9822      tool_basename="${tool_specified##*/}"
9823      if test "x$tool_basename" = "x$tool_specified"; then
9824        # A command without a complete path is provided, search $PATH.
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9826$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9827        # Extract the first word of "$tool_basename", so it can be a program name with args.
9828set dummy $tool_basename; ac_word=$2
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830$as_echo_n "checking for $ac_word... " >&6; }
9831if ${ac_cv_path_TAR+:} false; then :
9832  $as_echo_n "(cached) " >&6
9833else
9834  case $TAR in
9835  [\\/]* | ?:[\\/]*)
9836  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9837  ;;
9838  *)
9839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840for as_dir in $PATH
9841do
9842  IFS=$as_save_IFS
9843  test -z "$as_dir" && as_dir=.
9844    for ac_exec_ext in '' $ac_executable_extensions; do
9845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9846    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848    break 2
9849  fi
9850done
9851  done
9852IFS=$as_save_IFS
9853
9854  ;;
9855esac
9856fi
9857TAR=$ac_cv_path_TAR
9858if test -n "$TAR"; then
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9860$as_echo "$TAR" >&6; }
9861else
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
9867        if test "x$TAR" = x; then
9868          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9869        fi
9870      else
9871        # Otherwise we believe it is a complete path. Use it as it is.
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9873$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9875$as_echo_n "checking for TAR... " >&6; }
9876        if test ! -x "$tool_specified"; then
9877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9878$as_echo "not found" >&6; }
9879          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9880        fi
9881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9882$as_echo "$tool_specified" >&6; }
9883      fi
9884    fi
9885  fi
9886
9887
9888
9889  if test "x$TAR" = x; then
9890    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9891  fi
9892
9893
9894
9895
9896
9897  # Publish this variable in the help.
9898
9899
9900  if test "x$TEE" = x; then
9901    # The variable is not set by user, try to locate tool using the code snippet
9902    for ac_prog in tee
9903do
9904  # Extract the first word of "$ac_prog", so it can be a program name with args.
9905set dummy $ac_prog; ac_word=$2
9906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9907$as_echo_n "checking for $ac_word... " >&6; }
9908if ${ac_cv_path_TEE+:} false; then :
9909  $as_echo_n "(cached) " >&6
9910else
9911  case $TEE in
9912  [\\/]* | ?:[\\/]*)
9913  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9914  ;;
9915  *)
9916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9917for as_dir in $PATH
9918do
9919  IFS=$as_save_IFS
9920  test -z "$as_dir" && as_dir=.
9921    for ac_exec_ext in '' $ac_executable_extensions; do
9922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9923    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9925    break 2
9926  fi
9927done
9928  done
9929IFS=$as_save_IFS
9930
9931  ;;
9932esac
9933fi
9934TEE=$ac_cv_path_TEE
9935if test -n "$TEE"; then
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9937$as_echo "$TEE" >&6; }
9938else
9939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9940$as_echo "no" >&6; }
9941fi
9942
9943
9944  test -n "$TEE" && break
9945done
9946
9947  else
9948    # The variable is set, but is it from the command line or the environment?
9949
9950    # Try to remove the string !TEE! from our list.
9951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9953      # If it failed, the variable was not from the command line. Ignore it,
9954      # but warn the user (except for BASH, which is always set by the calling BASH).
9955      if test "xTEE" != xBASH; then
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9957$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9958      fi
9959      # Try to locate tool using the code snippet
9960      for ac_prog in tee
9961do
9962  # Extract the first word of "$ac_prog", so it can be a program name with args.
9963set dummy $ac_prog; ac_word=$2
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9965$as_echo_n "checking for $ac_word... " >&6; }
9966if ${ac_cv_path_TEE+:} false; then :
9967  $as_echo_n "(cached) " >&6
9968else
9969  case $TEE in
9970  [\\/]* | ?:[\\/]*)
9971  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9972  ;;
9973  *)
9974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9975for as_dir in $PATH
9976do
9977  IFS=$as_save_IFS
9978  test -z "$as_dir" && as_dir=.
9979    for ac_exec_ext in '' $ac_executable_extensions; do
9980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9981    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9983    break 2
9984  fi
9985done
9986  done
9987IFS=$as_save_IFS
9988
9989  ;;
9990esac
9991fi
9992TEE=$ac_cv_path_TEE
9993if test -n "$TEE"; then
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9995$as_echo "$TEE" >&6; }
9996else
9997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9998$as_echo "no" >&6; }
9999fi
10000
10001
10002  test -n "$TEE" && break
10003done
10004
10005    else
10006      # If it succeeded, then it was overridden by the user. We will use it
10007      # for the tool.
10008
10009      # First remove it from the list of overridden variables, so we can test
10010      # for unknown variables in the end.
10011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10012
10013      # Check if the provided tool contains a complete path.
10014      tool_specified="$TEE"
10015      tool_basename="${tool_specified##*/}"
10016      if test "x$tool_basename" = "x$tool_specified"; then
10017        # A command without a complete path is provided, search $PATH.
10018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10019$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10020        # Extract the first word of "$tool_basename", so it can be a program name with args.
10021set dummy $tool_basename; ac_word=$2
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10023$as_echo_n "checking for $ac_word... " >&6; }
10024if ${ac_cv_path_TEE+:} false; then :
10025  $as_echo_n "(cached) " >&6
10026else
10027  case $TEE in
10028  [\\/]* | ?:[\\/]*)
10029  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10030  ;;
10031  *)
10032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10033for as_dir in $PATH
10034do
10035  IFS=$as_save_IFS
10036  test -z "$as_dir" && as_dir=.
10037    for ac_exec_ext in '' $ac_executable_extensions; do
10038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10039    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10041    break 2
10042  fi
10043done
10044  done
10045IFS=$as_save_IFS
10046
10047  ;;
10048esac
10049fi
10050TEE=$ac_cv_path_TEE
10051if test -n "$TEE"; then
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10053$as_echo "$TEE" >&6; }
10054else
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059
10060        if test "x$TEE" = x; then
10061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10062        fi
10063      else
10064        # Otherwise we believe it is a complete path. Use it as it is.
10065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10066$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10068$as_echo_n "checking for TEE... " >&6; }
10069        if test ! -x "$tool_specified"; then
10070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10071$as_echo "not found" >&6; }
10072          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10073        fi
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10075$as_echo "$tool_specified" >&6; }
10076      fi
10077    fi
10078  fi
10079
10080
10081
10082  if test "x$TEE" = x; then
10083    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10084  fi
10085
10086
10087
10088
10089
10090  # Publish this variable in the help.
10091
10092
10093  if test "x$TOUCH" = x; then
10094    # The variable is not set by user, try to locate tool using the code snippet
10095    for ac_prog in touch
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if ${ac_cv_path_TOUCH+:} false; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $TOUCH in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10116    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127TOUCH=$ac_cv_path_TOUCH
10128if test -n "$TOUCH"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10130$as_echo "$TOUCH" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$TOUCH" && break
10138done
10139
10140  else
10141    # The variable is set, but is it from the command line or the environment?
10142
10143    # Try to remove the string !TOUCH! from our list.
10144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10146      # If it failed, the variable was not from the command line. Ignore it,
10147      # but warn the user (except for BASH, which is always set by the calling BASH).
10148      if test "xTOUCH" != xBASH; then
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10150$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10151      fi
10152      # Try to locate tool using the code snippet
10153      for ac_prog in touch
10154do
10155  # Extract the first word of "$ac_prog", so it can be a program name with args.
10156set dummy $ac_prog; ac_word=$2
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10158$as_echo_n "checking for $ac_word... " >&6; }
10159if ${ac_cv_path_TOUCH+:} false; then :
10160  $as_echo_n "(cached) " >&6
10161else
10162  case $TOUCH in
10163  [\\/]* | ?:[\\/]*)
10164  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10165  ;;
10166  *)
10167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10168for as_dir in $PATH
10169do
10170  IFS=$as_save_IFS
10171  test -z "$as_dir" && as_dir=.
10172    for ac_exec_ext in '' $ac_executable_extensions; do
10173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10174    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10176    break 2
10177  fi
10178done
10179  done
10180IFS=$as_save_IFS
10181
10182  ;;
10183esac
10184fi
10185TOUCH=$ac_cv_path_TOUCH
10186if test -n "$TOUCH"; then
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10188$as_echo "$TOUCH" >&6; }
10189else
10190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
10192fi
10193
10194
10195  test -n "$TOUCH" && break
10196done
10197
10198    else
10199      # If it succeeded, then it was overridden by the user. We will use it
10200      # for the tool.
10201
10202      # First remove it from the list of overridden variables, so we can test
10203      # for unknown variables in the end.
10204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10205
10206      # Check if the provided tool contains a complete path.
10207      tool_specified="$TOUCH"
10208      tool_basename="${tool_specified##*/}"
10209      if test "x$tool_basename" = "x$tool_specified"; then
10210        # A command without a complete path is provided, search $PATH.
10211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10212$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10213        # Extract the first word of "$tool_basename", so it can be a program name with args.
10214set dummy $tool_basename; ac_word=$2
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10216$as_echo_n "checking for $ac_word... " >&6; }
10217if ${ac_cv_path_TOUCH+:} false; then :
10218  $as_echo_n "(cached) " >&6
10219else
10220  case $TOUCH in
10221  [\\/]* | ?:[\\/]*)
10222  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10223  ;;
10224  *)
10225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10226for as_dir in $PATH
10227do
10228  IFS=$as_save_IFS
10229  test -z "$as_dir" && as_dir=.
10230    for ac_exec_ext in '' $ac_executable_extensions; do
10231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10232    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10234    break 2
10235  fi
10236done
10237  done
10238IFS=$as_save_IFS
10239
10240  ;;
10241esac
10242fi
10243TOUCH=$ac_cv_path_TOUCH
10244if test -n "$TOUCH"; then
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10246$as_echo "$TOUCH" >&6; }
10247else
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
10250fi
10251
10252
10253        if test "x$TOUCH" = x; then
10254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10255        fi
10256      else
10257        # Otherwise we believe it is a complete path. Use it as it is.
10258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10259$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10261$as_echo_n "checking for TOUCH... " >&6; }
10262        if test ! -x "$tool_specified"; then
10263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10264$as_echo "not found" >&6; }
10265          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10266        fi
10267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10268$as_echo "$tool_specified" >&6; }
10269      fi
10270    fi
10271  fi
10272
10273
10274
10275  if test "x$TOUCH" = x; then
10276    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10277  fi
10278
10279
10280
10281
10282
10283  # Publish this variable in the help.
10284
10285
10286  if test "x$TR" = x; then
10287    # The variable is not set by user, try to locate tool using the code snippet
10288    for ac_prog in tr
10289do
10290  # Extract the first word of "$ac_prog", so it can be a program name with args.
10291set dummy $ac_prog; ac_word=$2
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10293$as_echo_n "checking for $ac_word... " >&6; }
10294if ${ac_cv_path_TR+:} false; then :
10295  $as_echo_n "(cached) " >&6
10296else
10297  case $TR in
10298  [\\/]* | ?:[\\/]*)
10299  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10300  ;;
10301  *)
10302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10303for as_dir in $PATH
10304do
10305  IFS=$as_save_IFS
10306  test -z "$as_dir" && as_dir=.
10307    for ac_exec_ext in '' $ac_executable_extensions; do
10308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10309    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10311    break 2
10312  fi
10313done
10314  done
10315IFS=$as_save_IFS
10316
10317  ;;
10318esac
10319fi
10320TR=$ac_cv_path_TR
10321if test -n "$TR"; then
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10323$as_echo "$TR" >&6; }
10324else
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
10327fi
10328
10329
10330  test -n "$TR" && break
10331done
10332
10333  else
10334    # The variable is set, but is it from the command line or the environment?
10335
10336    # Try to remove the string !TR! from our list.
10337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10339      # If it failed, the variable was not from the command line. Ignore it,
10340      # but warn the user (except for BASH, which is always set by the calling BASH).
10341      if test "xTR" != xBASH; then
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10343$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10344      fi
10345      # Try to locate tool using the code snippet
10346      for ac_prog in tr
10347do
10348  # Extract the first word of "$ac_prog", so it can be a program name with args.
10349set dummy $ac_prog; ac_word=$2
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10351$as_echo_n "checking for $ac_word... " >&6; }
10352if ${ac_cv_path_TR+:} false; then :
10353  $as_echo_n "(cached) " >&6
10354else
10355  case $TR in
10356  [\\/]* | ?:[\\/]*)
10357  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10358  ;;
10359  *)
10360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10361for as_dir in $PATH
10362do
10363  IFS=$as_save_IFS
10364  test -z "$as_dir" && as_dir=.
10365    for ac_exec_ext in '' $ac_executable_extensions; do
10366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10367    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10369    break 2
10370  fi
10371done
10372  done
10373IFS=$as_save_IFS
10374
10375  ;;
10376esac
10377fi
10378TR=$ac_cv_path_TR
10379if test -n "$TR"; then
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10381$as_echo "$TR" >&6; }
10382else
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384$as_echo "no" >&6; }
10385fi
10386
10387
10388  test -n "$TR" && break
10389done
10390
10391    else
10392      # If it succeeded, then it was overridden by the user. We will use it
10393      # for the tool.
10394
10395      # First remove it from the list of overridden variables, so we can test
10396      # for unknown variables in the end.
10397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10398
10399      # Check if the provided tool contains a complete path.
10400      tool_specified="$TR"
10401      tool_basename="${tool_specified##*/}"
10402      if test "x$tool_basename" = "x$tool_specified"; then
10403        # A command without a complete path is provided, search $PATH.
10404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10405$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10406        # Extract the first word of "$tool_basename", so it can be a program name with args.
10407set dummy $tool_basename; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_TR+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $TR in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10425    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436TR=$ac_cv_path_TR
10437if test -n "$TR"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10439$as_echo "$TR" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446        if test "x$TR" = x; then
10447          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10448        fi
10449      else
10450        # Otherwise we believe it is a complete path. Use it as it is.
10451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10452$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10454$as_echo_n "checking for TR... " >&6; }
10455        if test ! -x "$tool_specified"; then
10456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10457$as_echo "not found" >&6; }
10458          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10459        fi
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10461$as_echo "$tool_specified" >&6; }
10462      fi
10463    fi
10464  fi
10465
10466
10467
10468  if test "x$TR" = x; then
10469    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10470  fi
10471
10472
10473
10474
10475
10476  # Publish this variable in the help.
10477
10478
10479  if test "x$UNAME" = x; then
10480    # The variable is not set by user, try to locate tool using the code snippet
10481    for ac_prog in uname
10482do
10483  # Extract the first word of "$ac_prog", so it can be a program name with args.
10484set dummy $ac_prog; ac_word=$2
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10486$as_echo_n "checking for $ac_word... " >&6; }
10487if ${ac_cv_path_UNAME+:} false; then :
10488  $as_echo_n "(cached) " >&6
10489else
10490  case $UNAME in
10491  [\\/]* | ?:[\\/]*)
10492  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10493  ;;
10494  *)
10495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496for as_dir in $PATH
10497do
10498  IFS=$as_save_IFS
10499  test -z "$as_dir" && as_dir=.
10500    for ac_exec_ext in '' $ac_executable_extensions; do
10501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10502    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10504    break 2
10505  fi
10506done
10507  done
10508IFS=$as_save_IFS
10509
10510  ;;
10511esac
10512fi
10513UNAME=$ac_cv_path_UNAME
10514if test -n "$UNAME"; then
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10516$as_echo "$UNAME" >&6; }
10517else
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519$as_echo "no" >&6; }
10520fi
10521
10522
10523  test -n "$UNAME" && break
10524done
10525
10526  else
10527    # The variable is set, but is it from the command line or the environment?
10528
10529    # Try to remove the string !UNAME! from our list.
10530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10532      # If it failed, the variable was not from the command line. Ignore it,
10533      # but warn the user (except for BASH, which is always set by the calling BASH).
10534      if test "xUNAME" != xBASH; then
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10536$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10537      fi
10538      # Try to locate tool using the code snippet
10539      for ac_prog in uname
10540do
10541  # Extract the first word of "$ac_prog", so it can be a program name with args.
10542set dummy $ac_prog; ac_word=$2
10543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544$as_echo_n "checking for $ac_word... " >&6; }
10545if ${ac_cv_path_UNAME+:} false; then :
10546  $as_echo_n "(cached) " >&6
10547else
10548  case $UNAME in
10549  [\\/]* | ?:[\\/]*)
10550  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10551  ;;
10552  *)
10553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554for as_dir in $PATH
10555do
10556  IFS=$as_save_IFS
10557  test -z "$as_dir" && as_dir=.
10558    for ac_exec_ext in '' $ac_executable_extensions; do
10559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562    break 2
10563  fi
10564done
10565  done
10566IFS=$as_save_IFS
10567
10568  ;;
10569esac
10570fi
10571UNAME=$ac_cv_path_UNAME
10572if test -n "$UNAME"; then
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10574$as_echo "$UNAME" >&6; }
10575else
10576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
10578fi
10579
10580
10581  test -n "$UNAME" && break
10582done
10583
10584    else
10585      # If it succeeded, then it was overridden by the user. We will use it
10586      # for the tool.
10587
10588      # First remove it from the list of overridden variables, so we can test
10589      # for unknown variables in the end.
10590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10591
10592      # Check if the provided tool contains a complete path.
10593      tool_specified="$UNAME"
10594      tool_basename="${tool_specified##*/}"
10595      if test "x$tool_basename" = "x$tool_specified"; then
10596        # A command without a complete path is provided, search $PATH.
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10598$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10599        # Extract the first word of "$tool_basename", so it can be a program name with args.
10600set dummy $tool_basename; ac_word=$2
10601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10602$as_echo_n "checking for $ac_word... " >&6; }
10603if ${ac_cv_path_UNAME+:} false; then :
10604  $as_echo_n "(cached) " >&6
10605else
10606  case $UNAME in
10607  [\\/]* | ?:[\\/]*)
10608  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10609  ;;
10610  *)
10611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10612for as_dir in $PATH
10613do
10614  IFS=$as_save_IFS
10615  test -z "$as_dir" && as_dir=.
10616    for ac_exec_ext in '' $ac_executable_extensions; do
10617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10618    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10620    break 2
10621  fi
10622done
10623  done
10624IFS=$as_save_IFS
10625
10626  ;;
10627esac
10628fi
10629UNAME=$ac_cv_path_UNAME
10630if test -n "$UNAME"; then
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10632$as_echo "$UNAME" >&6; }
10633else
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10635$as_echo "no" >&6; }
10636fi
10637
10638
10639        if test "x$UNAME" = x; then
10640          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10641        fi
10642      else
10643        # Otherwise we believe it is a complete path. Use it as it is.
10644        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10645$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10647$as_echo_n "checking for UNAME... " >&6; }
10648        if test ! -x "$tool_specified"; then
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10650$as_echo "not found" >&6; }
10651          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10652        fi
10653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10654$as_echo "$tool_specified" >&6; }
10655      fi
10656    fi
10657  fi
10658
10659
10660
10661  if test "x$UNAME" = x; then
10662    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10663  fi
10664
10665
10666
10667
10668
10669  # Publish this variable in the help.
10670
10671
10672  if test "x$UNIQ" = x; then
10673    # The variable is not set by user, try to locate tool using the code snippet
10674    for ac_prog in uniq
10675do
10676  # Extract the first word of "$ac_prog", so it can be a program name with args.
10677set dummy $ac_prog; ac_word=$2
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679$as_echo_n "checking for $ac_word... " >&6; }
10680if ${ac_cv_path_UNIQ+:} false; then :
10681  $as_echo_n "(cached) " >&6
10682else
10683  case $UNIQ in
10684  [\\/]* | ?:[\\/]*)
10685  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10686  ;;
10687  *)
10688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689for as_dir in $PATH
10690do
10691  IFS=$as_save_IFS
10692  test -z "$as_dir" && as_dir=.
10693    for ac_exec_ext in '' $ac_executable_extensions; do
10694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697    break 2
10698  fi
10699done
10700  done
10701IFS=$as_save_IFS
10702
10703  ;;
10704esac
10705fi
10706UNIQ=$ac_cv_path_UNIQ
10707if test -n "$UNIQ"; then
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10709$as_echo "$UNIQ" >&6; }
10710else
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713fi
10714
10715
10716  test -n "$UNIQ" && break
10717done
10718
10719  else
10720    # The variable is set, but is it from the command line or the environment?
10721
10722    # Try to remove the string !UNIQ! from our list.
10723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10725      # If it failed, the variable was not from the command line. Ignore it,
10726      # but warn the user (except for BASH, which is always set by the calling BASH).
10727      if test "xUNIQ" != xBASH; then
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10729$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10730      fi
10731      # Try to locate tool using the code snippet
10732      for ac_prog in uniq
10733do
10734  # Extract the first word of "$ac_prog", so it can be a program name with args.
10735set dummy $ac_prog; ac_word=$2
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10737$as_echo_n "checking for $ac_word... " >&6; }
10738if ${ac_cv_path_UNIQ+:} false; then :
10739  $as_echo_n "(cached) " >&6
10740else
10741  case $UNIQ in
10742  [\\/]* | ?:[\\/]*)
10743  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10744  ;;
10745  *)
10746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10747for as_dir in $PATH
10748do
10749  IFS=$as_save_IFS
10750  test -z "$as_dir" && as_dir=.
10751    for ac_exec_ext in '' $ac_executable_extensions; do
10752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10753    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10755    break 2
10756  fi
10757done
10758  done
10759IFS=$as_save_IFS
10760
10761  ;;
10762esac
10763fi
10764UNIQ=$ac_cv_path_UNIQ
10765if test -n "$UNIQ"; then
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10767$as_echo "$UNIQ" >&6; }
10768else
10769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
10771fi
10772
10773
10774  test -n "$UNIQ" && break
10775done
10776
10777    else
10778      # If it succeeded, then it was overridden by the user. We will use it
10779      # for the tool.
10780
10781      # First remove it from the list of overridden variables, so we can test
10782      # for unknown variables in the end.
10783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10784
10785      # Check if the provided tool contains a complete path.
10786      tool_specified="$UNIQ"
10787      tool_basename="${tool_specified##*/}"
10788      if test "x$tool_basename" = "x$tool_specified"; then
10789        # A command without a complete path is provided, search $PATH.
10790        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10791$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10792        # Extract the first word of "$tool_basename", so it can be a program name with args.
10793set dummy $tool_basename; ac_word=$2
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10795$as_echo_n "checking for $ac_word... " >&6; }
10796if ${ac_cv_path_UNIQ+:} false; then :
10797  $as_echo_n "(cached) " >&6
10798else
10799  case $UNIQ in
10800  [\\/]* | ?:[\\/]*)
10801  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10802  ;;
10803  *)
10804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10805for as_dir in $PATH
10806do
10807  IFS=$as_save_IFS
10808  test -z "$as_dir" && as_dir=.
10809    for ac_exec_ext in '' $ac_executable_extensions; do
10810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10811    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10813    break 2
10814  fi
10815done
10816  done
10817IFS=$as_save_IFS
10818
10819  ;;
10820esac
10821fi
10822UNIQ=$ac_cv_path_UNIQ
10823if test -n "$UNIQ"; then
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10825$as_echo "$UNIQ" >&6; }
10826else
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832        if test "x$UNIQ" = x; then
10833          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10834        fi
10835      else
10836        # Otherwise we believe it is a complete path. Use it as it is.
10837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10838$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10839        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10840$as_echo_n "checking for UNIQ... " >&6; }
10841        if test ! -x "$tool_specified"; then
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10843$as_echo "not found" >&6; }
10844          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10845        fi
10846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10847$as_echo "$tool_specified" >&6; }
10848      fi
10849    fi
10850  fi
10851
10852
10853
10854  if test "x$UNIQ" = x; then
10855    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10856  fi
10857
10858
10859
10860
10861
10862  # Publish this variable in the help.
10863
10864
10865  if test "x$WC" = x; then
10866    # The variable is not set by user, try to locate tool using the code snippet
10867    for ac_prog in wc
10868do
10869  # Extract the first word of "$ac_prog", so it can be a program name with args.
10870set dummy $ac_prog; ac_word=$2
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10872$as_echo_n "checking for $ac_word... " >&6; }
10873if ${ac_cv_path_WC+:} false; then :
10874  $as_echo_n "(cached) " >&6
10875else
10876  case $WC in
10877  [\\/]* | ?:[\\/]*)
10878  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10879  ;;
10880  *)
10881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10882for as_dir in $PATH
10883do
10884  IFS=$as_save_IFS
10885  test -z "$as_dir" && as_dir=.
10886    for ac_exec_ext in '' $ac_executable_extensions; do
10887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10888    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10890    break 2
10891  fi
10892done
10893  done
10894IFS=$as_save_IFS
10895
10896  ;;
10897esac
10898fi
10899WC=$ac_cv_path_WC
10900if test -n "$WC"; then
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10902$as_echo "$WC" >&6; }
10903else
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10905$as_echo "no" >&6; }
10906fi
10907
10908
10909  test -n "$WC" && break
10910done
10911
10912  else
10913    # The variable is set, but is it from the command line or the environment?
10914
10915    # Try to remove the string !WC! from our list.
10916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10918      # If it failed, the variable was not from the command line. Ignore it,
10919      # but warn the user (except for BASH, which is always set by the calling BASH).
10920      if test "xWC" != xBASH; then
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10922$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10923      fi
10924      # Try to locate tool using the code snippet
10925      for ac_prog in wc
10926do
10927  # Extract the first word of "$ac_prog", so it can be a program name with args.
10928set dummy $ac_prog; ac_word=$2
10929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10930$as_echo_n "checking for $ac_word... " >&6; }
10931if ${ac_cv_path_WC+:} false; then :
10932  $as_echo_n "(cached) " >&6
10933else
10934  case $WC in
10935  [\\/]* | ?:[\\/]*)
10936  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10937  ;;
10938  *)
10939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10940for as_dir in $PATH
10941do
10942  IFS=$as_save_IFS
10943  test -z "$as_dir" && as_dir=.
10944    for ac_exec_ext in '' $ac_executable_extensions; do
10945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10946    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10948    break 2
10949  fi
10950done
10951  done
10952IFS=$as_save_IFS
10953
10954  ;;
10955esac
10956fi
10957WC=$ac_cv_path_WC
10958if test -n "$WC"; then
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10960$as_echo "$WC" >&6; }
10961else
10962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
10964fi
10965
10966
10967  test -n "$WC" && break
10968done
10969
10970    else
10971      # If it succeeded, then it was overridden by the user. We will use it
10972      # for the tool.
10973
10974      # First remove it from the list of overridden variables, so we can test
10975      # for unknown variables in the end.
10976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10977
10978      # Check if the provided tool contains a complete path.
10979      tool_specified="$WC"
10980      tool_basename="${tool_specified##*/}"
10981      if test "x$tool_basename" = "x$tool_specified"; then
10982        # A command without a complete path is provided, search $PATH.
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10984$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10985        # Extract the first word of "$tool_basename", so it can be a program name with args.
10986set dummy $tool_basename; ac_word=$2
10987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10988$as_echo_n "checking for $ac_word... " >&6; }
10989if ${ac_cv_path_WC+:} false; then :
10990  $as_echo_n "(cached) " >&6
10991else
10992  case $WC in
10993  [\\/]* | ?:[\\/]*)
10994  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10995  ;;
10996  *)
10997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10998for as_dir in $PATH
10999do
11000  IFS=$as_save_IFS
11001  test -z "$as_dir" && as_dir=.
11002    for ac_exec_ext in '' $ac_executable_extensions; do
11003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11004    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11006    break 2
11007  fi
11008done
11009  done
11010IFS=$as_save_IFS
11011
11012  ;;
11013esac
11014fi
11015WC=$ac_cv_path_WC
11016if test -n "$WC"; then
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11018$as_echo "$WC" >&6; }
11019else
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
11022fi
11023
11024
11025        if test "x$WC" = x; then
11026          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11027        fi
11028      else
11029        # Otherwise we believe it is a complete path. Use it as it is.
11030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11031$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11033$as_echo_n "checking for WC... " >&6; }
11034        if test ! -x "$tool_specified"; then
11035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11036$as_echo "not found" >&6; }
11037          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11038        fi
11039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11040$as_echo "$tool_specified" >&6; }
11041      fi
11042    fi
11043  fi
11044
11045
11046
11047  if test "x$WC" = x; then
11048    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11049  fi
11050
11051
11052
11053
11054
11055  # Publish this variable in the help.
11056
11057
11058  if test "x$WHICH" = x; then
11059    # The variable is not set by user, try to locate tool using the code snippet
11060    for ac_prog in which
11061do
11062  # Extract the first word of "$ac_prog", so it can be a program name with args.
11063set dummy $ac_prog; ac_word=$2
11064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11065$as_echo_n "checking for $ac_word... " >&6; }
11066if ${ac_cv_path_WHICH+:} false; then :
11067  $as_echo_n "(cached) " >&6
11068else
11069  case $WHICH in
11070  [\\/]* | ?:[\\/]*)
11071  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11072  ;;
11073  *)
11074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11075for as_dir in $PATH
11076do
11077  IFS=$as_save_IFS
11078  test -z "$as_dir" && as_dir=.
11079    for ac_exec_ext in '' $ac_executable_extensions; do
11080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11081    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11083    break 2
11084  fi
11085done
11086  done
11087IFS=$as_save_IFS
11088
11089  ;;
11090esac
11091fi
11092WHICH=$ac_cv_path_WHICH
11093if test -n "$WHICH"; then
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11095$as_echo "$WHICH" >&6; }
11096else
11097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098$as_echo "no" >&6; }
11099fi
11100
11101
11102  test -n "$WHICH" && break
11103done
11104
11105  else
11106    # The variable is set, but is it from the command line or the environment?
11107
11108    # Try to remove the string !WHICH! from our list.
11109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11111      # If it failed, the variable was not from the command line. Ignore it,
11112      # but warn the user (except for BASH, which is always set by the calling BASH).
11113      if test "xWHICH" != xBASH; then
11114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11115$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11116      fi
11117      # Try to locate tool using the code snippet
11118      for ac_prog in which
11119do
11120  # Extract the first word of "$ac_prog", so it can be a program name with args.
11121set dummy $ac_prog; ac_word=$2
11122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11123$as_echo_n "checking for $ac_word... " >&6; }
11124if ${ac_cv_path_WHICH+:} false; then :
11125  $as_echo_n "(cached) " >&6
11126else
11127  case $WHICH in
11128  [\\/]* | ?:[\\/]*)
11129  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11130  ;;
11131  *)
11132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11133for as_dir in $PATH
11134do
11135  IFS=$as_save_IFS
11136  test -z "$as_dir" && as_dir=.
11137    for ac_exec_ext in '' $ac_executable_extensions; do
11138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11139    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11141    break 2
11142  fi
11143done
11144  done
11145IFS=$as_save_IFS
11146
11147  ;;
11148esac
11149fi
11150WHICH=$ac_cv_path_WHICH
11151if test -n "$WHICH"; then
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11153$as_echo "$WHICH" >&6; }
11154else
11155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11156$as_echo "no" >&6; }
11157fi
11158
11159
11160  test -n "$WHICH" && break
11161done
11162
11163    else
11164      # If it succeeded, then it was overridden by the user. We will use it
11165      # for the tool.
11166
11167      # First remove it from the list of overridden variables, so we can test
11168      # for unknown variables in the end.
11169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11170
11171      # Check if the provided tool contains a complete path.
11172      tool_specified="$WHICH"
11173      tool_basename="${tool_specified##*/}"
11174      if test "x$tool_basename" = "x$tool_specified"; then
11175        # A command without a complete path is provided, search $PATH.
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11177$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11178        # Extract the first word of "$tool_basename", so it can be a program name with args.
11179set dummy $tool_basename; ac_word=$2
11180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11181$as_echo_n "checking for $ac_word... " >&6; }
11182if ${ac_cv_path_WHICH+:} false; then :
11183  $as_echo_n "(cached) " >&6
11184else
11185  case $WHICH in
11186  [\\/]* | ?:[\\/]*)
11187  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11188  ;;
11189  *)
11190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11191for as_dir in $PATH
11192do
11193  IFS=$as_save_IFS
11194  test -z "$as_dir" && as_dir=.
11195    for ac_exec_ext in '' $ac_executable_extensions; do
11196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11197    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11199    break 2
11200  fi
11201done
11202  done
11203IFS=$as_save_IFS
11204
11205  ;;
11206esac
11207fi
11208WHICH=$ac_cv_path_WHICH
11209if test -n "$WHICH"; then
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11211$as_echo "$WHICH" >&6; }
11212else
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
11215fi
11216
11217
11218        if test "x$WHICH" = x; then
11219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11220        fi
11221      else
11222        # Otherwise we believe it is a complete path. Use it as it is.
11223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11224$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11226$as_echo_n "checking for WHICH... " >&6; }
11227        if test ! -x "$tool_specified"; then
11228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11229$as_echo "not found" >&6; }
11230          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11231        fi
11232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11233$as_echo "$tool_specified" >&6; }
11234      fi
11235    fi
11236  fi
11237
11238
11239
11240  if test "x$WHICH" = x; then
11241    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11242  fi
11243
11244
11245
11246
11247
11248  # Publish this variable in the help.
11249
11250
11251  if test "x$XARGS" = x; then
11252    # The variable is not set by user, try to locate tool using the code snippet
11253    for ac_prog in xargs
11254do
11255  # Extract the first word of "$ac_prog", so it can be a program name with args.
11256set dummy $ac_prog; ac_word=$2
11257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11258$as_echo_n "checking for $ac_word... " >&6; }
11259if ${ac_cv_path_XARGS+:} false; then :
11260  $as_echo_n "(cached) " >&6
11261else
11262  case $XARGS in
11263  [\\/]* | ?:[\\/]*)
11264  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11265  ;;
11266  *)
11267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11268for as_dir in $PATH
11269do
11270  IFS=$as_save_IFS
11271  test -z "$as_dir" && as_dir=.
11272    for ac_exec_ext in '' $ac_executable_extensions; do
11273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11274    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11276    break 2
11277  fi
11278done
11279  done
11280IFS=$as_save_IFS
11281
11282  ;;
11283esac
11284fi
11285XARGS=$ac_cv_path_XARGS
11286if test -n "$XARGS"; then
11287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11288$as_echo "$XARGS" >&6; }
11289else
11290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
11292fi
11293
11294
11295  test -n "$XARGS" && break
11296done
11297
11298  else
11299    # The variable is set, but is it from the command line or the environment?
11300
11301    # Try to remove the string !XARGS! from our list.
11302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11304      # If it failed, the variable was not from the command line. Ignore it,
11305      # but warn the user (except for BASH, which is always set by the calling BASH).
11306      if test "xXARGS" != xBASH; then
11307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11308$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11309      fi
11310      # Try to locate tool using the code snippet
11311      for ac_prog in xargs
11312do
11313  # Extract the first word of "$ac_prog", so it can be a program name with args.
11314set dummy $ac_prog; ac_word=$2
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11316$as_echo_n "checking for $ac_word... " >&6; }
11317if ${ac_cv_path_XARGS+:} false; then :
11318  $as_echo_n "(cached) " >&6
11319else
11320  case $XARGS in
11321  [\\/]* | ?:[\\/]*)
11322  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11323  ;;
11324  *)
11325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11326for as_dir in $PATH
11327do
11328  IFS=$as_save_IFS
11329  test -z "$as_dir" && as_dir=.
11330    for ac_exec_ext in '' $ac_executable_extensions; do
11331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11332    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11334    break 2
11335  fi
11336done
11337  done
11338IFS=$as_save_IFS
11339
11340  ;;
11341esac
11342fi
11343XARGS=$ac_cv_path_XARGS
11344if test -n "$XARGS"; then
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11346$as_echo "$XARGS" >&6; }
11347else
11348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
11350fi
11351
11352
11353  test -n "$XARGS" && break
11354done
11355
11356    else
11357      # If it succeeded, then it was overridden by the user. We will use it
11358      # for the tool.
11359
11360      # First remove it from the list of overridden variables, so we can test
11361      # for unknown variables in the end.
11362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11363
11364      # Check if the provided tool contains a complete path.
11365      tool_specified="$XARGS"
11366      tool_basename="${tool_specified##*/}"
11367      if test "x$tool_basename" = "x$tool_specified"; then
11368        # A command without a complete path is provided, search $PATH.
11369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11370$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11371        # Extract the first word of "$tool_basename", so it can be a program name with args.
11372set dummy $tool_basename; ac_word=$2
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11374$as_echo_n "checking for $ac_word... " >&6; }
11375if ${ac_cv_path_XARGS+:} false; then :
11376  $as_echo_n "(cached) " >&6
11377else
11378  case $XARGS in
11379  [\\/]* | ?:[\\/]*)
11380  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11381  ;;
11382  *)
11383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11384for as_dir in $PATH
11385do
11386  IFS=$as_save_IFS
11387  test -z "$as_dir" && as_dir=.
11388    for ac_exec_ext in '' $ac_executable_extensions; do
11389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11390    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11392    break 2
11393  fi
11394done
11395  done
11396IFS=$as_save_IFS
11397
11398  ;;
11399esac
11400fi
11401XARGS=$ac_cv_path_XARGS
11402if test -n "$XARGS"; then
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11404$as_echo "$XARGS" >&6; }
11405else
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
11408fi
11409
11410
11411        if test "x$XARGS" = x; then
11412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11413        fi
11414      else
11415        # Otherwise we believe it is a complete path. Use it as it is.
11416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11417$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11419$as_echo_n "checking for XARGS... " >&6; }
11420        if test ! -x "$tool_specified"; then
11421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11422$as_echo "not found" >&6; }
11423          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11424        fi
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11426$as_echo "$tool_specified" >&6; }
11427      fi
11428    fi
11429  fi
11430
11431
11432
11433  if test "x$XARGS" = x; then
11434    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11435  fi
11436
11437
11438
11439  # Then required tools that require some special treatment.
11440
11441
11442  # Publish this variable in the help.
11443
11444
11445  if test "x$AWK" = x; then
11446    # The variable is not set by user, try to locate tool using the code snippet
11447    for ac_prog in gawk mawk nawk awk
11448do
11449  # Extract the first word of "$ac_prog", so it can be a program name with args.
11450set dummy $ac_prog; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_prog_AWK+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  if test -n "$AWK"; then
11457  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11458else
11459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11460for as_dir in $PATH
11461do
11462  IFS=$as_save_IFS
11463  test -z "$as_dir" && as_dir=.
11464    for ac_exec_ext in '' $ac_executable_extensions; do
11465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11466    ac_cv_prog_AWK="$ac_prog"
11467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11468    break 2
11469  fi
11470done
11471  done
11472IFS=$as_save_IFS
11473
11474fi
11475fi
11476AWK=$ac_cv_prog_AWK
11477if test -n "$AWK"; then
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11479$as_echo "$AWK" >&6; }
11480else
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
11483fi
11484
11485
11486  test -n "$AWK" && break
11487done
11488
11489  else
11490    # The variable is set, but is it from the command line or the environment?
11491
11492    # Try to remove the string !AWK! from our list.
11493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11495      # If it failed, the variable was not from the command line. Ignore it,
11496      # but warn the user (except for BASH, which is always set by the calling BASH).
11497      if test "xAWK" != xBASH; then
11498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11499$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11500      fi
11501      # Try to locate tool using the code snippet
11502      for ac_prog in gawk mawk nawk awk
11503do
11504  # Extract the first word of "$ac_prog", so it can be a program name with args.
11505set dummy $ac_prog; ac_word=$2
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11507$as_echo_n "checking for $ac_word... " >&6; }
11508if ${ac_cv_prog_AWK+:} false; then :
11509  $as_echo_n "(cached) " >&6
11510else
11511  if test -n "$AWK"; then
11512  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11513else
11514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11515for as_dir in $PATH
11516do
11517  IFS=$as_save_IFS
11518  test -z "$as_dir" && as_dir=.
11519    for ac_exec_ext in '' $ac_executable_extensions; do
11520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11521    ac_cv_prog_AWK="$ac_prog"
11522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11523    break 2
11524  fi
11525done
11526  done
11527IFS=$as_save_IFS
11528
11529fi
11530fi
11531AWK=$ac_cv_prog_AWK
11532if test -n "$AWK"; then
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11534$as_echo "$AWK" >&6; }
11535else
11536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537$as_echo "no" >&6; }
11538fi
11539
11540
11541  test -n "$AWK" && break
11542done
11543
11544    else
11545      # If it succeeded, then it was overridden by the user. We will use it
11546      # for the tool.
11547
11548      # First remove it from the list of overridden variables, so we can test
11549      # for unknown variables in the end.
11550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11551
11552      # Check if the provided tool contains a complete path.
11553      tool_specified="$AWK"
11554      tool_basename="${tool_specified##*/}"
11555      if test "x$tool_basename" = "x$tool_specified"; then
11556        # A command without a complete path is provided, search $PATH.
11557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11558$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11559        # Extract the first word of "$tool_basename", so it can be a program name with args.
11560set dummy $tool_basename; ac_word=$2
11561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11562$as_echo_n "checking for $ac_word... " >&6; }
11563if ${ac_cv_path_AWK+:} false; then :
11564  $as_echo_n "(cached) " >&6
11565else
11566  case $AWK in
11567  [\\/]* | ?:[\\/]*)
11568  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11569  ;;
11570  *)
11571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11572for as_dir in $PATH
11573do
11574  IFS=$as_save_IFS
11575  test -z "$as_dir" && as_dir=.
11576    for ac_exec_ext in '' $ac_executable_extensions; do
11577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11578    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11580    break 2
11581  fi
11582done
11583  done
11584IFS=$as_save_IFS
11585
11586  ;;
11587esac
11588fi
11589AWK=$ac_cv_path_AWK
11590if test -n "$AWK"; then
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11592$as_echo "$AWK" >&6; }
11593else
11594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
11596fi
11597
11598
11599        if test "x$AWK" = x; then
11600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11601        fi
11602      else
11603        # Otherwise we believe it is a complete path. Use it as it is.
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11605$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11607$as_echo_n "checking for AWK... " >&6; }
11608        if test ! -x "$tool_specified"; then
11609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11610$as_echo "not found" >&6; }
11611          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11612        fi
11613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11614$as_echo "$tool_specified" >&6; }
11615      fi
11616    fi
11617  fi
11618
11619
11620  if test "x$AWK" = x; then
11621    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11622  fi
11623
11624
11625
11626
11627  # Publish this variable in the help.
11628
11629
11630  if test "x$GREP" = x; then
11631    # The variable is not set by user, try to locate tool using the code snippet
11632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11633$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11634if ${ac_cv_path_GREP+:} false; then :
11635  $as_echo_n "(cached) " >&6
11636else
11637  if test -z "$GREP"; then
11638  ac_path_GREP_found=false
11639  # Loop through the user's path and test for each of PROGNAME-LIST
11640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11641for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11642do
11643  IFS=$as_save_IFS
11644  test -z "$as_dir" && as_dir=.
11645    for ac_prog in grep ggrep; do
11646    for ac_exec_ext in '' $ac_executable_extensions; do
11647      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11648      as_fn_executable_p "$ac_path_GREP" || continue
11649# Check for GNU ac_path_GREP and select it if it is found.
11650  # Check for GNU $ac_path_GREP
11651case `"$ac_path_GREP" --version 2>&1` in
11652*GNU*)
11653  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11654*)
11655  ac_count=0
11656  $as_echo_n 0123456789 >"conftest.in"
11657  while :
11658  do
11659    cat "conftest.in" "conftest.in" >"conftest.tmp"
11660    mv "conftest.tmp" "conftest.in"
11661    cp "conftest.in" "conftest.nl"
11662    $as_echo 'GREP' >> "conftest.nl"
11663    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11664    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11665    as_fn_arith $ac_count + 1 && ac_count=$as_val
11666    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11667      # Best one so far, save it but keep looking for a better one
11668      ac_cv_path_GREP="$ac_path_GREP"
11669      ac_path_GREP_max=$ac_count
11670    fi
11671    # 10*(2^10) chars as input seems more than enough
11672    test $ac_count -gt 10 && break
11673  done
11674  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11675esac
11676
11677      $ac_path_GREP_found && break 3
11678    done
11679  done
11680  done
11681IFS=$as_save_IFS
11682  if test -z "$ac_cv_path_GREP"; then
11683    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11684  fi
11685else
11686  ac_cv_path_GREP=$GREP
11687fi
11688
11689fi
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11691$as_echo "$ac_cv_path_GREP" >&6; }
11692 GREP="$ac_cv_path_GREP"
11693
11694
11695  else
11696    # The variable is set, but is it from the command line or the environment?
11697
11698    # Try to remove the string !GREP! from our list.
11699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11701      # If it failed, the variable was not from the command line. Ignore it,
11702      # but warn the user (except for BASH, which is always set by the calling BASH).
11703      if test "xGREP" != xBASH; then
11704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11705$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11706      fi
11707      # Try to locate tool using the code snippet
11708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11709$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11710if ${ac_cv_path_GREP+:} false; then :
11711  $as_echo_n "(cached) " >&6
11712else
11713  if test -z "$GREP"; then
11714  ac_path_GREP_found=false
11715  # Loop through the user's path and test for each of PROGNAME-LIST
11716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11717for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11718do
11719  IFS=$as_save_IFS
11720  test -z "$as_dir" && as_dir=.
11721    for ac_prog in grep ggrep; do
11722    for ac_exec_ext in '' $ac_executable_extensions; do
11723      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11724      as_fn_executable_p "$ac_path_GREP" || continue
11725# Check for GNU ac_path_GREP and select it if it is found.
11726  # Check for GNU $ac_path_GREP
11727case `"$ac_path_GREP" --version 2>&1` in
11728*GNU*)
11729  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11730*)
11731  ac_count=0
11732  $as_echo_n 0123456789 >"conftest.in"
11733  while :
11734  do
11735    cat "conftest.in" "conftest.in" >"conftest.tmp"
11736    mv "conftest.tmp" "conftest.in"
11737    cp "conftest.in" "conftest.nl"
11738    $as_echo 'GREP' >> "conftest.nl"
11739    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11740    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11741    as_fn_arith $ac_count + 1 && ac_count=$as_val
11742    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11743      # Best one so far, save it but keep looking for a better one
11744      ac_cv_path_GREP="$ac_path_GREP"
11745      ac_path_GREP_max=$ac_count
11746    fi
11747    # 10*(2^10) chars as input seems more than enough
11748    test $ac_count -gt 10 && break
11749  done
11750  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11751esac
11752
11753      $ac_path_GREP_found && break 3
11754    done
11755  done
11756  done
11757IFS=$as_save_IFS
11758  if test -z "$ac_cv_path_GREP"; then
11759    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11760  fi
11761else
11762  ac_cv_path_GREP=$GREP
11763fi
11764
11765fi
11766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11767$as_echo "$ac_cv_path_GREP" >&6; }
11768 GREP="$ac_cv_path_GREP"
11769
11770
11771    else
11772      # If it succeeded, then it was overridden by the user. We will use it
11773      # for the tool.
11774
11775      # First remove it from the list of overridden variables, so we can test
11776      # for unknown variables in the end.
11777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11778
11779      # Check if the provided tool contains a complete path.
11780      tool_specified="$GREP"
11781      tool_basename="${tool_specified##*/}"
11782      if test "x$tool_basename" = "x$tool_specified"; then
11783        # A command without a complete path is provided, search $PATH.
11784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11785$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11786        # Extract the first word of "$tool_basename", so it can be a program name with args.
11787set dummy $tool_basename; ac_word=$2
11788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11789$as_echo_n "checking for $ac_word... " >&6; }
11790if ${ac_cv_path_GREP+:} false; then :
11791  $as_echo_n "(cached) " >&6
11792else
11793  case $GREP in
11794  [\\/]* | ?:[\\/]*)
11795  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11796  ;;
11797  *)
11798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799for as_dir in $PATH
11800do
11801  IFS=$as_save_IFS
11802  test -z "$as_dir" && as_dir=.
11803    for ac_exec_ext in '' $ac_executable_extensions; do
11804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11805    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11807    break 2
11808  fi
11809done
11810  done
11811IFS=$as_save_IFS
11812
11813  ;;
11814esac
11815fi
11816GREP=$ac_cv_path_GREP
11817if test -n "$GREP"; then
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11819$as_echo "$GREP" >&6; }
11820else
11821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11822$as_echo "no" >&6; }
11823fi
11824
11825
11826        if test "x$GREP" = x; then
11827          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11828        fi
11829      else
11830        # Otherwise we believe it is a complete path. Use it as it is.
11831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11832$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11834$as_echo_n "checking for GREP... " >&6; }
11835        if test ! -x "$tool_specified"; then
11836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11837$as_echo "not found" >&6; }
11838          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11839        fi
11840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11841$as_echo "$tool_specified" >&6; }
11842      fi
11843    fi
11844  fi
11845
11846
11847  if test "x$GREP" = x; then
11848    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11849  fi
11850
11851
11852
11853
11854  # Publish this variable in the help.
11855
11856
11857  if test "x$EGREP" = x; then
11858    # The variable is not set by user, try to locate tool using the code snippet
11859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11860$as_echo_n "checking for egrep... " >&6; }
11861if ${ac_cv_path_EGREP+:} false; then :
11862  $as_echo_n "(cached) " >&6
11863else
11864  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11865   then ac_cv_path_EGREP="$GREP -E"
11866   else
11867     if test -z "$EGREP"; then
11868  ac_path_EGREP_found=false
11869  # Loop through the user's path and test for each of PROGNAME-LIST
11870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11871for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11872do
11873  IFS=$as_save_IFS
11874  test -z "$as_dir" && as_dir=.
11875    for ac_prog in egrep; do
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11878      as_fn_executable_p "$ac_path_EGREP" || continue
11879# Check for GNU ac_path_EGREP and select it if it is found.
11880  # Check for GNU $ac_path_EGREP
11881case `"$ac_path_EGREP" --version 2>&1` in
11882*GNU*)
11883  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11884*)
11885  ac_count=0
11886  $as_echo_n 0123456789 >"conftest.in"
11887  while :
11888  do
11889    cat "conftest.in" "conftest.in" >"conftest.tmp"
11890    mv "conftest.tmp" "conftest.in"
11891    cp "conftest.in" "conftest.nl"
11892    $as_echo 'EGREP' >> "conftest.nl"
11893    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11894    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11895    as_fn_arith $ac_count + 1 && ac_count=$as_val
11896    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11897      # Best one so far, save it but keep looking for a better one
11898      ac_cv_path_EGREP="$ac_path_EGREP"
11899      ac_path_EGREP_max=$ac_count
11900    fi
11901    # 10*(2^10) chars as input seems more than enough
11902    test $ac_count -gt 10 && break
11903  done
11904  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11905esac
11906
11907      $ac_path_EGREP_found && break 3
11908    done
11909  done
11910  done
11911IFS=$as_save_IFS
11912  if test -z "$ac_cv_path_EGREP"; then
11913    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11914  fi
11915else
11916  ac_cv_path_EGREP=$EGREP
11917fi
11918
11919   fi
11920fi
11921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11922$as_echo "$ac_cv_path_EGREP" >&6; }
11923 EGREP="$ac_cv_path_EGREP"
11924
11925
11926  else
11927    # The variable is set, but is it from the command line or the environment?
11928
11929    # Try to remove the string !EGREP! from our list.
11930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11932      # If it failed, the variable was not from the command line. Ignore it,
11933      # but warn the user (except for BASH, which is always set by the calling BASH).
11934      if test "xEGREP" != xBASH; then
11935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11936$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11937      fi
11938      # Try to locate tool using the code snippet
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11940$as_echo_n "checking for egrep... " >&6; }
11941if ${ac_cv_path_EGREP+:} false; then :
11942  $as_echo_n "(cached) " >&6
11943else
11944  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11945   then ac_cv_path_EGREP="$GREP -E"
11946   else
11947     if test -z "$EGREP"; then
11948  ac_path_EGREP_found=false
11949  # Loop through the user's path and test for each of PROGNAME-LIST
11950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11951for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11952do
11953  IFS=$as_save_IFS
11954  test -z "$as_dir" && as_dir=.
11955    for ac_prog in egrep; do
11956    for ac_exec_ext in '' $ac_executable_extensions; do
11957      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11958      as_fn_executable_p "$ac_path_EGREP" || continue
11959# Check for GNU ac_path_EGREP and select it if it is found.
11960  # Check for GNU $ac_path_EGREP
11961case `"$ac_path_EGREP" --version 2>&1` in
11962*GNU*)
11963  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11964*)
11965  ac_count=0
11966  $as_echo_n 0123456789 >"conftest.in"
11967  while :
11968  do
11969    cat "conftest.in" "conftest.in" >"conftest.tmp"
11970    mv "conftest.tmp" "conftest.in"
11971    cp "conftest.in" "conftest.nl"
11972    $as_echo 'EGREP' >> "conftest.nl"
11973    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11974    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11975    as_fn_arith $ac_count + 1 && ac_count=$as_val
11976    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11977      # Best one so far, save it but keep looking for a better one
11978      ac_cv_path_EGREP="$ac_path_EGREP"
11979      ac_path_EGREP_max=$ac_count
11980    fi
11981    # 10*(2^10) chars as input seems more than enough
11982    test $ac_count -gt 10 && break
11983  done
11984  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11985esac
11986
11987      $ac_path_EGREP_found && break 3
11988    done
11989  done
11990  done
11991IFS=$as_save_IFS
11992  if test -z "$ac_cv_path_EGREP"; then
11993    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11994  fi
11995else
11996  ac_cv_path_EGREP=$EGREP
11997fi
11998
11999   fi
12000fi
12001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12002$as_echo "$ac_cv_path_EGREP" >&6; }
12003 EGREP="$ac_cv_path_EGREP"
12004
12005
12006    else
12007      # If it succeeded, then it was overridden by the user. We will use it
12008      # for the tool.
12009
12010      # First remove it from the list of overridden variables, so we can test
12011      # for unknown variables in the end.
12012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12013
12014      # Check if the provided tool contains a complete path.
12015      tool_specified="$EGREP"
12016      tool_basename="${tool_specified##*/}"
12017      if test "x$tool_basename" = "x$tool_specified"; then
12018        # A command without a complete path is provided, search $PATH.
12019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12020$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12021        # Extract the first word of "$tool_basename", so it can be a program name with args.
12022set dummy $tool_basename; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_EGREP+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $EGREP in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051EGREP=$ac_cv_path_EGREP
12052if test -n "$EGREP"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12054$as_echo "$EGREP" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061        if test "x$EGREP" = x; then
12062          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063        fi
12064      else
12065        # Otherwise we believe it is a complete path. Use it as it is.
12066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12067$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12069$as_echo_n "checking for EGREP... " >&6; }
12070        if test ! -x "$tool_specified"; then
12071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072$as_echo "not found" >&6; }
12073          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12074        fi
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076$as_echo "$tool_specified" >&6; }
12077      fi
12078    fi
12079  fi
12080
12081
12082  if test "x$EGREP" = x; then
12083    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12084  fi
12085
12086
12087
12088
12089  # Publish this variable in the help.
12090
12091
12092  if test "x$FGREP" = x; then
12093    # The variable is not set by user, try to locate tool using the code snippet
12094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12095$as_echo_n "checking for fgrep... " >&6; }
12096if ${ac_cv_path_FGREP+:} false; then :
12097  $as_echo_n "(cached) " >&6
12098else
12099  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12100   then ac_cv_path_FGREP="$GREP -F"
12101   else
12102     if test -z "$FGREP"; then
12103  ac_path_FGREP_found=false
12104  # Loop through the user's path and test for each of PROGNAME-LIST
12105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12106for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12107do
12108  IFS=$as_save_IFS
12109  test -z "$as_dir" && as_dir=.
12110    for ac_prog in fgrep; do
12111    for ac_exec_ext in '' $ac_executable_extensions; do
12112      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12113      as_fn_executable_p "$ac_path_FGREP" || continue
12114# Check for GNU ac_path_FGREP and select it if it is found.
12115  # Check for GNU $ac_path_FGREP
12116case `"$ac_path_FGREP" --version 2>&1` in
12117*GNU*)
12118  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12119*)
12120  ac_count=0
12121  $as_echo_n 0123456789 >"conftest.in"
12122  while :
12123  do
12124    cat "conftest.in" "conftest.in" >"conftest.tmp"
12125    mv "conftest.tmp" "conftest.in"
12126    cp "conftest.in" "conftest.nl"
12127    $as_echo 'FGREP' >> "conftest.nl"
12128    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12129    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12130    as_fn_arith $ac_count + 1 && ac_count=$as_val
12131    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12132      # Best one so far, save it but keep looking for a better one
12133      ac_cv_path_FGREP="$ac_path_FGREP"
12134      ac_path_FGREP_max=$ac_count
12135    fi
12136    # 10*(2^10) chars as input seems more than enough
12137    test $ac_count -gt 10 && break
12138  done
12139  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12140esac
12141
12142      $ac_path_FGREP_found && break 3
12143    done
12144  done
12145  done
12146IFS=$as_save_IFS
12147  if test -z "$ac_cv_path_FGREP"; then
12148    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12149  fi
12150else
12151  ac_cv_path_FGREP=$FGREP
12152fi
12153
12154   fi
12155fi
12156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12157$as_echo "$ac_cv_path_FGREP" >&6; }
12158 FGREP="$ac_cv_path_FGREP"
12159
12160
12161  else
12162    # The variable is set, but is it from the command line or the environment?
12163
12164    # Try to remove the string !FGREP! from our list.
12165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12167      # If it failed, the variable was not from the command line. Ignore it,
12168      # but warn the user (except for BASH, which is always set by the calling BASH).
12169      if test "xFGREP" != xBASH; then
12170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12171$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12172      fi
12173      # Try to locate tool using the code snippet
12174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12175$as_echo_n "checking for fgrep... " >&6; }
12176if ${ac_cv_path_FGREP+:} false; then :
12177  $as_echo_n "(cached) " >&6
12178else
12179  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12180   then ac_cv_path_FGREP="$GREP -F"
12181   else
12182     if test -z "$FGREP"; then
12183  ac_path_FGREP_found=false
12184  # Loop through the user's path and test for each of PROGNAME-LIST
12185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12187do
12188  IFS=$as_save_IFS
12189  test -z "$as_dir" && as_dir=.
12190    for ac_prog in fgrep; do
12191    for ac_exec_ext in '' $ac_executable_extensions; do
12192      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12193      as_fn_executable_p "$ac_path_FGREP" || continue
12194# Check for GNU ac_path_FGREP and select it if it is found.
12195  # Check for GNU $ac_path_FGREP
12196case `"$ac_path_FGREP" --version 2>&1` in
12197*GNU*)
12198  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12199*)
12200  ac_count=0
12201  $as_echo_n 0123456789 >"conftest.in"
12202  while :
12203  do
12204    cat "conftest.in" "conftest.in" >"conftest.tmp"
12205    mv "conftest.tmp" "conftest.in"
12206    cp "conftest.in" "conftest.nl"
12207    $as_echo 'FGREP' >> "conftest.nl"
12208    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12209    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12210    as_fn_arith $ac_count + 1 && ac_count=$as_val
12211    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12212      # Best one so far, save it but keep looking for a better one
12213      ac_cv_path_FGREP="$ac_path_FGREP"
12214      ac_path_FGREP_max=$ac_count
12215    fi
12216    # 10*(2^10) chars as input seems more than enough
12217    test $ac_count -gt 10 && break
12218  done
12219  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12220esac
12221
12222      $ac_path_FGREP_found && break 3
12223    done
12224  done
12225  done
12226IFS=$as_save_IFS
12227  if test -z "$ac_cv_path_FGREP"; then
12228    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12229  fi
12230else
12231  ac_cv_path_FGREP=$FGREP
12232fi
12233
12234   fi
12235fi
12236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12237$as_echo "$ac_cv_path_FGREP" >&6; }
12238 FGREP="$ac_cv_path_FGREP"
12239
12240
12241    else
12242      # If it succeeded, then it was overridden by the user. We will use it
12243      # for the tool.
12244
12245      # First remove it from the list of overridden variables, so we can test
12246      # for unknown variables in the end.
12247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12248
12249      # Check if the provided tool contains a complete path.
12250      tool_specified="$FGREP"
12251      tool_basename="${tool_specified##*/}"
12252      if test "x$tool_basename" = "x$tool_specified"; then
12253        # A command without a complete path is provided, search $PATH.
12254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12255$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12256        # Extract the first word of "$tool_basename", so it can be a program name with args.
12257set dummy $tool_basename; ac_word=$2
12258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12259$as_echo_n "checking for $ac_word... " >&6; }
12260if ${ac_cv_path_FGREP+:} false; then :
12261  $as_echo_n "(cached) " >&6
12262else
12263  case $FGREP in
12264  [\\/]* | ?:[\\/]*)
12265  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12266  ;;
12267  *)
12268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12269for as_dir in $PATH
12270do
12271  IFS=$as_save_IFS
12272  test -z "$as_dir" && as_dir=.
12273    for ac_exec_ext in '' $ac_executable_extensions; do
12274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12275    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12277    break 2
12278  fi
12279done
12280  done
12281IFS=$as_save_IFS
12282
12283  ;;
12284esac
12285fi
12286FGREP=$ac_cv_path_FGREP
12287if test -n "$FGREP"; then
12288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12289$as_echo "$FGREP" >&6; }
12290else
12291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12292$as_echo "no" >&6; }
12293fi
12294
12295
12296        if test "x$FGREP" = x; then
12297          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12298        fi
12299      else
12300        # Otherwise we believe it is a complete path. Use it as it is.
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12302$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12304$as_echo_n "checking for FGREP... " >&6; }
12305        if test ! -x "$tool_specified"; then
12306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12307$as_echo "not found" >&6; }
12308          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12309        fi
12310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12311$as_echo "$tool_specified" >&6; }
12312      fi
12313    fi
12314  fi
12315
12316
12317  if test "x$FGREP" = x; then
12318    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12319  fi
12320
12321
12322
12323
12324  # Publish this variable in the help.
12325
12326
12327  if test "x$SED" = x; then
12328    # The variable is not set by user, try to locate tool using the code snippet
12329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12330$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12331if ${ac_cv_path_SED+:} false; then :
12332  $as_echo_n "(cached) " >&6
12333else
12334            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12335     for ac_i in 1 2 3 4 5 6 7; do
12336       ac_script="$ac_script$as_nl$ac_script"
12337     done
12338     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12339     { ac_script=; unset ac_script;}
12340     if test -z "$SED"; then
12341  ac_path_SED_found=false
12342  # Loop through the user's path and test for each of PROGNAME-LIST
12343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12344for as_dir in $PATH
12345do
12346  IFS=$as_save_IFS
12347  test -z "$as_dir" && as_dir=.
12348    for ac_prog in sed gsed; do
12349    for ac_exec_ext in '' $ac_executable_extensions; do
12350      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12351      as_fn_executable_p "$ac_path_SED" || continue
12352# Check for GNU ac_path_SED and select it if it is found.
12353  # Check for GNU $ac_path_SED
12354case `"$ac_path_SED" --version 2>&1` in
12355*GNU*)
12356  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12357*)
12358  ac_count=0
12359  $as_echo_n 0123456789 >"conftest.in"
12360  while :
12361  do
12362    cat "conftest.in" "conftest.in" >"conftest.tmp"
12363    mv "conftest.tmp" "conftest.in"
12364    cp "conftest.in" "conftest.nl"
12365    $as_echo '' >> "conftest.nl"
12366    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12367    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12368    as_fn_arith $ac_count + 1 && ac_count=$as_val
12369    if test $ac_count -gt ${ac_path_SED_max-0}; then
12370      # Best one so far, save it but keep looking for a better one
12371      ac_cv_path_SED="$ac_path_SED"
12372      ac_path_SED_max=$ac_count
12373    fi
12374    # 10*(2^10) chars as input seems more than enough
12375    test $ac_count -gt 10 && break
12376  done
12377  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12378esac
12379
12380      $ac_path_SED_found && break 3
12381    done
12382  done
12383  done
12384IFS=$as_save_IFS
12385  if test -z "$ac_cv_path_SED"; then
12386    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12387  fi
12388else
12389  ac_cv_path_SED=$SED
12390fi
12391
12392fi
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12394$as_echo "$ac_cv_path_SED" >&6; }
12395 SED="$ac_cv_path_SED"
12396  rm -f conftest.sed
12397
12398  else
12399    # The variable is set, but is it from the command line or the environment?
12400
12401    # Try to remove the string !SED! from our list.
12402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12404      # If it failed, the variable was not from the command line. Ignore it,
12405      # but warn the user (except for BASH, which is always set by the calling BASH).
12406      if test "xSED" != xBASH; then
12407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12408$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12409      fi
12410      # Try to locate tool using the code snippet
12411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12412$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12413if ${ac_cv_path_SED+:} false; then :
12414  $as_echo_n "(cached) " >&6
12415else
12416            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12417     for ac_i in 1 2 3 4 5 6 7; do
12418       ac_script="$ac_script$as_nl$ac_script"
12419     done
12420     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12421     { ac_script=; unset ac_script;}
12422     if test -z "$SED"; then
12423  ac_path_SED_found=false
12424  # Loop through the user's path and test for each of PROGNAME-LIST
12425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12426for as_dir in $PATH
12427do
12428  IFS=$as_save_IFS
12429  test -z "$as_dir" && as_dir=.
12430    for ac_prog in sed gsed; do
12431    for ac_exec_ext in '' $ac_executable_extensions; do
12432      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12433      as_fn_executable_p "$ac_path_SED" || continue
12434# Check for GNU ac_path_SED and select it if it is found.
12435  # Check for GNU $ac_path_SED
12436case `"$ac_path_SED" --version 2>&1` in
12437*GNU*)
12438  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12439*)
12440  ac_count=0
12441  $as_echo_n 0123456789 >"conftest.in"
12442  while :
12443  do
12444    cat "conftest.in" "conftest.in" >"conftest.tmp"
12445    mv "conftest.tmp" "conftest.in"
12446    cp "conftest.in" "conftest.nl"
12447    $as_echo '' >> "conftest.nl"
12448    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12449    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12450    as_fn_arith $ac_count + 1 && ac_count=$as_val
12451    if test $ac_count -gt ${ac_path_SED_max-0}; then
12452      # Best one so far, save it but keep looking for a better one
12453      ac_cv_path_SED="$ac_path_SED"
12454      ac_path_SED_max=$ac_count
12455    fi
12456    # 10*(2^10) chars as input seems more than enough
12457    test $ac_count -gt 10 && break
12458  done
12459  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12460esac
12461
12462      $ac_path_SED_found && break 3
12463    done
12464  done
12465  done
12466IFS=$as_save_IFS
12467  if test -z "$ac_cv_path_SED"; then
12468    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12469  fi
12470else
12471  ac_cv_path_SED=$SED
12472fi
12473
12474fi
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12476$as_echo "$ac_cv_path_SED" >&6; }
12477 SED="$ac_cv_path_SED"
12478  rm -f conftest.sed
12479
12480    else
12481      # If it succeeded, then it was overridden by the user. We will use it
12482      # for the tool.
12483
12484      # First remove it from the list of overridden variables, so we can test
12485      # for unknown variables in the end.
12486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12487
12488      # Check if the provided tool contains a complete path.
12489      tool_specified="$SED"
12490      tool_basename="${tool_specified##*/}"
12491      if test "x$tool_basename" = "x$tool_specified"; then
12492        # A command without a complete path is provided, search $PATH.
12493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12494$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12495        # Extract the first word of "$tool_basename", so it can be a program name with args.
12496set dummy $tool_basename; ac_word=$2
12497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12498$as_echo_n "checking for $ac_word... " >&6; }
12499if ${ac_cv_path_SED+:} false; then :
12500  $as_echo_n "(cached) " >&6
12501else
12502  case $SED in
12503  [\\/]* | ?:[\\/]*)
12504  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12505  ;;
12506  *)
12507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12508for as_dir in $PATH
12509do
12510  IFS=$as_save_IFS
12511  test -z "$as_dir" && as_dir=.
12512    for ac_exec_ext in '' $ac_executable_extensions; do
12513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12514    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12516    break 2
12517  fi
12518done
12519  done
12520IFS=$as_save_IFS
12521
12522  ;;
12523esac
12524fi
12525SED=$ac_cv_path_SED
12526if test -n "$SED"; then
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12528$as_echo "$SED" >&6; }
12529else
12530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12531$as_echo "no" >&6; }
12532fi
12533
12534
12535        if test "x$SED" = x; then
12536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12537        fi
12538      else
12539        # Otherwise we believe it is a complete path. Use it as it is.
12540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12541$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12543$as_echo_n "checking for SED... " >&6; }
12544        if test ! -x "$tool_specified"; then
12545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12546$as_echo "not found" >&6; }
12547          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12548        fi
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12550$as_echo "$tool_specified" >&6; }
12551      fi
12552    fi
12553  fi
12554
12555
12556  if test "x$SED" = x; then
12557    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12558  fi
12559
12560
12561
12562  # Always force rm.
12563  RM="$RM -f"
12564
12565  # pwd behaves differently on various platforms and some don't support the -L flag.
12566  # Always use the bash builtin pwd to get uniform behavior.
12567  THEPWDCMD=pwd
12568
12569  # These are not required on all platforms
12570
12571
12572  # Publish this variable in the help.
12573
12574
12575  if test "x$CYGPATH" = x; then
12576    # The variable is not set by user, try to locate tool using the code snippet
12577    for ac_prog in cygpath
12578do
12579  # Extract the first word of "$ac_prog", so it can be a program name with args.
12580set dummy $ac_prog; ac_word=$2
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12582$as_echo_n "checking for $ac_word... " >&6; }
12583if ${ac_cv_path_CYGPATH+:} false; then :
12584  $as_echo_n "(cached) " >&6
12585else
12586  case $CYGPATH in
12587  [\\/]* | ?:[\\/]*)
12588  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12589  ;;
12590  *)
12591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12592for as_dir in $PATH
12593do
12594  IFS=$as_save_IFS
12595  test -z "$as_dir" && as_dir=.
12596    for ac_exec_ext in '' $ac_executable_extensions; do
12597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12598    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12600    break 2
12601  fi
12602done
12603  done
12604IFS=$as_save_IFS
12605
12606  ;;
12607esac
12608fi
12609CYGPATH=$ac_cv_path_CYGPATH
12610if test -n "$CYGPATH"; then
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12612$as_echo "$CYGPATH" >&6; }
12613else
12614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12615$as_echo "no" >&6; }
12616fi
12617
12618
12619  test -n "$CYGPATH" && break
12620done
12621
12622  else
12623    # The variable is set, but is it from the command line or the environment?
12624
12625    # Try to remove the string !CYGPATH! from our list.
12626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12628      # If it failed, the variable was not from the command line. Ignore it,
12629      # but warn the user (except for BASH, which is always set by the calling BASH).
12630      if test "xCYGPATH" != xBASH; then
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12632$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12633      fi
12634      # Try to locate tool using the code snippet
12635      for ac_prog in cygpath
12636do
12637  # Extract the first word of "$ac_prog", so it can be a program name with args.
12638set dummy $ac_prog; ac_word=$2
12639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12640$as_echo_n "checking for $ac_word... " >&6; }
12641if ${ac_cv_path_CYGPATH+:} false; then :
12642  $as_echo_n "(cached) " >&6
12643else
12644  case $CYGPATH in
12645  [\\/]* | ?:[\\/]*)
12646  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12647  ;;
12648  *)
12649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12650for as_dir in $PATH
12651do
12652  IFS=$as_save_IFS
12653  test -z "$as_dir" && as_dir=.
12654    for ac_exec_ext in '' $ac_executable_extensions; do
12655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12656    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12658    break 2
12659  fi
12660done
12661  done
12662IFS=$as_save_IFS
12663
12664  ;;
12665esac
12666fi
12667CYGPATH=$ac_cv_path_CYGPATH
12668if test -n "$CYGPATH"; then
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12670$as_echo "$CYGPATH" >&6; }
12671else
12672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12673$as_echo "no" >&6; }
12674fi
12675
12676
12677  test -n "$CYGPATH" && break
12678done
12679
12680    else
12681      # If it succeeded, then it was overridden by the user. We will use it
12682      # for the tool.
12683
12684      # First remove it from the list of overridden variables, so we can test
12685      # for unknown variables in the end.
12686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12687
12688      # Check if the provided tool contains a complete path.
12689      tool_specified="$CYGPATH"
12690      tool_basename="${tool_specified##*/}"
12691      if test "x$tool_basename" = "x$tool_specified"; then
12692        # A command without a complete path is provided, search $PATH.
12693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12694$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12695        # Extract the first word of "$tool_basename", so it can be a program name with args.
12696set dummy $tool_basename; ac_word=$2
12697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12698$as_echo_n "checking for $ac_word... " >&6; }
12699if ${ac_cv_path_CYGPATH+:} false; then :
12700  $as_echo_n "(cached) " >&6
12701else
12702  case $CYGPATH in
12703  [\\/]* | ?:[\\/]*)
12704  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12705  ;;
12706  *)
12707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12708for as_dir in $PATH
12709do
12710  IFS=$as_save_IFS
12711  test -z "$as_dir" && as_dir=.
12712    for ac_exec_ext in '' $ac_executable_extensions; do
12713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12714    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12716    break 2
12717  fi
12718done
12719  done
12720IFS=$as_save_IFS
12721
12722  ;;
12723esac
12724fi
12725CYGPATH=$ac_cv_path_CYGPATH
12726if test -n "$CYGPATH"; then
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12728$as_echo "$CYGPATH" >&6; }
12729else
12730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
12732fi
12733
12734
12735        if test "x$CYGPATH" = x; then
12736          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12737        fi
12738      else
12739        # Otherwise we believe it is a complete path. Use it as it is.
12740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12741$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12743$as_echo_n "checking for CYGPATH... " >&6; }
12744        if test ! -x "$tool_specified"; then
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12746$as_echo "not found" >&6; }
12747          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12748        fi
12749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12750$as_echo "$tool_specified" >&6; }
12751      fi
12752    fi
12753  fi
12754
12755
12756
12757
12758  # Publish this variable in the help.
12759
12760
12761  if test "x$READLINK" = x; then
12762    # The variable is not set by user, try to locate tool using the code snippet
12763    for ac_prog in greadlink readlink
12764do
12765  # Extract the first word of "$ac_prog", so it can be a program name with args.
12766set dummy $ac_prog; ac_word=$2
12767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12768$as_echo_n "checking for $ac_word... " >&6; }
12769if ${ac_cv_path_READLINK+:} false; then :
12770  $as_echo_n "(cached) " >&6
12771else
12772  case $READLINK in
12773  [\\/]* | ?:[\\/]*)
12774  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12775  ;;
12776  *)
12777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12778for as_dir in $PATH
12779do
12780  IFS=$as_save_IFS
12781  test -z "$as_dir" && as_dir=.
12782    for ac_exec_ext in '' $ac_executable_extensions; do
12783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12784    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12786    break 2
12787  fi
12788done
12789  done
12790IFS=$as_save_IFS
12791
12792  ;;
12793esac
12794fi
12795READLINK=$ac_cv_path_READLINK
12796if test -n "$READLINK"; then
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12798$as_echo "$READLINK" >&6; }
12799else
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12801$as_echo "no" >&6; }
12802fi
12803
12804
12805  test -n "$READLINK" && break
12806done
12807
12808  else
12809    # The variable is set, but is it from the command line or the environment?
12810
12811    # Try to remove the string !READLINK! from our list.
12812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12814      # If it failed, the variable was not from the command line. Ignore it,
12815      # but warn the user (except for BASH, which is always set by the calling BASH).
12816      if test "xREADLINK" != xBASH; then
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12818$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12819      fi
12820      # Try to locate tool using the code snippet
12821      for ac_prog in greadlink readlink
12822do
12823  # Extract the first word of "$ac_prog", so it can be a program name with args.
12824set dummy $ac_prog; ac_word=$2
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12826$as_echo_n "checking for $ac_word... " >&6; }
12827if ${ac_cv_path_READLINK+:} false; then :
12828  $as_echo_n "(cached) " >&6
12829else
12830  case $READLINK in
12831  [\\/]* | ?:[\\/]*)
12832  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12833  ;;
12834  *)
12835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12836for as_dir in $PATH
12837do
12838  IFS=$as_save_IFS
12839  test -z "$as_dir" && as_dir=.
12840    for ac_exec_ext in '' $ac_executable_extensions; do
12841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12842    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12844    break 2
12845  fi
12846done
12847  done
12848IFS=$as_save_IFS
12849
12850  ;;
12851esac
12852fi
12853READLINK=$ac_cv_path_READLINK
12854if test -n "$READLINK"; then
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12856$as_echo "$READLINK" >&6; }
12857else
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12859$as_echo "no" >&6; }
12860fi
12861
12862
12863  test -n "$READLINK" && break
12864done
12865
12866    else
12867      # If it succeeded, then it was overridden by the user. We will use it
12868      # for the tool.
12869
12870      # First remove it from the list of overridden variables, so we can test
12871      # for unknown variables in the end.
12872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12873
12874      # Check if the provided tool contains a complete path.
12875      tool_specified="$READLINK"
12876      tool_basename="${tool_specified##*/}"
12877      if test "x$tool_basename" = "x$tool_specified"; then
12878        # A command without a complete path is provided, search $PATH.
12879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12880$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12881        # Extract the first word of "$tool_basename", so it can be a program name with args.
12882set dummy $tool_basename; ac_word=$2
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12884$as_echo_n "checking for $ac_word... " >&6; }
12885if ${ac_cv_path_READLINK+:} false; then :
12886  $as_echo_n "(cached) " >&6
12887else
12888  case $READLINK in
12889  [\\/]* | ?:[\\/]*)
12890  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12891  ;;
12892  *)
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_exec_ext in '' $ac_executable_extensions; do
12899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12900    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12902    break 2
12903  fi
12904done
12905  done
12906IFS=$as_save_IFS
12907
12908  ;;
12909esac
12910fi
12911READLINK=$ac_cv_path_READLINK
12912if test -n "$READLINK"; then
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12914$as_echo "$READLINK" >&6; }
12915else
12916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12917$as_echo "no" >&6; }
12918fi
12919
12920
12921        if test "x$READLINK" = x; then
12922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12923        fi
12924      else
12925        # Otherwise we believe it is a complete path. Use it as it is.
12926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12927$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12929$as_echo_n "checking for READLINK... " >&6; }
12930        if test ! -x "$tool_specified"; then
12931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12932$as_echo "not found" >&6; }
12933          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12934        fi
12935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12936$as_echo "$tool_specified" >&6; }
12937      fi
12938    fi
12939  fi
12940
12941
12942
12943
12944  # Publish this variable in the help.
12945
12946
12947  if test "x$DF" = x; then
12948    # The variable is not set by user, try to locate tool using the code snippet
12949    for ac_prog in df
12950do
12951  # Extract the first word of "$ac_prog", so it can be a program name with args.
12952set dummy $ac_prog; ac_word=$2
12953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12954$as_echo_n "checking for $ac_word... " >&6; }
12955if ${ac_cv_path_DF+:} false; then :
12956  $as_echo_n "(cached) " >&6
12957else
12958  case $DF in
12959  [\\/]* | ?:[\\/]*)
12960  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12961  ;;
12962  *)
12963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12964for as_dir in $PATH
12965do
12966  IFS=$as_save_IFS
12967  test -z "$as_dir" && as_dir=.
12968    for ac_exec_ext in '' $ac_executable_extensions; do
12969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12970    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12972    break 2
12973  fi
12974done
12975  done
12976IFS=$as_save_IFS
12977
12978  ;;
12979esac
12980fi
12981DF=$ac_cv_path_DF
12982if test -n "$DF"; then
12983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12984$as_echo "$DF" >&6; }
12985else
12986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12987$as_echo "no" >&6; }
12988fi
12989
12990
12991  test -n "$DF" && break
12992done
12993
12994  else
12995    # The variable is set, but is it from the command line or the environment?
12996
12997    # Try to remove the string !DF! from our list.
12998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13000      # If it failed, the variable was not from the command line. Ignore it,
13001      # but warn the user (except for BASH, which is always set by the calling BASH).
13002      if test "xDF" != xBASH; then
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13004$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13005      fi
13006      # Try to locate tool using the code snippet
13007      for ac_prog in df
13008do
13009  # Extract the first word of "$ac_prog", so it can be a program name with args.
13010set dummy $ac_prog; ac_word=$2
13011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13012$as_echo_n "checking for $ac_word... " >&6; }
13013if ${ac_cv_path_DF+:} false; then :
13014  $as_echo_n "(cached) " >&6
13015else
13016  case $DF in
13017  [\\/]* | ?:[\\/]*)
13018  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13019  ;;
13020  *)
13021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13022for as_dir in $PATH
13023do
13024  IFS=$as_save_IFS
13025  test -z "$as_dir" && as_dir=.
13026    for ac_exec_ext in '' $ac_executable_extensions; do
13027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13028    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13030    break 2
13031  fi
13032done
13033  done
13034IFS=$as_save_IFS
13035
13036  ;;
13037esac
13038fi
13039DF=$ac_cv_path_DF
13040if test -n "$DF"; then
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13042$as_echo "$DF" >&6; }
13043else
13044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13045$as_echo "no" >&6; }
13046fi
13047
13048
13049  test -n "$DF" && break
13050done
13051
13052    else
13053      # If it succeeded, then it was overridden by the user. We will use it
13054      # for the tool.
13055
13056      # First remove it from the list of overridden variables, so we can test
13057      # for unknown variables in the end.
13058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13059
13060      # Check if the provided tool contains a complete path.
13061      tool_specified="$DF"
13062      tool_basename="${tool_specified##*/}"
13063      if test "x$tool_basename" = "x$tool_specified"; then
13064        # A command without a complete path is provided, search $PATH.
13065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13066$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13067        # Extract the first word of "$tool_basename", so it can be a program name with args.
13068set dummy $tool_basename; ac_word=$2
13069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13070$as_echo_n "checking for $ac_word... " >&6; }
13071if ${ac_cv_path_DF+:} false; then :
13072  $as_echo_n "(cached) " >&6
13073else
13074  case $DF in
13075  [\\/]* | ?:[\\/]*)
13076  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13077  ;;
13078  *)
13079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13080for as_dir in $PATH
13081do
13082  IFS=$as_save_IFS
13083  test -z "$as_dir" && as_dir=.
13084    for ac_exec_ext in '' $ac_executable_extensions; do
13085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13086    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13088    break 2
13089  fi
13090done
13091  done
13092IFS=$as_save_IFS
13093
13094  ;;
13095esac
13096fi
13097DF=$ac_cv_path_DF
13098if test -n "$DF"; then
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13100$as_echo "$DF" >&6; }
13101else
13102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103$as_echo "no" >&6; }
13104fi
13105
13106
13107        if test "x$DF" = x; then
13108          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13109        fi
13110      else
13111        # Otherwise we believe it is a complete path. Use it as it is.
13112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13113$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13115$as_echo_n "checking for DF... " >&6; }
13116        if test ! -x "$tool_specified"; then
13117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13118$as_echo "not found" >&6; }
13119          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13120        fi
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13122$as_echo "$tool_specified" >&6; }
13123      fi
13124    fi
13125  fi
13126
13127
13128
13129
13130  # Publish this variable in the help.
13131
13132
13133  if test "x$CPIO" = x; then
13134    # The variable is not set by user, try to locate tool using the code snippet
13135    for ac_prog in cpio bsdcpio
13136do
13137  # Extract the first word of "$ac_prog", so it can be a program name with args.
13138set dummy $ac_prog; ac_word=$2
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13140$as_echo_n "checking for $ac_word... " >&6; }
13141if ${ac_cv_path_CPIO+:} false; then :
13142  $as_echo_n "(cached) " >&6
13143else
13144  case $CPIO in
13145  [\\/]* | ?:[\\/]*)
13146  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13147  ;;
13148  *)
13149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13150for as_dir in $PATH
13151do
13152  IFS=$as_save_IFS
13153  test -z "$as_dir" && as_dir=.
13154    for ac_exec_ext in '' $ac_executable_extensions; do
13155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13156    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13158    break 2
13159  fi
13160done
13161  done
13162IFS=$as_save_IFS
13163
13164  ;;
13165esac
13166fi
13167CPIO=$ac_cv_path_CPIO
13168if test -n "$CPIO"; then
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13170$as_echo "$CPIO" >&6; }
13171else
13172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13173$as_echo "no" >&6; }
13174fi
13175
13176
13177  test -n "$CPIO" && break
13178done
13179
13180  else
13181    # The variable is set, but is it from the command line or the environment?
13182
13183    # Try to remove the string !CPIO! from our list.
13184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13186      # If it failed, the variable was not from the command line. Ignore it,
13187      # but warn the user (except for BASH, which is always set by the calling BASH).
13188      if test "xCPIO" != xBASH; then
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13190$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13191      fi
13192      # Try to locate tool using the code snippet
13193      for ac_prog in cpio bsdcpio
13194do
13195  # Extract the first word of "$ac_prog", so it can be a program name with args.
13196set dummy $ac_prog; ac_word=$2
13197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13198$as_echo_n "checking for $ac_word... " >&6; }
13199if ${ac_cv_path_CPIO+:} false; then :
13200  $as_echo_n "(cached) " >&6
13201else
13202  case $CPIO in
13203  [\\/]* | ?:[\\/]*)
13204  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13205  ;;
13206  *)
13207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13208for as_dir in $PATH
13209do
13210  IFS=$as_save_IFS
13211  test -z "$as_dir" && as_dir=.
13212    for ac_exec_ext in '' $ac_executable_extensions; do
13213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13214    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13216    break 2
13217  fi
13218done
13219  done
13220IFS=$as_save_IFS
13221
13222  ;;
13223esac
13224fi
13225CPIO=$ac_cv_path_CPIO
13226if test -n "$CPIO"; then
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13228$as_echo "$CPIO" >&6; }
13229else
13230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
13232fi
13233
13234
13235  test -n "$CPIO" && break
13236done
13237
13238    else
13239      # If it succeeded, then it was overridden by the user. We will use it
13240      # for the tool.
13241
13242      # First remove it from the list of overridden variables, so we can test
13243      # for unknown variables in the end.
13244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13245
13246      # Check if the provided tool contains a complete path.
13247      tool_specified="$CPIO"
13248      tool_basename="${tool_specified##*/}"
13249      if test "x$tool_basename" = "x$tool_specified"; then
13250        # A command without a complete path is provided, search $PATH.
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13252$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13253        # Extract the first word of "$tool_basename", so it can be a program name with args.
13254set dummy $tool_basename; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_path_CPIO+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  case $CPIO in
13261  [\\/]* | ?:[\\/]*)
13262  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13263  ;;
13264  *)
13265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13266for as_dir in $PATH
13267do
13268  IFS=$as_save_IFS
13269  test -z "$as_dir" && as_dir=.
13270    for ac_exec_ext in '' $ac_executable_extensions; do
13271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13272    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13274    break 2
13275  fi
13276done
13277  done
13278IFS=$as_save_IFS
13279
13280  ;;
13281esac
13282fi
13283CPIO=$ac_cv_path_CPIO
13284if test -n "$CPIO"; then
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13286$as_echo "$CPIO" >&6; }
13287else
13288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13289$as_echo "no" >&6; }
13290fi
13291
13292
13293        if test "x$CPIO" = x; then
13294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13295        fi
13296      else
13297        # Otherwise we believe it is a complete path. Use it as it is.
13298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13299$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13301$as_echo_n "checking for CPIO... " >&6; }
13302        if test ! -x "$tool_specified"; then
13303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13304$as_echo "not found" >&6; }
13305          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13306        fi
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13308$as_echo "$tool_specified" >&6; }
13309      fi
13310    fi
13311  fi
13312
13313
13314
13315
13316# Now we can determine OpenJDK build and target platforms. This is required to
13317# have early on.
13318# Make sure we can run config.sub.
13319$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13320  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13321
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13323$as_echo_n "checking build system type... " >&6; }
13324if ${ac_cv_build+:} false; then :
13325  $as_echo_n "(cached) " >&6
13326else
13327  ac_build_alias=$build_alias
13328test "x$ac_build_alias" = x &&
13329  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13330test "x$ac_build_alias" = x &&
13331  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13332ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13333  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13334
13335fi
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13337$as_echo "$ac_cv_build" >&6; }
13338case $ac_cv_build in
13339*-*-*) ;;
13340*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13341esac
13342build=$ac_cv_build
13343ac_save_IFS=$IFS; IFS='-'
13344set x $ac_cv_build
13345shift
13346build_cpu=$1
13347build_vendor=$2
13348shift; shift
13349# Remember, the first character of IFS is used to create $*,
13350# except with old shells:
13351build_os=$*
13352IFS=$ac_save_IFS
13353case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13354
13355
13356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13357$as_echo_n "checking host system type... " >&6; }
13358if ${ac_cv_host+:} false; then :
13359  $as_echo_n "(cached) " >&6
13360else
13361  if test "x$host_alias" = x; then
13362  ac_cv_host=$ac_cv_build
13363else
13364  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13365    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13366fi
13367
13368fi
13369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13370$as_echo "$ac_cv_host" >&6; }
13371case $ac_cv_host in
13372*-*-*) ;;
13373*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13374esac
13375host=$ac_cv_host
13376ac_save_IFS=$IFS; IFS='-'
13377set x $ac_cv_host
13378shift
13379host_cpu=$1
13380host_vendor=$2
13381shift; shift
13382# Remember, the first character of IFS is used to create $*,
13383# except with old shells:
13384host_os=$*
13385IFS=$ac_save_IFS
13386case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13387
13388
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13390$as_echo_n "checking target system type... " >&6; }
13391if ${ac_cv_target+:} false; then :
13392  $as_echo_n "(cached) " >&6
13393else
13394  if test "x$target_alias" = x; then
13395  ac_cv_target=$ac_cv_host
13396else
13397  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13398    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13399fi
13400
13401fi
13402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13403$as_echo "$ac_cv_target" >&6; }
13404case $ac_cv_target in
13405*-*-*) ;;
13406*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13407esac
13408target=$ac_cv_target
13409ac_save_IFS=$IFS; IFS='-'
13410set x $ac_cv_target
13411shift
13412target_cpu=$1
13413target_vendor=$2
13414shift; shift
13415# Remember, the first character of IFS is used to create $*,
13416# except with old shells:
13417target_os=$*
13418IFS=$ac_save_IFS
13419case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13420
13421
13422# The aliases save the names the user supplied, while $host etc.
13423# will get canonicalized.
13424test -n "$target_alias" &&
13425  test "$program_prefix$program_suffix$program_transform_name" = \
13426    NONENONEs,x,x, &&
13427  program_prefix=${target_alias}-
13428
13429  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13430  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13431  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13432  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13433  # to use the configure naming style.
13434
13435
13436
13437
13438
13439  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13440  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13441  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13442  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13443  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13444  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13445
13446
13447
13448  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13449
13450  case "$build_os" in
13451    *linux*)
13452      VAR_OS=linux
13453      VAR_OS_TYPE=unix
13454      ;;
13455    *solaris*)
13456      VAR_OS=solaris
13457      VAR_OS_TYPE=unix
13458      ;;
13459    *darwin*)
13460      VAR_OS=macosx
13461      VAR_OS_TYPE=unix
13462      ;;
13463    *bsd*)
13464      VAR_OS=bsd
13465      VAR_OS_TYPE=unix
13466      ;;
13467    *cygwin*)
13468      VAR_OS=windows
13469      VAR_OS_ENV=windows.cygwin
13470      ;;
13471    *mingw*)
13472      VAR_OS=windows
13473      VAR_OS_ENV=windows.msys
13474      ;;
13475    *aix*)
13476      VAR_OS=aix
13477      VAR_OS_TYPE=unix
13478      ;;
13479    *)
13480      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13481      ;;
13482  esac
13483
13484
13485  # First argument is the cpu name from the trip/quad
13486  case "$build_cpu" in
13487    x86_64)
13488      VAR_CPU=x86_64
13489      VAR_CPU_ARCH=x86
13490      VAR_CPU_BITS=64
13491      VAR_CPU_ENDIAN=little
13492      ;;
13493    i?86)
13494      VAR_CPU=x86
13495      VAR_CPU_ARCH=x86
13496      VAR_CPU_BITS=32
13497      VAR_CPU_ENDIAN=little
13498      ;;
13499    arm*)
13500      VAR_CPU=arm
13501      VAR_CPU_ARCH=arm
13502      VAR_CPU_BITS=32
13503      VAR_CPU_ENDIAN=little
13504      ;;
13505    aarch64)
13506      VAR_CPU=aarch64
13507      VAR_CPU_ARCH=aarch64
13508      VAR_CPU_BITS=64
13509      VAR_CPU_ENDIAN=little
13510      ;;
13511    powerpc)
13512      VAR_CPU=ppc
13513      VAR_CPU_ARCH=ppc
13514      VAR_CPU_BITS=32
13515      VAR_CPU_ENDIAN=big
13516      ;;
13517    powerpc64)
13518      VAR_CPU=ppc64
13519      VAR_CPU_ARCH=ppc
13520      VAR_CPU_BITS=64
13521      VAR_CPU_ENDIAN=big
13522      ;;
13523    powerpc64le)
13524      VAR_CPU=ppc64
13525      VAR_CPU_ARCH=ppc
13526      VAR_CPU_BITS=64
13527      VAR_CPU_ENDIAN=little
13528      ;;
13529    s390)
13530      VAR_CPU=s390
13531      VAR_CPU_ARCH=s390
13532      VAR_CPU_BITS=32
13533      VAR_CPU_ENDIAN=big
13534      ;;
13535    s390x)
13536      VAR_CPU=s390x
13537      VAR_CPU_ARCH=s390
13538      VAR_CPU_BITS=64
13539      VAR_CPU_ENDIAN=big
13540      ;;
13541    sparc)
13542      VAR_CPU=sparc
13543      VAR_CPU_ARCH=sparc
13544      VAR_CPU_BITS=32
13545      VAR_CPU_ENDIAN=big
13546      ;;
13547    sparcv9|sparc64)
13548      VAR_CPU=sparcv9
13549      VAR_CPU_ARCH=sparc
13550      VAR_CPU_BITS=64
13551      VAR_CPU_ENDIAN=big
13552      ;;
13553    *)
13554      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13555      ;;
13556  esac
13557
13558  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13559  OPENJDK_BUILD_OS="$VAR_OS"
13560  if test "x$VAR_OS_TYPE" != x; then
13561    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13562  else
13563    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13564  fi
13565  if test "x$VAR_OS_ENV" != x; then
13566    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13567  else
13568    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13569  fi
13570  OPENJDK_BUILD_CPU="$VAR_CPU"
13571  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13572  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13573  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13574
13575
13576
13577
13578
13579
13580
13581
13582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13583$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13585$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13586
13587  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13588
13589  case "$host_os" in
13590    *linux*)
13591      VAR_OS=linux
13592      VAR_OS_TYPE=unix
13593      ;;
13594    *solaris*)
13595      VAR_OS=solaris
13596      VAR_OS_TYPE=unix
13597      ;;
13598    *darwin*)
13599      VAR_OS=macosx
13600      VAR_OS_TYPE=unix
13601      ;;
13602    *bsd*)
13603      VAR_OS=bsd
13604      VAR_OS_TYPE=unix
13605      ;;
13606    *cygwin*)
13607      VAR_OS=windows
13608      VAR_OS_ENV=windows.cygwin
13609      ;;
13610    *mingw*)
13611      VAR_OS=windows
13612      VAR_OS_ENV=windows.msys
13613      ;;
13614    *aix*)
13615      VAR_OS=aix
13616      VAR_OS_TYPE=unix
13617      ;;
13618    *)
13619      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13620      ;;
13621  esac
13622
13623
13624  # First argument is the cpu name from the trip/quad
13625  case "$host_cpu" in
13626    x86_64)
13627      VAR_CPU=x86_64
13628      VAR_CPU_ARCH=x86
13629      VAR_CPU_BITS=64
13630      VAR_CPU_ENDIAN=little
13631      ;;
13632    i?86)
13633      VAR_CPU=x86
13634      VAR_CPU_ARCH=x86
13635      VAR_CPU_BITS=32
13636      VAR_CPU_ENDIAN=little
13637      ;;
13638    arm*)
13639      VAR_CPU=arm
13640      VAR_CPU_ARCH=arm
13641      VAR_CPU_BITS=32
13642      VAR_CPU_ENDIAN=little
13643      ;;
13644    aarch64)
13645      VAR_CPU=aarch64
13646      VAR_CPU_ARCH=aarch64
13647      VAR_CPU_BITS=64
13648      VAR_CPU_ENDIAN=little
13649      ;;
13650    powerpc)
13651      VAR_CPU=ppc
13652      VAR_CPU_ARCH=ppc
13653      VAR_CPU_BITS=32
13654      VAR_CPU_ENDIAN=big
13655      ;;
13656    powerpc64)
13657      VAR_CPU=ppc64
13658      VAR_CPU_ARCH=ppc
13659      VAR_CPU_BITS=64
13660      VAR_CPU_ENDIAN=big
13661      ;;
13662    powerpc64le)
13663      VAR_CPU=ppc64
13664      VAR_CPU_ARCH=ppc
13665      VAR_CPU_BITS=64
13666      VAR_CPU_ENDIAN=little
13667      ;;
13668    s390)
13669      VAR_CPU=s390
13670      VAR_CPU_ARCH=s390
13671      VAR_CPU_BITS=32
13672      VAR_CPU_ENDIAN=big
13673      ;;
13674    s390x)
13675      VAR_CPU=s390x
13676      VAR_CPU_ARCH=s390
13677      VAR_CPU_BITS=64
13678      VAR_CPU_ENDIAN=big
13679      ;;
13680    sparc)
13681      VAR_CPU=sparc
13682      VAR_CPU_ARCH=sparc
13683      VAR_CPU_BITS=32
13684      VAR_CPU_ENDIAN=big
13685      ;;
13686    sparcv9|sparc64)
13687      VAR_CPU=sparcv9
13688      VAR_CPU_ARCH=sparc
13689      VAR_CPU_BITS=64
13690      VAR_CPU_ENDIAN=big
13691      ;;
13692    *)
13693      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13694      ;;
13695  esac
13696
13697  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13698  OPENJDK_TARGET_OS="$VAR_OS"
13699  if test "x$VAR_OS_TYPE" != x; then
13700    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13701  else
13702    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13703  fi
13704  if test "x$VAR_OS_ENV" != x; then
13705    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13706  else
13707    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13708  fi
13709  OPENJDK_TARGET_CPU="$VAR_CPU"
13710  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13711  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13712  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13713
13714
13715
13716
13717
13718
13719
13720
13721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13722$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13724$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13725
13726
13727
13728# Check whether --with-target-bits was given.
13729if test "${with_target_bits+set}" = set; then :
13730  withval=$with_target_bits;
13731fi
13732
13733
13734  # We have three types of compiles:
13735  # native  == normal compilation, target system == build system
13736  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13737  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13738  #
13739  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13740    # We're doing a proper cross-compilation
13741    COMPILE_TYPE="cross"
13742  else
13743    COMPILE_TYPE="native"
13744  fi
13745
13746  if test "x$with_target_bits" != x; then
13747    if test "x$COMPILE_TYPE" = "xcross"; then
13748      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13749    fi
13750
13751    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13752      # A reduced build is requested
13753      COMPILE_TYPE="reduced"
13754      OPENJDK_TARGET_CPU_BITS=32
13755      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13756        OPENJDK_TARGET_CPU=x86
13757      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13758        OPENJDK_TARGET_CPU=sparc
13759      else
13760        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13761      fi
13762    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13763      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
13764    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13765      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13766$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13767    else
13768      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13769    fi
13770  fi
13771
13772
13773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13774$as_echo_n "checking compilation type... " >&6; }
13775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13776$as_echo "$COMPILE_TYPE" >&6; }
13777
13778
13779  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13780    REQUIRED_OS_NAME=SunOS
13781    REQUIRED_OS_VERSION=5.10
13782  fi
13783  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13784    REQUIRED_OS_NAME=Linux
13785    REQUIRED_OS_VERSION=2.6
13786  fi
13787  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13788    REQUIRED_OS_NAME=Windows
13789    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13790      REQUIRED_OS_VERSION=5.2
13791    else
13792      REQUIRED_OS_VERSION=5.1
13793    fi
13794  fi
13795  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13796    REQUIRED_OS_NAME=Darwin
13797    REQUIRED_OS_VERSION=11.2
13798  fi
13799
13800
13801
13802
13803
13804  # Also store the legacy naming of the cpu.
13805  # Ie i586 and amd64 instead of x86 and x86_64
13806  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13807  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13808    OPENJDK_TARGET_CPU_LEGACY="i586"
13809  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13810    # On all platforms except MacOSX replace x86_64 with amd64.
13811    OPENJDK_TARGET_CPU_LEGACY="amd64"
13812  fi
13813
13814
13815  # And the second legacy naming of the cpu.
13816  # Ie i386 and amd64 instead of x86 and x86_64.
13817  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13818  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13819    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13820  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13821    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13822  fi
13823
13824
13825  # This is the name of the cpu (but using i386 and amd64 instead of
13826  # x86 and x86_64, respectively), preceeded by a /, to be used when
13827  # locating libraries. On macosx, it's empty, though.
13828  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13829  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13830    OPENJDK_TARGET_CPU_LIBDIR=""
13831  fi
13832
13833
13834  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13835  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13836  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13837  OPENJDK_TARGET_CPU_ISADIR=""
13838  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13839    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13840      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13841    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13842      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13843    fi
13844  fi
13845
13846
13847  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13848  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13849  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13850    # On linux only, we replace x86 with i386.
13851    OPENJDK_TARGET_CPU_OSARCH="i386"
13852  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13853    # On all platforms except macosx, we replace x86_64 with amd64.
13854    OPENJDK_TARGET_CPU_OSARCH="amd64"
13855  fi
13856
13857
13858  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13859  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13860    OPENJDK_TARGET_CPU_JLI="i386"
13861  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13862    # On all platforms except macosx, we replace x86_64 with amd64.
13863    OPENJDK_TARGET_CPU_JLI="amd64"
13864  fi
13865  # Now setup the -D flags for building libjli.
13866  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13867  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13868    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13869      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13870    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13871      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13872    fi
13873  fi
13874
13875
13876  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13877      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13878  else
13879      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13880  fi
13881
13882
13883  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13884    A_LP64="LP64:="
13885    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13886    # unpack200.exe
13887    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13888      ADD_LP64="-D_LP64=1"
13889    fi
13890  fi
13891  LP64=$A_LP64
13892
13893
13894  if test "x$COMPILE_TYPE" = "xcross"; then
13895    # FIXME: ... or should this include reduced builds..?
13896    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13897  else
13898    DEFINE_CROSS_COMPILE_ARCH=""
13899  fi
13900
13901
13902  # ZERO_ARCHDEF is used to enable architecture-specific code
13903  case "${OPENJDK_TARGET_CPU}" in
13904    ppc)     ZERO_ARCHDEF=PPC32 ;;
13905    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13906    s390*)   ZERO_ARCHDEF=S390  ;;
13907    sparc*)  ZERO_ARCHDEF=SPARC ;;
13908    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13909    x86)     ZERO_ARCHDEF=IA32  ;;
13910    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13911  esac
13912
13913
13914
13915
13916# Continue setting up basic stuff. Most remaining code require fundamental tools.
13917
13918  # Save the current directory this script was started from
13919  CURDIR="$PWD"
13920
13921  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
13922  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
13923  # was not available at that time.
13924  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
13925  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
13926    ORIGINAL_PATH="$REWRITTEN_PATH"
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
13928$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
13929  fi
13930
13931  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13932    PATH_SEP=";"
13933
13934  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13935  if test $SRC_ROOT_LENGTH -gt 100; then
13936    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13937  fi
13938
13939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13941$as_echo_n "checking cygwin release... " >&6; }
13942    CYGWIN_VERSION=`$UNAME -r`
13943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13944$as_echo "$CYGWIN_VERSION" >&6; }
13945    WINDOWS_ENV_VENDOR='cygwin'
13946    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13947
13948    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13949    if test "x$CYGWIN_VERSION_OLD" != x; then
13950      { $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
13951$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;}
13952      as_fn_error $? "Cannot continue" "$LINENO" 5
13953    fi
13954    if test "x$CYGPATH" = x; then
13955      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13956    fi
13957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13958$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13959    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13960    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13961    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13962    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13964$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13965    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13966    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13967    if test "x$test_cygdrive_prefix" = x; then
13968      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13969    fi
13970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13972$as_echo_n "checking msys release... " >&6; }
13973    MSYS_VERSION=`$UNAME -r`
13974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13975$as_echo "$MSYS_VERSION" >&6; }
13976
13977    WINDOWS_ENV_VENDOR='msys'
13978    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13979
13980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13981$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13982    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13983    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13984
13985  windows_path="$MSYS_ROOT_PATH"
13986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13987    unix_path=`$CYGPATH -u "$windows_path"`
13988    MSYS_ROOT_PATH="$unix_path"
13989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13991    MSYS_ROOT_PATH="$unix_path"
13992  fi
13993
13994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13995$as_echo "$MSYS_ROOT_PATH" >&6; }
13996    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13997  else
13998    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13999  fi
14000
14001  # Test if windows or unix (cygwin/msys) find is first in path.
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14003$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14004  FIND_BINARY_OUTPUT=`find --version 2>&1`
14005  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14007$as_echo "unix style" >&6; }
14008  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14010$as_echo "Windows" >&6; }
14011    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14012$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14013    { $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
14014$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14015    as_fn_error $? "Cannot continue" "$LINENO" 5
14016  else
14017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14018$as_echo "unknown" >&6; }
14019    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14020$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14021  fi
14022
14023  else
14024    PATH_SEP=":"
14025  fi
14026
14027
14028  # We get the top-level directory from the supporting wrappers.
14029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14030$as_echo_n "checking for top-level directory... " >&6; }
14031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14032$as_echo "$TOPDIR" >&6; }
14033
14034
14035  # Save the original version of TOPDIR for string comparisons
14036  ORIGINAL_TOPDIR="$TOPDIR"
14037
14038
14039  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14040
14041  # Only process if variable expands to non-empty
14042
14043  if test "x$CURDIR" != x; then
14044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14045
14046  # Input might be given as Windows format, start by converting to
14047  # unix format.
14048  path="$CURDIR"
14049  new_path=`$CYGPATH -u "$path"`
14050
14051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14054  # "foo.exe" is OK but "foo" is an error.
14055  #
14056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14057  # It is also a way to make sure we got the proper file name for the real test later on.
14058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14059  if test "x$test_shortpath" = x; then
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14061$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14062    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14063  fi
14064
14065  # Call helper function which possibly converts this using DOS-style short mode.
14066  # If so, the updated path is stored in $new_path.
14067
14068  input_path="$new_path"
14069  # Check if we need to convert this using DOS-style short mode. If the path
14070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14071  # take no chances and rewrite it.
14072  # Note: m4 eats our [], so we need to use [ and ] instead.
14073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14074  if test "x$has_forbidden_chars" != x; then
14075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14079      # Going to short mode and back again did indeed matter. Since short mode is
14080      # case insensitive, let's make it lowercase to improve readability.
14081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14082      # Now convert it back to Unix-style (cygpath)
14083      input_path=`$CYGPATH -u "$shortmode_path"`
14084      new_path="$input_path"
14085    fi
14086  fi
14087
14088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14089  if test "x$test_cygdrive_prefix" = x; then
14090    # As a simple fix, exclude /usr/bin since it's not a real path.
14091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14093      # a path prefixed by /cygdrive for fixpath to work.
14094      new_path="$CYGWIN_ROOT_PATH$input_path"
14095    fi
14096  fi
14097
14098
14099  if test "x$path" != "x$new_path"; then
14100    CURDIR="$new_path"
14101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14102$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14103  fi
14104
14105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14106
14107  path="$CURDIR"
14108  has_colon=`$ECHO $path | $GREP ^.:`
14109  new_path="$path"
14110  if test "x$has_colon" = x; then
14111    # Not in mixed or Windows style, start by that.
14112    new_path=`cmd //c echo $path`
14113  fi
14114
14115
14116  input_path="$new_path"
14117  # Check if we need to convert this using DOS-style short mode. If the path
14118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14119  # take no chances and rewrite it.
14120  # Note: m4 eats our [], so we need to use [ and ] instead.
14121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14122  if test "x$has_forbidden_chars" != x; then
14123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14125  fi
14126
14127
14128  windows_path="$new_path"
14129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14130    unix_path=`$CYGPATH -u "$windows_path"`
14131    new_path="$unix_path"
14132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14134    new_path="$unix_path"
14135  fi
14136
14137  if test "x$path" != "x$new_path"; then
14138    CURDIR="$new_path"
14139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14140$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14141  fi
14142
14143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14145
14146    else
14147      # We're on a unix platform. Hooray! :)
14148      path="$CURDIR"
14149      has_space=`$ECHO "$path" | $GREP " "`
14150      if test "x$has_space" != x; then
14151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14152$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14154      fi
14155
14156      # Use eval to expand a potential ~
14157      eval path="$path"
14158      if test ! -f "$path" && test ! -d "$path"; then
14159        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14160      fi
14161
14162      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14163    fi
14164  fi
14165
14166
14167  # Only process if variable expands to non-empty
14168
14169  if test "x$TOPDIR" != x; then
14170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14171
14172  # Input might be given as Windows format, start by converting to
14173  # unix format.
14174  path="$TOPDIR"
14175  new_path=`$CYGPATH -u "$path"`
14176
14177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14180  # "foo.exe" is OK but "foo" is an error.
14181  #
14182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14183  # It is also a way to make sure we got the proper file name for the real test later on.
14184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14185  if test "x$test_shortpath" = x; then
14186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14187$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14188    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14189  fi
14190
14191  # Call helper function which possibly converts this using DOS-style short mode.
14192  # If so, the updated path is stored in $new_path.
14193
14194  input_path="$new_path"
14195  # Check if we need to convert this using DOS-style short mode. If the path
14196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14197  # take no chances and rewrite it.
14198  # Note: m4 eats our [], so we need to use [ and ] instead.
14199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14200  if test "x$has_forbidden_chars" != x; then
14201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14205      # Going to short mode and back again did indeed matter. Since short mode is
14206      # case insensitive, let's make it lowercase to improve readability.
14207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14208      # Now convert it back to Unix-style (cygpath)
14209      input_path=`$CYGPATH -u "$shortmode_path"`
14210      new_path="$input_path"
14211    fi
14212  fi
14213
14214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14215  if test "x$test_cygdrive_prefix" = x; then
14216    # As a simple fix, exclude /usr/bin since it's not a real path.
14217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14219      # a path prefixed by /cygdrive for fixpath to work.
14220      new_path="$CYGWIN_ROOT_PATH$input_path"
14221    fi
14222  fi
14223
14224
14225  if test "x$path" != "x$new_path"; then
14226    TOPDIR="$new_path"
14227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14228$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14229  fi
14230
14231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14232
14233  path="$TOPDIR"
14234  has_colon=`$ECHO $path | $GREP ^.:`
14235  new_path="$path"
14236  if test "x$has_colon" = x; then
14237    # Not in mixed or Windows style, start by that.
14238    new_path=`cmd //c echo $path`
14239  fi
14240
14241
14242  input_path="$new_path"
14243  # Check if we need to convert this using DOS-style short mode. If the path
14244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14245  # take no chances and rewrite it.
14246  # Note: m4 eats our [], so we need to use [ and ] instead.
14247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14248  if test "x$has_forbidden_chars" != x; then
14249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14251  fi
14252
14253
14254  windows_path="$new_path"
14255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14256    unix_path=`$CYGPATH -u "$windows_path"`
14257    new_path="$unix_path"
14258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14260    new_path="$unix_path"
14261  fi
14262
14263  if test "x$path" != "x$new_path"; then
14264    TOPDIR="$new_path"
14265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14266$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14267  fi
14268
14269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14271
14272    else
14273      # We're on a unix platform. Hooray! :)
14274      path="$TOPDIR"
14275      has_space=`$ECHO "$path" | $GREP " "`
14276      if test "x$has_space" != x; then
14277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14278$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14280      fi
14281
14282      # Use eval to expand a potential ~
14283      eval path="$path"
14284      if test ! -f "$path" && test ! -d "$path"; then
14285        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14286      fi
14287
14288      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14289    fi
14290  fi
14291
14292  # SRC_ROOT is a traditional alias for TOPDIR.
14293  SRC_ROOT=$TOPDIR
14294
14295  # Calculate a canonical version of TOPDIR for string comparisons
14296  CANONICAL_TOPDIR=$TOPDIR
14297
14298  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14299    # Follow a chain of symbolic links. Use readlink
14300    # where it exists, else fall back to horribly
14301    # complicated shell code.
14302    if test "x$READLINK_TESTED" != yes; then
14303      # On MacOSX there is a readlink tool with a different
14304      # purpose than the GNU readlink tool. Check the found readlink.
14305      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14306      if test "x$ISGNU" = x; then
14307        # A readlink that we do not know how to use.
14308        # Are there other non-GNU readlinks out there?
14309        READLINK_TESTED=yes
14310        READLINK=
14311      fi
14312    fi
14313
14314    if test "x$READLINK" != x; then
14315      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14316    else
14317      # Save the current directory for restoring afterwards
14318      STARTDIR=$PWD
14319      COUNTER=0
14320      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14321      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14322      cd $sym_link_dir
14323      # Use -P flag to resolve symlinks in directories.
14324      cd `$THEPWDCMD -P`
14325      sym_link_dir=`$THEPWDCMD -P`
14326      # Resolve file symlinks
14327      while test $COUNTER -lt 20; do
14328        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14329        if test "x$ISLINK" == x; then
14330          # This is not a symbolic link! We are done!
14331          break
14332        fi
14333        # Again resolve directory symlinks since the target of the just found
14334        # link could be in a different directory
14335        cd `$DIRNAME $ISLINK`
14336        sym_link_dir=`$THEPWDCMD -P`
14337        sym_link_file=`$BASENAME $ISLINK`
14338        let COUNTER=COUNTER+1
14339      done
14340      cd $STARTDIR
14341      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14342    fi
14343  fi
14344
14345
14346
14347  # Locate the directory of this script.
14348  AUTOCONF_DIR=$TOPDIR/common/autoconf
14349
14350
14351# Check if it's a pure open build or if custom sources are to be used.
14352
14353  # Check whether --enable-openjdk-only was given.
14354if test "${enable_openjdk_only+set}" = set; then :
14355  enableval=$enable_openjdk_only;
14356else
14357  enable_openjdk_only="no"
14358fi
14359
14360
14361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14362$as_echo_n "checking for presence of closed sources... " >&6; }
14363  if test -d "$SRC_ROOT/jdk/src/closed"; then
14364    CLOSED_SOURCE_PRESENT=yes
14365  else
14366    CLOSED_SOURCE_PRESENT=no
14367  fi
14368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14369$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14370
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14372$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14373  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14375$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14376
14377  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14378    OPENJDK=true
14379    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14380      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14381$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14382    fi
14383  else
14384    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14385      OPENJDK=true
14386    else
14387      OPENJDK=false
14388    fi
14389  fi
14390
14391  if test "x$OPENJDK" = "xtrue"; then
14392    SET_OPENJDK="OPENJDK=true"
14393  fi
14394
14395
14396
14397  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14398  # the IncludeCustomExtension macro.
14399
14400
14401# Check whether --with-custom-make-dir was given.
14402if test "${with_custom_make_dir+set}" = set; then :
14403  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14404$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14405fi
14406
14407
14408
14409
14410# These are needed to be able to create a configuration name (and thus the output directory)
14411
14412  ###############################################################################
14413  #
14414  # Check which variant of the JDK that we want to build.
14415  # Currently we have:
14416  #    normal:   standard edition
14417  # but the custom make system may add other variants
14418  #
14419  # Effectively the JDK variant gives a name to a specific set of
14420  # modules to compile into the JDK. In the future, these modules
14421  # might even be Jigsaw modules.
14422  #
14423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14424$as_echo_n "checking which variant of the JDK to build... " >&6; }
14425
14426# Check whether --with-jdk-variant was given.
14427if test "${with_jdk_variant+set}" = set; then :
14428  withval=$with_jdk_variant;
14429fi
14430
14431
14432  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14433    JDK_VARIANT="normal"
14434  else
14435    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14436  fi
14437
14438
14439
14440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14441$as_echo "$JDK_VARIANT" >&6; }
14442
14443
14444###############################################################################
14445#
14446# Check which interpreter of the JVM we want to build.
14447# Currently we have:
14448#    template: Template interpreter (the default)
14449#    cpp     : C++ interpreter
14450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14451$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14452
14453# Check whether --with-jvm-interpreter was given.
14454if test "${with_jvm_interpreter+set}" = set; then :
14455  withval=$with_jvm_interpreter;
14456fi
14457
14458
14459if test "x$with_jvm_interpreter" = x; then
14460     with_jvm_interpreter="template"
14461fi
14462
14463JVM_INTERPRETER="$with_jvm_interpreter"
14464
14465if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14466   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14467fi
14468
14469
14470
14471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14472$as_echo "$with_jvm_interpreter" >&6; }
14473
14474
14475
14476  ###############################################################################
14477  #
14478  # Check which variants of the JVM that we want to build.
14479  # Currently we have:
14480  #    server: normal interpreter and a tiered C1/C2 compiler
14481  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14482  #    minimal1: reduced form of client with optional VM services and features stripped out
14483  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14484  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14485  #    zero: no machine code interpreter, no compiler
14486  #    zeroshark: zero interpreter and shark/llvm compiler backend
14487#    core: interpreter only, no compiler (only works on some platforms)
14488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14489$as_echo_n "checking which variants of the JVM to build... " >&6; }
14490
14491# Check whether --with-jvm-variants was given.
14492if test "${with_jvm_variants+set}" = set; then :
14493  withval=$with_jvm_variants;
14494fi
14495
14496
14497  if test "x$with_jvm_variants" = x; then
14498    with_jvm_variants="server"
14499  fi
14500
14501  JVM_VARIANTS=",$with_jvm_variants,"
14502  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14503
14504  if test "x$TEST_VARIANTS" != "x,"; then
14505     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14506  fi
14507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14508$as_echo "$with_jvm_variants" >&6; }
14509
14510  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14511  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14512  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14513  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14514  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14515  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14516  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14517
14518  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14519    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14520      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14521    fi
14522  fi
14523  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14524    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14525      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14526    fi
14527  fi
14528  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14529    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14530      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14531    fi
14532  fi
14533
14534  # Replace the commas with AND for use in the build directory name.
14535  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14536  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14537  if test "x$COUNT_VARIANTS" != "x,1"; then
14538    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14539  else
14540    BUILDING_MULTIPLE_JVM_VARIANTS=no
14541  fi
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552  INCLUDE_SA=true
14553  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14554    INCLUDE_SA=false
14555  fi
14556  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14557    INCLUDE_SA=false
14558  fi
14559  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14560    INCLUDE_SA=false
14561  fi
14562  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14563    INCLUDE_SA=false
14564  fi
14565
14566
14567  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14568    MACOSX_UNIVERSAL="true"
14569  fi
14570
14571
14572
14573
14574  ###############################################################################
14575  #
14576  # Set the debug level
14577  #    release: no debug information, all optimizations, no asserts.
14578  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14579  #    fastdebug: debug information (-g), all optimizations, all asserts
14580  #    slowdebug: debug information (-g), no optimizations, all asserts
14581  #
14582  DEBUG_LEVEL="release"
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14584$as_echo_n "checking which debug level to use... " >&6; }
14585  # Check whether --enable-debug was given.
14586if test "${enable_debug+set}" = set; then :
14587  enableval=$enable_debug;
14588        ENABLE_DEBUG="${enableval}"
14589        DEBUG_LEVEL="fastdebug"
14590
14591else
14592  ENABLE_DEBUG="no"
14593fi
14594
14595
14596
14597# Check whether --with-debug-level was given.
14598if test "${with_debug_level+set}" = set; then :
14599  withval=$with_debug_level;
14600        DEBUG_LEVEL="${withval}"
14601        if test "x$ENABLE_DEBUG" = xyes; then
14602          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14603        fi
14604
14605fi
14606
14607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14608$as_echo "$DEBUG_LEVEL" >&6; }
14609
14610  if test "x$DEBUG_LEVEL" != xrelease && \
14611      test "x$DEBUG_LEVEL" != xoptimized && \
14612      test "x$DEBUG_LEVEL" != xfastdebug && \
14613      test "x$DEBUG_LEVEL" != xslowdebug; then
14614    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14615  fi
14616
14617
14618  ###############################################################################
14619  #
14620  # Setup legacy vars/targets and new vars to deal with different debug levels.
14621  #
14622
14623  case $DEBUG_LEVEL in
14624    release )
14625      VARIANT="OPT"
14626      FASTDEBUG="false"
14627      DEBUG_CLASSFILES="false"
14628      BUILD_VARIANT_RELEASE=""
14629      HOTSPOT_DEBUG_LEVEL="product"
14630      HOTSPOT_EXPORT="product"
14631      ;;
14632    fastdebug )
14633      VARIANT="DBG"
14634      FASTDEBUG="true"
14635      DEBUG_CLASSFILES="true"
14636      BUILD_VARIANT_RELEASE="-fastdebug"
14637      HOTSPOT_DEBUG_LEVEL="fastdebug"
14638      HOTSPOT_EXPORT="fastdebug"
14639      ;;
14640    slowdebug )
14641      VARIANT="DBG"
14642      FASTDEBUG="false"
14643      DEBUG_CLASSFILES="true"
14644      BUILD_VARIANT_RELEASE="-debug"
14645      HOTSPOT_DEBUG_LEVEL="debug"
14646      HOTSPOT_EXPORT="debug"
14647      ;;
14648    optimized )
14649      VARIANT="OPT"
14650      FASTDEBUG="false"
14651      DEBUG_CLASSFILES="false"
14652      BUILD_VARIANT_RELEASE="-optimized"
14653      HOTSPOT_DEBUG_LEVEL="optimized"
14654      HOTSPOT_EXPORT="optimized"
14655      ;;
14656  esac
14657
14658  # The debug level 'optimized' is a little special because it is currently only
14659  # applicable to the HotSpot build where it means to build a completely
14660  # optimized version of the VM without any debugging code (like for the
14661  # 'release' debug level which is called 'product' in the HotSpot build) but
14662  # with the exception that it can contain additional code which is otherwise
14663  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14664  # test new and/or experimental features which are not intended for customer
14665  # shipment. Because these new features need to be tested and benchmarked in
14666  # real world scenarios, we want to build the containing JDK at the 'release'
14667  # debug level.
14668  if test "x$DEBUG_LEVEL" = xoptimized; then
14669    DEBUG_LEVEL="release"
14670  fi
14671
14672  #####
14673  # Generate the legacy makefile targets for hotspot.
14674  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14675  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14676  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14677  # But until then ...
14678  HOTSPOT_TARGET=""
14679
14680  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14681    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14682  fi
14683
14684  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14685    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14686  fi
14687
14688  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14689    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14690  fi
14691
14692  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14694  fi
14695
14696  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14698  fi
14699
14700  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14701    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14702  fi
14703
14704  if test "x$JVM_VARIANT_CORE" = xtrue; then
14705    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14706  fi
14707
14708  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14709
14710  # On Macosx universal binaries are produced, but they only contain
14711  # 64 bit intel. This invalidates control of which jvms are built
14712  # from configure, but only server is valid anyway. Fix this
14713  # when hotspot makefiles are rewritten.
14714  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14715    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14716  fi
14717
14718  #####
14719
14720
14721
14722
14723
14724
14725
14726
14727# With basic setup done, call the custom early hook.
14728
14729
14730# Check if we have devkits, extra paths or sysroot set.
14731
14732
14733# Check whether --with-devkit was given.
14734if test "${with_devkit+set}" = set; then :
14735  withval=$with_devkit;
14736
14737  # Only process if variable expands to non-empty
14738
14739  if test "x$with_devkit" != x; then
14740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14741
14742  # Input might be given as Windows format, start by converting to
14743  # unix format.
14744  path="$with_devkit"
14745  new_path=`$CYGPATH -u "$path"`
14746
14747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14750  # "foo.exe" is OK but "foo" is an error.
14751  #
14752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14753  # It is also a way to make sure we got the proper file name for the real test later on.
14754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14755  if test "x$test_shortpath" = x; then
14756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14757$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14758    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14759  fi
14760
14761  # Call helper function which possibly converts this using DOS-style short mode.
14762  # If so, the updated path is stored in $new_path.
14763
14764  input_path="$new_path"
14765  # Check if we need to convert this using DOS-style short mode. If the path
14766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14767  # take no chances and rewrite it.
14768  # Note: m4 eats our [], so we need to use [ and ] instead.
14769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14770  if test "x$has_forbidden_chars" != x; then
14771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14775      # Going to short mode and back again did indeed matter. Since short mode is
14776      # case insensitive, let's make it lowercase to improve readability.
14777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14778      # Now convert it back to Unix-style (cygpath)
14779      input_path=`$CYGPATH -u "$shortmode_path"`
14780      new_path="$input_path"
14781    fi
14782  fi
14783
14784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14785  if test "x$test_cygdrive_prefix" = x; then
14786    # As a simple fix, exclude /usr/bin since it's not a real path.
14787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14789      # a path prefixed by /cygdrive for fixpath to work.
14790      new_path="$CYGWIN_ROOT_PATH$input_path"
14791    fi
14792  fi
14793
14794
14795  if test "x$path" != "x$new_path"; then
14796    with_devkit="$new_path"
14797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14798$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14799  fi
14800
14801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14802
14803  path="$with_devkit"
14804  has_colon=`$ECHO $path | $GREP ^.:`
14805  new_path="$path"
14806  if test "x$has_colon" = x; then
14807    # Not in mixed or Windows style, start by that.
14808    new_path=`cmd //c echo $path`
14809  fi
14810
14811
14812  input_path="$new_path"
14813  # Check if we need to convert this using DOS-style short mode. If the path
14814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14815  # take no chances and rewrite it.
14816  # Note: m4 eats our [], so we need to use [ and ] instead.
14817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14818  if test "x$has_forbidden_chars" != x; then
14819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14821  fi
14822
14823
14824  windows_path="$new_path"
14825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14826    unix_path=`$CYGPATH -u "$windows_path"`
14827    new_path="$unix_path"
14828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14830    new_path="$unix_path"
14831  fi
14832
14833  if test "x$path" != "x$new_path"; then
14834    with_devkit="$new_path"
14835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14836$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14837  fi
14838
14839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14841
14842    else
14843      # We're on a unix platform. Hooray! :)
14844      path="$with_devkit"
14845      has_space=`$ECHO "$path" | $GREP " "`
14846      if test "x$has_space" != x; then
14847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14848$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14850      fi
14851
14852      # Use eval to expand a potential ~
14853      eval path="$path"
14854      if test ! -f "$path" && test ! -d "$path"; then
14855        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14856      fi
14857
14858      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14859    fi
14860  fi
14861
14862        DEVKIT_ROOT="$with_devkit"
14863        # Check for a meta data info file in the root of the devkit
14864        if test -f "$DEVKIT_ROOT/devkit.info"; then
14865          . $DEVKIT_ROOT/devkit.info
14866          # This potentially sets the following:
14867          # A descriptive name of the devkit
14868
14869  if test "x$DEVKIT_NAME" = x; then
14870    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14871  fi
14872
14873          # Corresponds to --with-extra-path
14874
14875  if test "x$DEVKIT_EXTRA_PATH" = x; then
14876    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14877  fi
14878
14879          # Corresponds to --with-toolchain-path
14880
14881  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14882    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14883  fi
14884
14885          # Corresponds to --with-sysroot
14886
14887  if test "x$DEVKIT_SYSROOT" = x; then
14888    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14889  fi
14890
14891
14892          # Identifies the Visual Studio version in the devkit
14893
14894  if test "x$DEVKIT_VS_VERSION" = x; then
14895    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14896  fi
14897
14898          # The Visual Studio include environment variable
14899
14900  if test "x$DEVKIT_VS_INCLUDE" = x; then
14901    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14902  fi
14903
14904          # The Visual Studio lib environment variable
14905
14906  if test "x$DEVKIT_VS_LIB" = x; then
14907    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14908  fi
14909
14910          # Corresponds to --with-msvcr-dll
14911
14912  if test "x$DEVKIT_MSVCR_DLL" = x; then
14913    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14914  fi
14915
14916          # Corresponds to --with-msvcp-dll
14917
14918  if test "x$DEVKIT_MSVCP_DLL" = x; then
14919    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14920  fi
14921
14922        fi
14923
14924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14925$as_echo_n "checking for devkit... " >&6; }
14926        if test "x$DEVKIT_NAME" != x; then
14927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14928$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14929        else
14930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14931$as_echo "$DEVKIT_ROOT" >&6; }
14932        fi
14933
14934
14935  if test "x$DEVKIT_EXTRA_PATH" != x; then
14936    if test "x$EXTRA_PATH" = x; then
14937      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14938    else
14939      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14940    fi
14941  fi
14942
14943
14944        # Fallback default of just /bin if DEVKIT_PATH is not defined
14945        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14946          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14947        fi
14948
14949  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14950    if test "x$TOOLCHAIN_PATH" = x; then
14951      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14952    else
14953      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14954    fi
14955  fi
14956
14957
14958        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14959        # places for backwards compatiblity.
14960        if test "x$DEVKIT_SYSROOT" != x; then
14961          SYSROOT="$DEVKIT_SYSROOT"
14962        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14963          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14964        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14965          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14966        fi
14967
14968
14969fi
14970
14971
14972  # You can force the sysroot if the sysroot encoded into the compiler tools
14973  # is not correct.
14974
14975# Check whether --with-sys-root was given.
14976if test "${with_sys_root+set}" = set; then :
14977  withval=$with_sys_root; SYSROOT=$with_sys_root
14978
14979fi
14980
14981
14982
14983# Check whether --with-sysroot was given.
14984if test "${with_sysroot+set}" = set; then :
14985  withval=$with_sysroot; SYSROOT=$with_sysroot
14986
14987fi
14988
14989
14990
14991# Check whether --with-tools-dir was given.
14992if test "${with_tools_dir+set}" = set; then :
14993  withval=$with_tools_dir;
14994  if test "x$with_tools_dir" != x; then
14995    if test "x$TOOLCHAIN_PATH" = x; then
14996      TOOLCHAIN_PATH="$with_tools_dir"
14997    else
14998      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14999    fi
15000  fi
15001
15002
15003fi
15004
15005
15006
15007# Check whether --with-toolchain-path was given.
15008if test "${with_toolchain_path+set}" = set; then :
15009  withval=$with_toolchain_path;
15010  if test "x$with_toolchain_path" != x; then
15011    if test "x$TOOLCHAIN_PATH" = x; then
15012      TOOLCHAIN_PATH="$with_toolchain_path"
15013    else
15014      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15015    fi
15016  fi
15017
15018
15019fi
15020
15021
15022
15023# Check whether --with-extra-path was given.
15024if test "${with_extra_path+set}" = set; then :
15025  withval=$with_extra_path;
15026  if test "x$with_extra_path" != x; then
15027    if test "x$EXTRA_PATH" = x; then
15028      EXTRA_PATH="$with_extra_path"
15029    else
15030      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15031    fi
15032  fi
15033
15034
15035fi
15036
15037
15038  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15039    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15040    # If not, detect if Xcode is installed by running xcodebuild -version
15041    # if no Xcode installed, xcodebuild exits with 1
15042    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15043    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15044      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15045      # fall back on the stub binary in /usr/bin/xcodebuild
15046      # Extract the first word of "xcodebuild", so it can be a program name with args.
15047set dummy xcodebuild; ac_word=$2
15048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15049$as_echo_n "checking for $ac_word... " >&6; }
15050if ${ac_cv_path_XCODEBUILD+:} false; then :
15051  $as_echo_n "(cached) " >&6
15052else
15053  case $XCODEBUILD in
15054  [\\/]* | ?:[\\/]*)
15055  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15056  ;;
15057  *)
15058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15059for as_dir in $TOOLCHAIN_PATH
15060do
15061  IFS=$as_save_IFS
15062  test -z "$as_dir" && as_dir=.
15063    for ac_exec_ext in '' $ac_executable_extensions; do
15064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15065    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15067    break 2
15068  fi
15069done
15070  done
15071IFS=$as_save_IFS
15072
15073  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15074  ;;
15075esac
15076fi
15077XCODEBUILD=$ac_cv_path_XCODEBUILD
15078if test -n "$XCODEBUILD"; then
15079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15080$as_echo "$XCODEBUILD" >&6; }
15081else
15082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15083$as_echo "no" >&6; }
15084fi
15085
15086
15087    else
15088      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15089      # when only the command line tools are installed there are no SDKs, so headers
15090      # are copied into the system frameworks
15091      XCODEBUILD=
15092
15093    fi
15094
15095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15096$as_echo_n "checking for sdk name... " >&6; }
15097
15098# Check whether --with-sdk-name was given.
15099if test "${with_sdk_name+set}" = set; then :
15100  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15101
15102fi
15103
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15105$as_echo "$SDKNAME" >&6; }
15106
15107    # if toolchain path is specified then don't rely on system headers, they may not compile
15108    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15109    test -z "$TOOLCHAIN_PATH" && \
15110      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15111
15112    if test -z "$SYSROOT"; then
15113      if test -n "$XCODEBUILD"; then
15114        # if we don't have system headers, use default SDK name (last resort)
15115        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15116          SDKNAME=${SDKNAME:-macosx}
15117        fi
15118
15119        if test -n "$SDKNAME"; then
15120          # Call xcodebuild to determine SYSROOT
15121          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15122        fi
15123      else
15124        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15125          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
15126        fi
15127      fi
15128    else
15129      # warn user if --with-sdk-name was also set
15130      if test -n "$with_sdk_name"; then
15131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15132$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15133      fi
15134    fi
15135
15136    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15137      # If no system framework headers, then SYSROOT must be set, or we won't build
15138      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
15139    fi
15140
15141    # Perform a basic sanity test
15142    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15143      if test -z "$SYSROOT"; then
15144        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
15145      else
15146        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15147      fi
15148    fi
15149
15150    # set SDKROOT too, Xcode tools will pick it up
15151    SDKROOT=$SYSROOT
15152
15153  fi
15154
15155  # Prepend the extra path to the global path
15156
15157  if test "x$EXTRA_PATH" != x; then
15158    if test "x$PATH" = x; then
15159      PATH="$EXTRA_PATH"
15160    else
15161      PATH="$EXTRA_PATH:$PATH"
15162    fi
15163  fi
15164
15165
15166  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15167    # Add extra search paths on solaris for utilities like ar and as etc...
15168    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15169  fi
15170
15171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15172$as_echo_n "checking for sysroot... " >&6; }
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15174$as_echo "$SYSROOT" >&6; }
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15176$as_echo_n "checking for toolchain path... " >&6; }
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15178$as_echo "$TOOLCHAIN_PATH" >&6; }
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15180$as_echo_n "checking for extra path... " >&6; }
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15182$as_echo "$EXTRA_PATH" >&6; }
15183
15184
15185# To properly create a configuration name, we need to have the OpenJDK target
15186# and options (variants and debug level) parsed.
15187
15188
15189
15190# Check whether --with-conf-name was given.
15191if test "${with_conf_name+set}" = set; then :
15192  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15193fi
15194
15195
15196  # Test from where we are running configure, in or outside of src root.
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15198$as_echo_n "checking where to store configuration... " >&6; }
15199  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15200      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15201      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15202    # We are running configure from the src root.
15203    # Create a default ./build/target-variant-debuglevel output root.
15204    if test "x${CONF_NAME}" = x; then
15205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15206$as_echo "in default location" >&6; }
15207      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15208    else
15209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15210$as_echo "in build directory with custom name" >&6; }
15211    fi
15212    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15213    $MKDIR -p "$OUTPUT_ROOT"
15214    if test ! -d "$OUTPUT_ROOT"; then
15215      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15216    fi
15217  else
15218    # We are running configure from outside of the src dir.
15219    # Then use the current directory as output dir!
15220    # If configuration is situated in normal build directory, just use the build
15221    # directory name as configuration name, otherwise use the complete path.
15222    if test "x${CONF_NAME}" = x; then
15223      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15224    fi
15225    OUTPUT_ROOT="$CURDIR"
15226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15227$as_echo "in current directory" >&6; }
15228
15229    # WARNING: This might be a bad thing to do. You need to be sure you want to
15230    # have a configuration in this directory. Do some sanity checks!
15231
15232    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15233      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15234      # other files
15235      files_present=`$LS $OUTPUT_ROOT`
15236      # Configure has already touched config.log and confdefs.h in the current dir when this check
15237      # is performed.
15238      filtered_files=`$ECHO "$files_present" \
15239          | $SED -e 's/config.log//g' \
15240              -e 's/configure.log//g' \
15241              -e 's/confdefs.h//g' \
15242              -e 's/ //g' \
15243          | $TR -d '\n'`
15244      if test "x$filtered_files" != x; then
15245        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15246$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15248$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15250$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15252$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15253        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15254$as_echo "$as_me: seriously mess up just about everything." >&6;}
15255        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15256$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15257        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15258$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15259        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15260      fi
15261    fi
15262  fi
15263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15264$as_echo_n "checking what configuration name to use... " >&6; }
15265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15266$as_echo "$CONF_NAME" >&6; }
15267
15268
15269  # Only process if variable expands to non-empty
15270
15271  if test "x$OUTPUT_ROOT" != x; then
15272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15273
15274  # Input might be given as Windows format, start by converting to
15275  # unix format.
15276  path="$OUTPUT_ROOT"
15277  new_path=`$CYGPATH -u "$path"`
15278
15279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15282  # "foo.exe" is OK but "foo" is an error.
15283  #
15284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15285  # It is also a way to make sure we got the proper file name for the real test later on.
15286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15287  if test "x$test_shortpath" = x; then
15288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15289$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15290    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15291  fi
15292
15293  # Call helper function which possibly converts this using DOS-style short mode.
15294  # If so, the updated path is stored in $new_path.
15295
15296  input_path="$new_path"
15297  # Check if we need to convert this using DOS-style short mode. If the path
15298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15299  # take no chances and rewrite it.
15300  # Note: m4 eats our [], so we need to use [ and ] instead.
15301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15302  if test "x$has_forbidden_chars" != x; then
15303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15307      # Going to short mode and back again did indeed matter. Since short mode is
15308      # case insensitive, let's make it lowercase to improve readability.
15309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15310      # Now convert it back to Unix-style (cygpath)
15311      input_path=`$CYGPATH -u "$shortmode_path"`
15312      new_path="$input_path"
15313    fi
15314  fi
15315
15316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15317  if test "x$test_cygdrive_prefix" = x; then
15318    # As a simple fix, exclude /usr/bin since it's not a real path.
15319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15321      # a path prefixed by /cygdrive for fixpath to work.
15322      new_path="$CYGWIN_ROOT_PATH$input_path"
15323    fi
15324  fi
15325
15326
15327  if test "x$path" != "x$new_path"; then
15328    OUTPUT_ROOT="$new_path"
15329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15330$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15331  fi
15332
15333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15334
15335  path="$OUTPUT_ROOT"
15336  has_colon=`$ECHO $path | $GREP ^.:`
15337  new_path="$path"
15338  if test "x$has_colon" = x; then
15339    # Not in mixed or Windows style, start by that.
15340    new_path=`cmd //c echo $path`
15341  fi
15342
15343
15344  input_path="$new_path"
15345  # Check if we need to convert this using DOS-style short mode. If the path
15346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15347  # take no chances and rewrite it.
15348  # Note: m4 eats our [], so we need to use [ and ] instead.
15349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15350  if test "x$has_forbidden_chars" != x; then
15351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15353  fi
15354
15355
15356  windows_path="$new_path"
15357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15358    unix_path=`$CYGPATH -u "$windows_path"`
15359    new_path="$unix_path"
15360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15362    new_path="$unix_path"
15363  fi
15364
15365  if test "x$path" != "x$new_path"; then
15366    OUTPUT_ROOT="$new_path"
15367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15368$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15369  fi
15370
15371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15373
15374    else
15375      # We're on a unix platform. Hooray! :)
15376      path="$OUTPUT_ROOT"
15377      has_space=`$ECHO "$path" | $GREP " "`
15378      if test "x$has_space" != x; then
15379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15380$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15382      fi
15383
15384      # Use eval to expand a potential ~
15385      eval path="$path"
15386      if test ! -f "$path" && test ! -d "$path"; then
15387        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15388      fi
15389
15390      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15391    fi
15392  fi
15393
15394
15395  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15396  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15397
15398  SPEC=$OUTPUT_ROOT/spec.gmk
15399
15400  CONF_NAME=$CONF_NAME
15401
15402  OUTPUT_ROOT=$OUTPUT_ROOT
15403
15404
15405
15406  # The spec.gmk file contains all variables for the make system.
15407  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15408
15409  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15410  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15411
15412  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15413  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15414
15415  # The compare.sh is used to compare the build output to other builds.
15416  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15417
15418  # The generated Makefile knows where the spec.gmk is and where the source is.
15419  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15420  # which will look for generated configurations
15421  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15422
15423
15424
15425# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15426
15427  for ac_prog in apt-get yum port pkgutil pkgadd
15428do
15429  # Extract the first word of "$ac_prog", so it can be a program name with args.
15430set dummy $ac_prog; ac_word=$2
15431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15432$as_echo_n "checking for $ac_word... " >&6; }
15433if ${ac_cv_prog_PKGHANDLER+:} false; then :
15434  $as_echo_n "(cached) " >&6
15435else
15436  if test -n "$PKGHANDLER"; then
15437  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15438else
15439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15440for as_dir in $PATH
15441do
15442  IFS=$as_save_IFS
15443  test -z "$as_dir" && as_dir=.
15444    for ac_exec_ext in '' $ac_executable_extensions; do
15445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15446    ac_cv_prog_PKGHANDLER="$ac_prog"
15447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15448    break 2
15449  fi
15450done
15451  done
15452IFS=$as_save_IFS
15453
15454fi
15455fi
15456PKGHANDLER=$ac_cv_prog_PKGHANDLER
15457if test -n "$PKGHANDLER"; then
15458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15459$as_echo "$PKGHANDLER" >&6; }
15460else
15461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15462$as_echo "no" >&6; }
15463fi
15464
15465
15466  test -n "$PKGHANDLER" && break
15467done
15468
15469
15470
15471# Setup tools that requires more complex handling, or that is not needed by the configure script.
15472
15473
15474  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15475  if test "x$MAKE" != x; then
15476    # User has supplied a make, test it.
15477    if test ! -f "$MAKE"; then
15478      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15479    fi
15480
15481  MAKE_CANDIDATE=""$MAKE""
15482  DESCRIPTION="user supplied MAKE=$MAKE"
15483
15484  # On Cygwin, we require a newer version of make than on other platforms
15485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15486    MAKE_VERSION_EXPR="-e 4\."
15487    MAKE_REQUIRED_VERSION="4.0"
15488   else
15489    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15490    MAKE_REQUIRED_VERSION="3.81"
15491  fi
15492
15493  if test "x$MAKE_CANDIDATE" != x; then
15494    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15495$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15496    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15497    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15498    if test "x$IS_GNU_MAKE" = x; then
15499      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15500$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15501    else
15502      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15503      if test "x$IS_MODERN_MAKE" = x; then
15504        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15505$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15506      else
15507        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15508          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15509            MAKE_EXPECTED_ENV='cygwin'
15510          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15511            MAKE_EXPECTED_ENV='msys'
15512          else
15513            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15514          fi
15515          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15516          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15517        else
15518          # Not relevant for non-Windows
15519          IS_MAKE_CORRECT_ENV=true
15520        fi
15521        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15522          { $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
15523$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;}
15524        else
15525          FOUND_MAKE=$MAKE_CANDIDATE
15526
15527  # Only process if variable expands to non-empty
15528
15529  if test "x$FOUND_MAKE" != x; then
15530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15531
15532  # First separate the path from the arguments. This will split at the first
15533  # space.
15534  complete="$FOUND_MAKE"
15535  path="${complete%% *}"
15536  tmp="$complete EOL"
15537  arguments="${tmp#* }"
15538
15539  # Input might be given as Windows format, start by converting to
15540  # unix format.
15541  new_path=`$CYGPATH -u "$path"`
15542
15543  # Now try to locate executable using which
15544  new_path=`$WHICH "$new_path" 2> /dev/null`
15545  # bat and cmd files are not always considered executable in cygwin causing which
15546  # to not find them
15547  if test "x$new_path" = x \
15548      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15549      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15550    new_path=`$CYGPATH -u "$path"`
15551  fi
15552  if test "x$new_path" = x; then
15553    # Oops. Which didn't find the executable.
15554    # The splitting of arguments from the executable at a space might have been incorrect,
15555    # since paths with space are more likely in Windows. Give it another try with the whole
15556    # argument.
15557    path="$complete"
15558    arguments="EOL"
15559    new_path=`$CYGPATH -u "$path"`
15560    new_path=`$WHICH "$new_path" 2> /dev/null`
15561    # bat and cmd files are not always considered executable in cygwin causing which
15562    # to not find them
15563    if test "x$new_path" = x \
15564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15566      new_path=`$CYGPATH -u "$path"`
15567    fi
15568    if test "x$new_path" = x; then
15569      # It's still not found. Now this is an unrecoverable error.
15570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15571$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15572      has_space=`$ECHO "$complete" | $GREP " "`
15573      if test "x$has_space" != x; then
15574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15576      fi
15577      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15578    fi
15579  fi
15580
15581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15584  # "foo.exe" is OK but "foo" is an error.
15585  #
15586  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15587  # It is also a way to make sure we got the proper file name for the real test later on.
15588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15589  if test "x$test_shortpath" = x; then
15590    # Short path failed, file does not exist as specified.
15591    # Try adding .exe or .cmd
15592    if test -f "${new_path}.exe"; then
15593      input_to_shortpath="${new_path}.exe"
15594    elif test -f "${new_path}.cmd"; then
15595      input_to_shortpath="${new_path}.cmd"
15596    else
15597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15598$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15601      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15602    fi
15603  else
15604    input_to_shortpath="$new_path"
15605  fi
15606
15607  # Call helper function which possibly converts this using DOS-style short mode.
15608  # If so, the updated path is stored in $new_path.
15609  new_path="$input_to_shortpath"
15610
15611  input_path="$input_to_shortpath"
15612  # Check if we need to convert this using DOS-style short mode. If the path
15613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15614  # take no chances and rewrite it.
15615  # Note: m4 eats our [], so we need to use [ and ] instead.
15616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15617  if test "x$has_forbidden_chars" != x; then
15618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15622      # Going to short mode and back again did indeed matter. Since short mode is
15623      # case insensitive, let's make it lowercase to improve readability.
15624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15625      # Now convert it back to Unix-style (cygpath)
15626      input_path=`$CYGPATH -u "$shortmode_path"`
15627      new_path="$input_path"
15628    fi
15629  fi
15630
15631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15632  if test "x$test_cygdrive_prefix" = x; then
15633    # As a simple fix, exclude /usr/bin since it's not a real path.
15634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15636      # a path prefixed by /cygdrive for fixpath to work.
15637      new_path="$CYGWIN_ROOT_PATH$input_path"
15638    fi
15639  fi
15640
15641  # remove trailing .exe if any
15642  new_path="${new_path/%.exe/}"
15643
15644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15645
15646  # First separate the path from the arguments. This will split at the first
15647  # space.
15648  complete="$FOUND_MAKE"
15649  path="${complete%% *}"
15650  tmp="$complete EOL"
15651  arguments="${tmp#* }"
15652
15653  # Input might be given as Windows format, start by converting to
15654  # unix format.
15655  new_path="$path"
15656
15657  windows_path="$new_path"
15658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15659    unix_path=`$CYGPATH -u "$windows_path"`
15660    new_path="$unix_path"
15661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15663    new_path="$unix_path"
15664  fi
15665
15666
15667  # Now try to locate executable using which
15668  new_path=`$WHICH "$new_path" 2> /dev/null`
15669
15670  if test "x$new_path" = x; then
15671    # Oops. Which didn't find the executable.
15672    # The splitting of arguments from the executable at a space might have been incorrect,
15673    # since paths with space are more likely in Windows. Give it another try with the whole
15674    # argument.
15675    path="$complete"
15676    arguments="EOL"
15677    new_path="$path"
15678
15679  windows_path="$new_path"
15680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15681    unix_path=`$CYGPATH -u "$windows_path"`
15682    new_path="$unix_path"
15683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15685    new_path="$unix_path"
15686  fi
15687
15688
15689    new_path=`$WHICH "$new_path" 2> /dev/null`
15690    # bat and cmd files are not always considered executable in MSYS causing which
15691    # to not find them
15692    if test "x$new_path" = x \
15693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15695      new_path="$path"
15696
15697  windows_path="$new_path"
15698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15699    unix_path=`$CYGPATH -u "$windows_path"`
15700    new_path="$unix_path"
15701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15703    new_path="$unix_path"
15704  fi
15705
15706    fi
15707
15708    if test "x$new_path" = x; then
15709      # It's still not found. Now this is an unrecoverable error.
15710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15711$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15712      has_space=`$ECHO "$complete" | $GREP " "`
15713      if test "x$has_space" != x; then
15714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15716      fi
15717      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15718    fi
15719  fi
15720
15721  # Now new_path has a complete unix path to the binary
15722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15723    # Keep paths in /bin as-is, but remove trailing .exe if any
15724    new_path="${new_path/%.exe/}"
15725    # Do not save /bin paths to all_fixpath_prefixes!
15726  else
15727    # Not in mixed or Windows style, start by that.
15728    new_path=`cmd //c echo $new_path`
15729
15730  input_path="$new_path"
15731  # Check if we need to convert this using DOS-style short mode. If the path
15732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15733  # take no chances and rewrite it.
15734  # Note: m4 eats our [], so we need to use [ and ] instead.
15735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15736  if test "x$has_forbidden_chars" != x; then
15737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15739  fi
15740
15741    # Output is in $new_path
15742
15743  windows_path="$new_path"
15744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15745    unix_path=`$CYGPATH -u "$windows_path"`
15746    new_path="$unix_path"
15747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15749    new_path="$unix_path"
15750  fi
15751
15752    # remove trailing .exe if any
15753    new_path="${new_path/%.exe/}"
15754
15755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15757  fi
15758
15759    else
15760      # We're on a unix platform. Hooray! :)
15761      # First separate the path from the arguments. This will split at the first
15762      # space.
15763      complete="$FOUND_MAKE"
15764      path="${complete%% *}"
15765      tmp="$complete EOL"
15766      arguments="${tmp#* }"
15767
15768      # Cannot rely on the command "which" here since it doesn't always work.
15769      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15770      if test -z "$is_absolute_path"; then
15771        # Path to executable is not absolute. Find it.
15772        IFS_save="$IFS"
15773        IFS=:
15774        for p in $PATH; do
15775          if test -f "$p/$path" && test -x "$p/$path"; then
15776            new_path="$p/$path"
15777            break
15778          fi
15779        done
15780        IFS="$IFS_save"
15781      else
15782        # This is an absolute path, we can use it without further modifications.
15783        new_path="$path"
15784      fi
15785
15786      if test "x$new_path" = x; then
15787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15788$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15789        has_space=`$ECHO "$complete" | $GREP " "`
15790        if test "x$has_space" != x; then
15791          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15792$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15793        fi
15794        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15795      fi
15796    fi
15797
15798    # Now join together the path and the arguments once again
15799    if test "x$arguments" != xEOL; then
15800      new_complete="$new_path ${arguments% *}"
15801    else
15802      new_complete="$new_path"
15803    fi
15804
15805    if test "x$complete" != "x$new_complete"; then
15806      FOUND_MAKE="$new_complete"
15807      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15808$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15809    fi
15810  fi
15811
15812        fi
15813      fi
15814    fi
15815  fi
15816
15817    if test "x$FOUND_MAKE" = x; then
15818      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15819    fi
15820  else
15821    # Try our hardest to locate a correct version of GNU make
15822    for ac_prog in gmake
15823do
15824  # Extract the first word of "$ac_prog", so it can be a program name with args.
15825set dummy $ac_prog; ac_word=$2
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15827$as_echo_n "checking for $ac_word... " >&6; }
15828if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15829  $as_echo_n "(cached) " >&6
15830else
15831  case $CHECK_GMAKE in
15832  [\\/]* | ?:[\\/]*)
15833  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15834  ;;
15835  *)
15836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15837for as_dir in $PATH
15838do
15839  IFS=$as_save_IFS
15840  test -z "$as_dir" && as_dir=.
15841    for ac_exec_ext in '' $ac_executable_extensions; do
15842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15843    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15845    break 2
15846  fi
15847done
15848  done
15849IFS=$as_save_IFS
15850
15851  ;;
15852esac
15853fi
15854CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15855if test -n "$CHECK_GMAKE"; then
15856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15857$as_echo "$CHECK_GMAKE" >&6; }
15858else
15859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15860$as_echo "no" >&6; }
15861fi
15862
15863
15864  test -n "$CHECK_GMAKE" && break
15865done
15866
15867
15868  MAKE_CANDIDATE=""$CHECK_GMAKE""
15869  DESCRIPTION="gmake in PATH"
15870
15871  # On Cygwin, we require a newer version of make than on other platforms
15872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15873    MAKE_VERSION_EXPR="-e 4\."
15874    MAKE_REQUIRED_VERSION="4.0"
15875   else
15876    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15877    MAKE_REQUIRED_VERSION="3.81"
15878  fi
15879
15880  if test "x$MAKE_CANDIDATE" != x; then
15881    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15882$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15883    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15884    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15885    if test "x$IS_GNU_MAKE" = x; then
15886      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15887$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15888    else
15889      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15890      if test "x$IS_MODERN_MAKE" = x; then
15891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15892$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15893      else
15894        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15895          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15896            MAKE_EXPECTED_ENV='cygwin'
15897          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15898            MAKE_EXPECTED_ENV='msys'
15899          else
15900            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15901          fi
15902          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15903          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15904        else
15905          # Not relevant for non-Windows
15906          IS_MAKE_CORRECT_ENV=true
15907        fi
15908        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15909          { $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
15910$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;}
15911        else
15912          FOUND_MAKE=$MAKE_CANDIDATE
15913
15914  # Only process if variable expands to non-empty
15915
15916  if test "x$FOUND_MAKE" != x; then
15917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15918
15919  # First separate the path from the arguments. This will split at the first
15920  # space.
15921  complete="$FOUND_MAKE"
15922  path="${complete%% *}"
15923  tmp="$complete EOL"
15924  arguments="${tmp#* }"
15925
15926  # Input might be given as Windows format, start by converting to
15927  # unix format.
15928  new_path=`$CYGPATH -u "$path"`
15929
15930  # Now try to locate executable using which
15931  new_path=`$WHICH "$new_path" 2> /dev/null`
15932  # bat and cmd files are not always considered executable in cygwin causing which
15933  # to not find them
15934  if test "x$new_path" = x \
15935      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15936      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15937    new_path=`$CYGPATH -u "$path"`
15938  fi
15939  if test "x$new_path" = x; then
15940    # Oops. Which didn't find the executable.
15941    # The splitting of arguments from the executable at a space might have been incorrect,
15942    # since paths with space are more likely in Windows. Give it another try with the whole
15943    # argument.
15944    path="$complete"
15945    arguments="EOL"
15946    new_path=`$CYGPATH -u "$path"`
15947    new_path=`$WHICH "$new_path" 2> /dev/null`
15948    # bat and cmd files are not always considered executable in cygwin causing which
15949    # to not find them
15950    if test "x$new_path" = x \
15951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15953      new_path=`$CYGPATH -u "$path"`
15954    fi
15955    if test "x$new_path" = x; then
15956      # It's still not found. Now this is an unrecoverable error.
15957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15959      has_space=`$ECHO "$complete" | $GREP " "`
15960      if test "x$has_space" != x; then
15961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15963      fi
15964      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15965    fi
15966  fi
15967
15968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15971  # "foo.exe" is OK but "foo" is an error.
15972  #
15973  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15974  # It is also a way to make sure we got the proper file name for the real test later on.
15975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15976  if test "x$test_shortpath" = x; then
15977    # Short path failed, file does not exist as specified.
15978    # Try adding .exe or .cmd
15979    if test -f "${new_path}.exe"; then
15980      input_to_shortpath="${new_path}.exe"
15981    elif test -f "${new_path}.cmd"; then
15982      input_to_shortpath="${new_path}.cmd"
15983    else
15984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15985$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15988      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15989    fi
15990  else
15991    input_to_shortpath="$new_path"
15992  fi
15993
15994  # Call helper function which possibly converts this using DOS-style short mode.
15995  # If so, the updated path is stored in $new_path.
15996  new_path="$input_to_shortpath"
15997
15998  input_path="$input_to_shortpath"
15999  # Check if we need to convert this using DOS-style short mode. If the path
16000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16001  # take no chances and rewrite it.
16002  # Note: m4 eats our [], so we need to use [ and ] instead.
16003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16004  if test "x$has_forbidden_chars" != x; then
16005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16009      # Going to short mode and back again did indeed matter. Since short mode is
16010      # case insensitive, let's make it lowercase to improve readability.
16011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16012      # Now convert it back to Unix-style (cygpath)
16013      input_path=`$CYGPATH -u "$shortmode_path"`
16014      new_path="$input_path"
16015    fi
16016  fi
16017
16018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16019  if test "x$test_cygdrive_prefix" = x; then
16020    # As a simple fix, exclude /usr/bin since it's not a real path.
16021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16023      # a path prefixed by /cygdrive for fixpath to work.
16024      new_path="$CYGWIN_ROOT_PATH$input_path"
16025    fi
16026  fi
16027
16028  # remove trailing .exe if any
16029  new_path="${new_path/%.exe/}"
16030
16031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16032
16033  # First separate the path from the arguments. This will split at the first
16034  # space.
16035  complete="$FOUND_MAKE"
16036  path="${complete%% *}"
16037  tmp="$complete EOL"
16038  arguments="${tmp#* }"
16039
16040  # Input might be given as Windows format, start by converting to
16041  # unix format.
16042  new_path="$path"
16043
16044  windows_path="$new_path"
16045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16046    unix_path=`$CYGPATH -u "$windows_path"`
16047    new_path="$unix_path"
16048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16050    new_path="$unix_path"
16051  fi
16052
16053
16054  # Now try to locate executable using which
16055  new_path=`$WHICH "$new_path" 2> /dev/null`
16056
16057  if test "x$new_path" = x; then
16058    # Oops. Which didn't find the executable.
16059    # The splitting of arguments from the executable at a space might have been incorrect,
16060    # since paths with space are more likely in Windows. Give it another try with the whole
16061    # argument.
16062    path="$complete"
16063    arguments="EOL"
16064    new_path="$path"
16065
16066  windows_path="$new_path"
16067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16068    unix_path=`$CYGPATH -u "$windows_path"`
16069    new_path="$unix_path"
16070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16072    new_path="$unix_path"
16073  fi
16074
16075
16076    new_path=`$WHICH "$new_path" 2> /dev/null`
16077    # bat and cmd files are not always considered executable in MSYS causing which
16078    # to not find them
16079    if test "x$new_path" = x \
16080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16082      new_path="$path"
16083
16084  windows_path="$new_path"
16085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16086    unix_path=`$CYGPATH -u "$windows_path"`
16087    new_path="$unix_path"
16088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16090    new_path="$unix_path"
16091  fi
16092
16093    fi
16094
16095    if test "x$new_path" = x; then
16096      # It's still not found. Now this is an unrecoverable error.
16097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16099      has_space=`$ECHO "$complete" | $GREP " "`
16100      if test "x$has_space" != x; then
16101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16103      fi
16104      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16105    fi
16106  fi
16107
16108  # Now new_path has a complete unix path to the binary
16109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16110    # Keep paths in /bin as-is, but remove trailing .exe if any
16111    new_path="${new_path/%.exe/}"
16112    # Do not save /bin paths to all_fixpath_prefixes!
16113  else
16114    # Not in mixed or Windows style, start by that.
16115    new_path=`cmd //c echo $new_path`
16116
16117  input_path="$new_path"
16118  # Check if we need to convert this using DOS-style short mode. If the path
16119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16120  # take no chances and rewrite it.
16121  # Note: m4 eats our [], so we need to use [ and ] instead.
16122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16123  if test "x$has_forbidden_chars" != x; then
16124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16126  fi
16127
16128    # Output is in $new_path
16129
16130  windows_path="$new_path"
16131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16132    unix_path=`$CYGPATH -u "$windows_path"`
16133    new_path="$unix_path"
16134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16136    new_path="$unix_path"
16137  fi
16138
16139    # remove trailing .exe if any
16140    new_path="${new_path/%.exe/}"
16141
16142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16144  fi
16145
16146    else
16147      # We're on a unix platform. Hooray! :)
16148      # First separate the path from the arguments. This will split at the first
16149      # space.
16150      complete="$FOUND_MAKE"
16151      path="${complete%% *}"
16152      tmp="$complete EOL"
16153      arguments="${tmp#* }"
16154
16155      # Cannot rely on the command "which" here since it doesn't always work.
16156      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16157      if test -z "$is_absolute_path"; then
16158        # Path to executable is not absolute. Find it.
16159        IFS_save="$IFS"
16160        IFS=:
16161        for p in $PATH; do
16162          if test -f "$p/$path" && test -x "$p/$path"; then
16163            new_path="$p/$path"
16164            break
16165          fi
16166        done
16167        IFS="$IFS_save"
16168      else
16169        # This is an absolute path, we can use it without further modifications.
16170        new_path="$path"
16171      fi
16172
16173      if test "x$new_path" = x; then
16174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16175$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16176        has_space=`$ECHO "$complete" | $GREP " "`
16177        if test "x$has_space" != x; then
16178          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16180        fi
16181        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16182      fi
16183    fi
16184
16185    # Now join together the path and the arguments once again
16186    if test "x$arguments" != xEOL; then
16187      new_complete="$new_path ${arguments% *}"
16188    else
16189      new_complete="$new_path"
16190    fi
16191
16192    if test "x$complete" != "x$new_complete"; then
16193      FOUND_MAKE="$new_complete"
16194      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16195$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16196    fi
16197  fi
16198
16199        fi
16200      fi
16201    fi
16202  fi
16203
16204
16205    if test "x$FOUND_MAKE" = x; then
16206      for ac_prog in make
16207do
16208  # Extract the first word of "$ac_prog", so it can be a program name with args.
16209set dummy $ac_prog; ac_word=$2
16210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16211$as_echo_n "checking for $ac_word... " >&6; }
16212if ${ac_cv_path_CHECK_MAKE+:} false; then :
16213  $as_echo_n "(cached) " >&6
16214else
16215  case $CHECK_MAKE in
16216  [\\/]* | ?:[\\/]*)
16217  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16218  ;;
16219  *)
16220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16221for as_dir in $PATH
16222do
16223  IFS=$as_save_IFS
16224  test -z "$as_dir" && as_dir=.
16225    for ac_exec_ext in '' $ac_executable_extensions; do
16226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16227    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16229    break 2
16230  fi
16231done
16232  done
16233IFS=$as_save_IFS
16234
16235  ;;
16236esac
16237fi
16238CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16239if test -n "$CHECK_MAKE"; then
16240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16241$as_echo "$CHECK_MAKE" >&6; }
16242else
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16244$as_echo "no" >&6; }
16245fi
16246
16247
16248  test -n "$CHECK_MAKE" && break
16249done
16250
16251
16252  MAKE_CANDIDATE=""$CHECK_MAKE""
16253  DESCRIPTION="make in PATH"
16254
16255  # On Cygwin, we require a newer version of make than on other platforms
16256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257    MAKE_VERSION_EXPR="-e 4\."
16258    MAKE_REQUIRED_VERSION="4.0"
16259   else
16260    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16261    MAKE_REQUIRED_VERSION="3.81"
16262  fi
16263
16264  if test "x$MAKE_CANDIDATE" != x; then
16265    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16266$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16267    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16268    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16269    if test "x$IS_GNU_MAKE" = x; then
16270      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16271$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16272    else
16273      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16274      if test "x$IS_MODERN_MAKE" = x; then
16275        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16276$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16277      else
16278        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16279          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16280            MAKE_EXPECTED_ENV='cygwin'
16281          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16282            MAKE_EXPECTED_ENV='msys'
16283          else
16284            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16285          fi
16286          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16287          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16288        else
16289          # Not relevant for non-Windows
16290          IS_MAKE_CORRECT_ENV=true
16291        fi
16292        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16293          { $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
16294$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;}
16295        else
16296          FOUND_MAKE=$MAKE_CANDIDATE
16297
16298  # Only process if variable expands to non-empty
16299
16300  if test "x$FOUND_MAKE" != x; then
16301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16302
16303  # First separate the path from the arguments. This will split at the first
16304  # space.
16305  complete="$FOUND_MAKE"
16306  path="${complete%% *}"
16307  tmp="$complete EOL"
16308  arguments="${tmp#* }"
16309
16310  # Input might be given as Windows format, start by converting to
16311  # unix format.
16312  new_path=`$CYGPATH -u "$path"`
16313
16314  # Now try to locate executable using which
16315  new_path=`$WHICH "$new_path" 2> /dev/null`
16316  # bat and cmd files are not always considered executable in cygwin causing which
16317  # to not find them
16318  if test "x$new_path" = x \
16319      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16320      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16321    new_path=`$CYGPATH -u "$path"`
16322  fi
16323  if test "x$new_path" = x; then
16324    # Oops. Which didn't find the executable.
16325    # The splitting of arguments from the executable at a space might have been incorrect,
16326    # since paths with space are more likely in Windows. Give it another try with the whole
16327    # argument.
16328    path="$complete"
16329    arguments="EOL"
16330    new_path=`$CYGPATH -u "$path"`
16331    new_path=`$WHICH "$new_path" 2> /dev/null`
16332    # bat and cmd files are not always considered executable in cygwin causing which
16333    # to not find them
16334    if test "x$new_path" = x \
16335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16337      new_path=`$CYGPATH -u "$path"`
16338    fi
16339    if test "x$new_path" = x; then
16340      # It's still not found. Now this is an unrecoverable error.
16341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16343      has_space=`$ECHO "$complete" | $GREP " "`
16344      if test "x$has_space" != x; then
16345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16347      fi
16348      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16349    fi
16350  fi
16351
16352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16355  # "foo.exe" is OK but "foo" is an error.
16356  #
16357  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16358  # It is also a way to make sure we got the proper file name for the real test later on.
16359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16360  if test "x$test_shortpath" = x; then
16361    # Short path failed, file does not exist as specified.
16362    # Try adding .exe or .cmd
16363    if test -f "${new_path}.exe"; then
16364      input_to_shortpath="${new_path}.exe"
16365    elif test -f "${new_path}.cmd"; then
16366      input_to_shortpath="${new_path}.cmd"
16367    else
16368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16370      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16371$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16372      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16373    fi
16374  else
16375    input_to_shortpath="$new_path"
16376  fi
16377
16378  # Call helper function which possibly converts this using DOS-style short mode.
16379  # If so, the updated path is stored in $new_path.
16380  new_path="$input_to_shortpath"
16381
16382  input_path="$input_to_shortpath"
16383  # Check if we need to convert this using DOS-style short mode. If the path
16384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16385  # take no chances and rewrite it.
16386  # Note: m4 eats our [], so we need to use [ and ] instead.
16387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16388  if test "x$has_forbidden_chars" != x; then
16389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16393      # Going to short mode and back again did indeed matter. Since short mode is
16394      # case insensitive, let's make it lowercase to improve readability.
16395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16396      # Now convert it back to Unix-style (cygpath)
16397      input_path=`$CYGPATH -u "$shortmode_path"`
16398      new_path="$input_path"
16399    fi
16400  fi
16401
16402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16403  if test "x$test_cygdrive_prefix" = x; then
16404    # As a simple fix, exclude /usr/bin since it's not a real path.
16405    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16407      # a path prefixed by /cygdrive for fixpath to work.
16408      new_path="$CYGWIN_ROOT_PATH$input_path"
16409    fi
16410  fi
16411
16412  # remove trailing .exe if any
16413  new_path="${new_path/%.exe/}"
16414
16415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16416
16417  # First separate the path from the arguments. This will split at the first
16418  # space.
16419  complete="$FOUND_MAKE"
16420  path="${complete%% *}"
16421  tmp="$complete EOL"
16422  arguments="${tmp#* }"
16423
16424  # Input might be given as Windows format, start by converting to
16425  # unix format.
16426  new_path="$path"
16427
16428  windows_path="$new_path"
16429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16430    unix_path=`$CYGPATH -u "$windows_path"`
16431    new_path="$unix_path"
16432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16434    new_path="$unix_path"
16435  fi
16436
16437
16438  # Now try to locate executable using which
16439  new_path=`$WHICH "$new_path" 2> /dev/null`
16440
16441  if test "x$new_path" = x; then
16442    # Oops. Which didn't find the executable.
16443    # The splitting of arguments from the executable at a space might have been incorrect,
16444    # since paths with space are more likely in Windows. Give it another try with the whole
16445    # argument.
16446    path="$complete"
16447    arguments="EOL"
16448    new_path="$path"
16449
16450  windows_path="$new_path"
16451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16452    unix_path=`$CYGPATH -u "$windows_path"`
16453    new_path="$unix_path"
16454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16456    new_path="$unix_path"
16457  fi
16458
16459
16460    new_path=`$WHICH "$new_path" 2> /dev/null`
16461    # bat and cmd files are not always considered executable in MSYS causing which
16462    # to not find them
16463    if test "x$new_path" = x \
16464        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16465        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16466      new_path="$path"
16467
16468  windows_path="$new_path"
16469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16470    unix_path=`$CYGPATH -u "$windows_path"`
16471    new_path="$unix_path"
16472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16474    new_path="$unix_path"
16475  fi
16476
16477    fi
16478
16479    if test "x$new_path" = x; then
16480      # It's still not found. Now this is an unrecoverable error.
16481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16482$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16483      has_space=`$ECHO "$complete" | $GREP " "`
16484      if test "x$has_space" != x; then
16485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16487      fi
16488      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16489    fi
16490  fi
16491
16492  # Now new_path has a complete unix path to the binary
16493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16494    # Keep paths in /bin as-is, but remove trailing .exe if any
16495    new_path="${new_path/%.exe/}"
16496    # Do not save /bin paths to all_fixpath_prefixes!
16497  else
16498    # Not in mixed or Windows style, start by that.
16499    new_path=`cmd //c echo $new_path`
16500
16501  input_path="$new_path"
16502  # Check if we need to convert this using DOS-style short mode. If the path
16503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16504  # take no chances and rewrite it.
16505  # Note: m4 eats our [], so we need to use [ and ] instead.
16506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16507  if test "x$has_forbidden_chars" != x; then
16508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16510  fi
16511
16512    # Output is in $new_path
16513
16514  windows_path="$new_path"
16515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16516    unix_path=`$CYGPATH -u "$windows_path"`
16517    new_path="$unix_path"
16518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16520    new_path="$unix_path"
16521  fi
16522
16523    # remove trailing .exe if any
16524    new_path="${new_path/%.exe/}"
16525
16526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16528  fi
16529
16530    else
16531      # We're on a unix platform. Hooray! :)
16532      # First separate the path from the arguments. This will split at the first
16533      # space.
16534      complete="$FOUND_MAKE"
16535      path="${complete%% *}"
16536      tmp="$complete EOL"
16537      arguments="${tmp#* }"
16538
16539      # Cannot rely on the command "which" here since it doesn't always work.
16540      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16541      if test -z "$is_absolute_path"; then
16542        # Path to executable is not absolute. Find it.
16543        IFS_save="$IFS"
16544        IFS=:
16545        for p in $PATH; do
16546          if test -f "$p/$path" && test -x "$p/$path"; then
16547            new_path="$p/$path"
16548            break
16549          fi
16550        done
16551        IFS="$IFS_save"
16552      else
16553        # This is an absolute path, we can use it without further modifications.
16554        new_path="$path"
16555      fi
16556
16557      if test "x$new_path" = x; then
16558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16559$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16560        has_space=`$ECHO "$complete" | $GREP " "`
16561        if test "x$has_space" != x; then
16562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16564        fi
16565        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16566      fi
16567    fi
16568
16569    # Now join together the path and the arguments once again
16570    if test "x$arguments" != xEOL; then
16571      new_complete="$new_path ${arguments% *}"
16572    else
16573      new_complete="$new_path"
16574    fi
16575
16576    if test "x$complete" != "x$new_complete"; then
16577      FOUND_MAKE="$new_complete"
16578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16579$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16580    fi
16581  fi
16582
16583        fi
16584      fi
16585    fi
16586  fi
16587
16588    fi
16589
16590    if test "x$FOUND_MAKE" = x; then
16591      if test "x$TOOLCHAIN_PATH" != x; then
16592        # We have a toolchain path, check that as well before giving up.
16593        OLD_PATH=$PATH
16594        PATH=$TOOLCHAIN_PATH:$PATH
16595        for ac_prog in gmake
16596do
16597  # Extract the first word of "$ac_prog", so it can be a program name with args.
16598set dummy $ac_prog; ac_word=$2
16599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16600$as_echo_n "checking for $ac_word... " >&6; }
16601if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16602  $as_echo_n "(cached) " >&6
16603else
16604  case $CHECK_TOOLSDIR_GMAKE in
16605  [\\/]* | ?:[\\/]*)
16606  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16607  ;;
16608  *)
16609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16610for as_dir in $PATH
16611do
16612  IFS=$as_save_IFS
16613  test -z "$as_dir" && as_dir=.
16614    for ac_exec_ext in '' $ac_executable_extensions; do
16615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16616    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16618    break 2
16619  fi
16620done
16621  done
16622IFS=$as_save_IFS
16623
16624  ;;
16625esac
16626fi
16627CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16628if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16630$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16631else
16632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16633$as_echo "no" >&6; }
16634fi
16635
16636
16637  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16638done
16639
16640
16641  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16642  DESCRIPTION="gmake in tools-dir"
16643
16644  # On Cygwin, we require a newer version of make than on other platforms
16645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16646    MAKE_VERSION_EXPR="-e 4\."
16647    MAKE_REQUIRED_VERSION="4.0"
16648   else
16649    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16650    MAKE_REQUIRED_VERSION="3.81"
16651  fi
16652
16653  if test "x$MAKE_CANDIDATE" != x; then
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16655$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16656    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16657    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16658    if test "x$IS_GNU_MAKE" = x; then
16659      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16660$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16661    else
16662      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16663      if test "x$IS_MODERN_MAKE" = x; then
16664        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16665$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16666      else
16667        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16668          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16669            MAKE_EXPECTED_ENV='cygwin'
16670          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16671            MAKE_EXPECTED_ENV='msys'
16672          else
16673            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16674          fi
16675          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16676          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16677        else
16678          # Not relevant for non-Windows
16679          IS_MAKE_CORRECT_ENV=true
16680        fi
16681        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16682          { $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
16683$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;}
16684        else
16685          FOUND_MAKE=$MAKE_CANDIDATE
16686
16687  # Only process if variable expands to non-empty
16688
16689  if test "x$FOUND_MAKE" != x; then
16690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16691
16692  # First separate the path from the arguments. This will split at the first
16693  # space.
16694  complete="$FOUND_MAKE"
16695  path="${complete%% *}"
16696  tmp="$complete EOL"
16697  arguments="${tmp#* }"
16698
16699  # Input might be given as Windows format, start by converting to
16700  # unix format.
16701  new_path=`$CYGPATH -u "$path"`
16702
16703  # Now try to locate executable using which
16704  new_path=`$WHICH "$new_path" 2> /dev/null`
16705  # bat and cmd files are not always considered executable in cygwin causing which
16706  # to not find them
16707  if test "x$new_path" = x \
16708      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16709      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16710    new_path=`$CYGPATH -u "$path"`
16711  fi
16712  if test "x$new_path" = x; then
16713    # Oops. Which didn't find the executable.
16714    # The splitting of arguments from the executable at a space might have been incorrect,
16715    # since paths with space are more likely in Windows. Give it another try with the whole
16716    # argument.
16717    path="$complete"
16718    arguments="EOL"
16719    new_path=`$CYGPATH -u "$path"`
16720    new_path=`$WHICH "$new_path" 2> /dev/null`
16721    # bat and cmd files are not always considered executable in cygwin causing which
16722    # to not find them
16723    if test "x$new_path" = x \
16724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16726      new_path=`$CYGPATH -u "$path"`
16727    fi
16728    if test "x$new_path" = x; then
16729      # It's still not found. Now this is an unrecoverable error.
16730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16732      has_space=`$ECHO "$complete" | $GREP " "`
16733      if test "x$has_space" != x; then
16734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16736      fi
16737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16738    fi
16739  fi
16740
16741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16744  # "foo.exe" is OK but "foo" is an error.
16745  #
16746  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16747  # It is also a way to make sure we got the proper file name for the real test later on.
16748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16749  if test "x$test_shortpath" = x; then
16750    # Short path failed, file does not exist as specified.
16751    # Try adding .exe or .cmd
16752    if test -f "${new_path}.exe"; then
16753      input_to_shortpath="${new_path}.exe"
16754    elif test -f "${new_path}.cmd"; then
16755      input_to_shortpath="${new_path}.cmd"
16756    else
16757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16758$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16762    fi
16763  else
16764    input_to_shortpath="$new_path"
16765  fi
16766
16767  # Call helper function which possibly converts this using DOS-style short mode.
16768  # If so, the updated path is stored in $new_path.
16769  new_path="$input_to_shortpath"
16770
16771  input_path="$input_to_shortpath"
16772  # Check if we need to convert this using DOS-style short mode. If the path
16773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16774  # take no chances and rewrite it.
16775  # Note: m4 eats our [], so we need to use [ and ] instead.
16776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16777  if test "x$has_forbidden_chars" != x; then
16778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16782      # Going to short mode and back again did indeed matter. Since short mode is
16783      # case insensitive, let's make it lowercase to improve readability.
16784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16785      # Now convert it back to Unix-style (cygpath)
16786      input_path=`$CYGPATH -u "$shortmode_path"`
16787      new_path="$input_path"
16788    fi
16789  fi
16790
16791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16792  if test "x$test_cygdrive_prefix" = x; then
16793    # As a simple fix, exclude /usr/bin since it's not a real path.
16794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16796      # a path prefixed by /cygdrive for fixpath to work.
16797      new_path="$CYGWIN_ROOT_PATH$input_path"
16798    fi
16799  fi
16800
16801  # remove trailing .exe if any
16802  new_path="${new_path/%.exe/}"
16803
16804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16805
16806  # First separate the path from the arguments. This will split at the first
16807  # space.
16808  complete="$FOUND_MAKE"
16809  path="${complete%% *}"
16810  tmp="$complete EOL"
16811  arguments="${tmp#* }"
16812
16813  # Input might be given as Windows format, start by converting to
16814  # unix format.
16815  new_path="$path"
16816
16817  windows_path="$new_path"
16818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16819    unix_path=`$CYGPATH -u "$windows_path"`
16820    new_path="$unix_path"
16821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16823    new_path="$unix_path"
16824  fi
16825
16826
16827  # Now try to locate executable using which
16828  new_path=`$WHICH "$new_path" 2> /dev/null`
16829
16830  if test "x$new_path" = x; then
16831    # Oops. Which didn't find the executable.
16832    # The splitting of arguments from the executable at a space might have been incorrect,
16833    # since paths with space are more likely in Windows. Give it another try with the whole
16834    # argument.
16835    path="$complete"
16836    arguments="EOL"
16837    new_path="$path"
16838
16839  windows_path="$new_path"
16840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16841    unix_path=`$CYGPATH -u "$windows_path"`
16842    new_path="$unix_path"
16843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16845    new_path="$unix_path"
16846  fi
16847
16848
16849    new_path=`$WHICH "$new_path" 2> /dev/null`
16850    # bat and cmd files are not always considered executable in MSYS causing which
16851    # to not find them
16852    if test "x$new_path" = x \
16853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16855      new_path="$path"
16856
16857  windows_path="$new_path"
16858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16859    unix_path=`$CYGPATH -u "$windows_path"`
16860    new_path="$unix_path"
16861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16863    new_path="$unix_path"
16864  fi
16865
16866    fi
16867
16868    if test "x$new_path" = x; then
16869      # It's still not found. Now this is an unrecoverable error.
16870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16871$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16872      has_space=`$ECHO "$complete" | $GREP " "`
16873      if test "x$has_space" != x; then
16874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16876      fi
16877      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16878    fi
16879  fi
16880
16881  # Now new_path has a complete unix path to the binary
16882  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16883    # Keep paths in /bin as-is, but remove trailing .exe if any
16884    new_path="${new_path/%.exe/}"
16885    # Do not save /bin paths to all_fixpath_prefixes!
16886  else
16887    # Not in mixed or Windows style, start by that.
16888    new_path=`cmd //c echo $new_path`
16889
16890  input_path="$new_path"
16891  # Check if we need to convert this using DOS-style short mode. If the path
16892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16893  # take no chances and rewrite it.
16894  # Note: m4 eats our [], so we need to use [ and ] instead.
16895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16896  if test "x$has_forbidden_chars" != x; then
16897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16899  fi
16900
16901    # Output is in $new_path
16902
16903  windows_path="$new_path"
16904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16905    unix_path=`$CYGPATH -u "$windows_path"`
16906    new_path="$unix_path"
16907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16909    new_path="$unix_path"
16910  fi
16911
16912    # remove trailing .exe if any
16913    new_path="${new_path/%.exe/}"
16914
16915    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16916    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16917  fi
16918
16919    else
16920      # We're on a unix platform. Hooray! :)
16921      # First separate the path from the arguments. This will split at the first
16922      # space.
16923      complete="$FOUND_MAKE"
16924      path="${complete%% *}"
16925      tmp="$complete EOL"
16926      arguments="${tmp#* }"
16927
16928      # Cannot rely on the command "which" here since it doesn't always work.
16929      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16930      if test -z "$is_absolute_path"; then
16931        # Path to executable is not absolute. Find it.
16932        IFS_save="$IFS"
16933        IFS=:
16934        for p in $PATH; do
16935          if test -f "$p/$path" && test -x "$p/$path"; then
16936            new_path="$p/$path"
16937            break
16938          fi
16939        done
16940        IFS="$IFS_save"
16941      else
16942        # This is an absolute path, we can use it without further modifications.
16943        new_path="$path"
16944      fi
16945
16946      if test "x$new_path" = x; then
16947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16948$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16949        has_space=`$ECHO "$complete" | $GREP " "`
16950        if test "x$has_space" != x; then
16951          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16953        fi
16954        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16955      fi
16956    fi
16957
16958    # Now join together the path and the arguments once again
16959    if test "x$arguments" != xEOL; then
16960      new_complete="$new_path ${arguments% *}"
16961    else
16962      new_complete="$new_path"
16963    fi
16964
16965    if test "x$complete" != "x$new_complete"; then
16966      FOUND_MAKE="$new_complete"
16967      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16968$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16969    fi
16970  fi
16971
16972        fi
16973      fi
16974    fi
16975  fi
16976
16977        if test "x$FOUND_MAKE" = x; then
16978          for ac_prog in make
16979do
16980  # Extract the first word of "$ac_prog", so it can be a program name with args.
16981set dummy $ac_prog; ac_word=$2
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16983$as_echo_n "checking for $ac_word... " >&6; }
16984if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16985  $as_echo_n "(cached) " >&6
16986else
16987  case $CHECK_TOOLSDIR_MAKE in
16988  [\\/]* | ?:[\\/]*)
16989  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16990  ;;
16991  *)
16992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16993for as_dir in $PATH
16994do
16995  IFS=$as_save_IFS
16996  test -z "$as_dir" && as_dir=.
16997    for ac_exec_ext in '' $ac_executable_extensions; do
16998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16999    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17001    break 2
17002  fi
17003done
17004  done
17005IFS=$as_save_IFS
17006
17007  ;;
17008esac
17009fi
17010CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17011if test -n "$CHECK_TOOLSDIR_MAKE"; then
17012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17013$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17014else
17015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17016$as_echo "no" >&6; }
17017fi
17018
17019
17020  test -n "$CHECK_TOOLSDIR_MAKE" && break
17021done
17022
17023
17024  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17025  DESCRIPTION="make in tools-dir"
17026
17027  # On Cygwin, we require a newer version of make than on other platforms
17028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029    MAKE_VERSION_EXPR="-e 4\."
17030    MAKE_REQUIRED_VERSION="4.0"
17031   else
17032    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17033    MAKE_REQUIRED_VERSION="3.81"
17034  fi
17035
17036  if test "x$MAKE_CANDIDATE" != x; then
17037    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17038$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17039    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17040    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17041    if test "x$IS_GNU_MAKE" = x; then
17042      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17043$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17044    else
17045      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17046      if test "x$IS_MODERN_MAKE" = x; then
17047        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17048$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17049      else
17050        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17051          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17052            MAKE_EXPECTED_ENV='cygwin'
17053          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17054            MAKE_EXPECTED_ENV='msys'
17055          else
17056            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17057          fi
17058          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17059          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17060        else
17061          # Not relevant for non-Windows
17062          IS_MAKE_CORRECT_ENV=true
17063        fi
17064        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17065          { $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
17066$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;}
17067        else
17068          FOUND_MAKE=$MAKE_CANDIDATE
17069
17070  # Only process if variable expands to non-empty
17071
17072  if test "x$FOUND_MAKE" != x; then
17073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17074
17075  # First separate the path from the arguments. This will split at the first
17076  # space.
17077  complete="$FOUND_MAKE"
17078  path="${complete%% *}"
17079  tmp="$complete EOL"
17080  arguments="${tmp#* }"
17081
17082  # Input might be given as Windows format, start by converting to
17083  # unix format.
17084  new_path=`$CYGPATH -u "$path"`
17085
17086  # Now try to locate executable using which
17087  new_path=`$WHICH "$new_path" 2> /dev/null`
17088  # bat and cmd files are not always considered executable in cygwin causing which
17089  # to not find them
17090  if test "x$new_path" = x \
17091      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17092      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17093    new_path=`$CYGPATH -u "$path"`
17094  fi
17095  if test "x$new_path" = x; then
17096    # Oops. Which didn't find the executable.
17097    # The splitting of arguments from the executable at a space might have been incorrect,
17098    # since paths with space are more likely in Windows. Give it another try with the whole
17099    # argument.
17100    path="$complete"
17101    arguments="EOL"
17102    new_path=`$CYGPATH -u "$path"`
17103    new_path=`$WHICH "$new_path" 2> /dev/null`
17104    # bat and cmd files are not always considered executable in cygwin causing which
17105    # to not find them
17106    if test "x$new_path" = x \
17107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17109      new_path=`$CYGPATH -u "$path"`
17110    fi
17111    if test "x$new_path" = x; then
17112      # It's still not found. Now this is an unrecoverable error.
17113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17115      has_space=`$ECHO "$complete" | $GREP " "`
17116      if test "x$has_space" != x; then
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17119      fi
17120      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17121    fi
17122  fi
17123
17124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17127  # "foo.exe" is OK but "foo" is an error.
17128  #
17129  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17130  # It is also a way to make sure we got the proper file name for the real test later on.
17131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17132  if test "x$test_shortpath" = x; then
17133    # Short path failed, file does not exist as specified.
17134    # Try adding .exe or .cmd
17135    if test -f "${new_path}.exe"; then
17136      input_to_shortpath="${new_path}.exe"
17137    elif test -f "${new_path}.cmd"; then
17138      input_to_shortpath="${new_path}.cmd"
17139    else
17140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17141$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17142      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17143$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17144      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17145    fi
17146  else
17147    input_to_shortpath="$new_path"
17148  fi
17149
17150  # Call helper function which possibly converts this using DOS-style short mode.
17151  # If so, the updated path is stored in $new_path.
17152  new_path="$input_to_shortpath"
17153
17154  input_path="$input_to_shortpath"
17155  # Check if we need to convert this using DOS-style short mode. If the path
17156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17157  # take no chances and rewrite it.
17158  # Note: m4 eats our [], so we need to use [ and ] instead.
17159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17160  if test "x$has_forbidden_chars" != x; then
17161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17165      # Going to short mode and back again did indeed matter. Since short mode is
17166      # case insensitive, let's make it lowercase to improve readability.
17167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17168      # Now convert it back to Unix-style (cygpath)
17169      input_path=`$CYGPATH -u "$shortmode_path"`
17170      new_path="$input_path"
17171    fi
17172  fi
17173
17174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17175  if test "x$test_cygdrive_prefix" = x; then
17176    # As a simple fix, exclude /usr/bin since it's not a real path.
17177    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17179      # a path prefixed by /cygdrive for fixpath to work.
17180      new_path="$CYGWIN_ROOT_PATH$input_path"
17181    fi
17182  fi
17183
17184  # remove trailing .exe if any
17185  new_path="${new_path/%.exe/}"
17186
17187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17188
17189  # First separate the path from the arguments. This will split at the first
17190  # space.
17191  complete="$FOUND_MAKE"
17192  path="${complete%% *}"
17193  tmp="$complete EOL"
17194  arguments="${tmp#* }"
17195
17196  # Input might be given as Windows format, start by converting to
17197  # unix format.
17198  new_path="$path"
17199
17200  windows_path="$new_path"
17201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17202    unix_path=`$CYGPATH -u "$windows_path"`
17203    new_path="$unix_path"
17204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17206    new_path="$unix_path"
17207  fi
17208
17209
17210  # Now try to locate executable using which
17211  new_path=`$WHICH "$new_path" 2> /dev/null`
17212
17213  if test "x$new_path" = x; then
17214    # Oops. Which didn't find the executable.
17215    # The splitting of arguments from the executable at a space might have been incorrect,
17216    # since paths with space are more likely in Windows. Give it another try with the whole
17217    # argument.
17218    path="$complete"
17219    arguments="EOL"
17220    new_path="$path"
17221
17222  windows_path="$new_path"
17223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17224    unix_path=`$CYGPATH -u "$windows_path"`
17225    new_path="$unix_path"
17226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17228    new_path="$unix_path"
17229  fi
17230
17231
17232    new_path=`$WHICH "$new_path" 2> /dev/null`
17233    # bat and cmd files are not always considered executable in MSYS causing which
17234    # to not find them
17235    if test "x$new_path" = x \
17236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17238      new_path="$path"
17239
17240  windows_path="$new_path"
17241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17242    unix_path=`$CYGPATH -u "$windows_path"`
17243    new_path="$unix_path"
17244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17246    new_path="$unix_path"
17247  fi
17248
17249    fi
17250
17251    if test "x$new_path" = x; then
17252      # It's still not found. Now this is an unrecoverable error.
17253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17255      has_space=`$ECHO "$complete" | $GREP " "`
17256      if test "x$has_space" != x; then
17257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17259      fi
17260      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17261    fi
17262  fi
17263
17264  # Now new_path has a complete unix path to the binary
17265  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17266    # Keep paths in /bin as-is, but remove trailing .exe if any
17267    new_path="${new_path/%.exe/}"
17268    # Do not save /bin paths to all_fixpath_prefixes!
17269  else
17270    # Not in mixed or Windows style, start by that.
17271    new_path=`cmd //c echo $new_path`
17272
17273  input_path="$new_path"
17274  # Check if we need to convert this using DOS-style short mode. If the path
17275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17276  # take no chances and rewrite it.
17277  # Note: m4 eats our [], so we need to use [ and ] instead.
17278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17279  if test "x$has_forbidden_chars" != x; then
17280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17282  fi
17283
17284    # Output is in $new_path
17285
17286  windows_path="$new_path"
17287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17288    unix_path=`$CYGPATH -u "$windows_path"`
17289    new_path="$unix_path"
17290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17292    new_path="$unix_path"
17293  fi
17294
17295    # remove trailing .exe if any
17296    new_path="${new_path/%.exe/}"
17297
17298    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17299    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17300  fi
17301
17302    else
17303      # We're on a unix platform. Hooray! :)
17304      # First separate the path from the arguments. This will split at the first
17305      # space.
17306      complete="$FOUND_MAKE"
17307      path="${complete%% *}"
17308      tmp="$complete EOL"
17309      arguments="${tmp#* }"
17310
17311      # Cannot rely on the command "which" here since it doesn't always work.
17312      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17313      if test -z "$is_absolute_path"; then
17314        # Path to executable is not absolute. Find it.
17315        IFS_save="$IFS"
17316        IFS=:
17317        for p in $PATH; do
17318          if test -f "$p/$path" && test -x "$p/$path"; then
17319            new_path="$p/$path"
17320            break
17321          fi
17322        done
17323        IFS="$IFS_save"
17324      else
17325        # This is an absolute path, we can use it without further modifications.
17326        new_path="$path"
17327      fi
17328
17329      if test "x$new_path" = x; then
17330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17331$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17332        has_space=`$ECHO "$complete" | $GREP " "`
17333        if test "x$has_space" != x; then
17334          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17336        fi
17337        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17338      fi
17339    fi
17340
17341    # Now join together the path and the arguments once again
17342    if test "x$arguments" != xEOL; then
17343      new_complete="$new_path ${arguments% *}"
17344    else
17345      new_complete="$new_path"
17346    fi
17347
17348    if test "x$complete" != "x$new_complete"; then
17349      FOUND_MAKE="$new_complete"
17350      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17351$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17352    fi
17353  fi
17354
17355        fi
17356      fi
17357    fi
17358  fi
17359
17360        fi
17361        PATH=$OLD_PATH
17362      fi
17363    fi
17364
17365    if test "x$FOUND_MAKE" = x; then
17366      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17367    fi
17368  fi
17369
17370  MAKE=$FOUND_MAKE
17371
17372  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17373$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17374
17375
17376  # Check if make supports the output sync option and if so, setup using it.
17377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17378$as_echo_n "checking if make --output-sync is supported... " >&6; }
17379  if $MAKE --version -O > /dev/null 2>&1; then
17380    OUTPUT_SYNC_SUPPORTED=true
17381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17382$as_echo "yes" >&6; }
17383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17384$as_echo_n "checking for output-sync value... " >&6; }
17385
17386# Check whether --with-output-sync was given.
17387if test "${with_output_sync+set}" = set; then :
17388  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17389fi
17390
17391    if test "x$OUTPUT_SYNC" = "x"; then
17392      OUTPUT_SYNC=none
17393    fi
17394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17395$as_echo "$OUTPUT_SYNC" >&6; }
17396    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17397      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17398    fi
17399  else
17400    OUTPUT_SYNC_SUPPORTED=false
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17402$as_echo "no" >&6; }
17403  fi
17404
17405
17406
17407
17408
17409
17410  # Test if find supports -delete
17411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17412$as_echo_n "checking if find supports -delete... " >&6; }
17413  FIND_DELETE="-delete"
17414
17415  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17416
17417  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17418
17419  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17420  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17421    # No, it does not.
17422    rm $DELETEDIR/TestIfFindSupportsDelete
17423    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17424      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17425      FIND_DELETE="-print | xargs rm"
17426    else
17427      FIND_DELETE="-exec rm \{\} \+"
17428    fi
17429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17430$as_echo "no" >&6; }
17431  else
17432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17433$as_echo "yes" >&6; }
17434  fi
17435  rmdir $DELETEDIR
17436
17437
17438
17439  # These tools might not be installed by default,
17440  # need hint on how to install them.
17441
17442
17443
17444  # Publish this variable in the help.
17445
17446
17447  if test "x$UNZIP" = x; then
17448    # The variable is not set by user, try to locate tool using the code snippet
17449    for ac_prog in unzip
17450do
17451  # Extract the first word of "$ac_prog", so it can be a program name with args.
17452set dummy $ac_prog; ac_word=$2
17453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17454$as_echo_n "checking for $ac_word... " >&6; }
17455if ${ac_cv_path_UNZIP+:} false; then :
17456  $as_echo_n "(cached) " >&6
17457else
17458  case $UNZIP in
17459  [\\/]* | ?:[\\/]*)
17460  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17461  ;;
17462  *)
17463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17464for as_dir in $PATH
17465do
17466  IFS=$as_save_IFS
17467  test -z "$as_dir" && as_dir=.
17468    for ac_exec_ext in '' $ac_executable_extensions; do
17469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17470    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17472    break 2
17473  fi
17474done
17475  done
17476IFS=$as_save_IFS
17477
17478  ;;
17479esac
17480fi
17481UNZIP=$ac_cv_path_UNZIP
17482if test -n "$UNZIP"; then
17483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17484$as_echo "$UNZIP" >&6; }
17485else
17486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17487$as_echo "no" >&6; }
17488fi
17489
17490
17491  test -n "$UNZIP" && break
17492done
17493
17494  else
17495    # The variable is set, but is it from the command line or the environment?
17496
17497    # Try to remove the string !UNZIP! from our list.
17498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17500      # If it failed, the variable was not from the command line. Ignore it,
17501      # but warn the user (except for BASH, which is always set by the calling BASH).
17502      if test "xUNZIP" != xBASH; then
17503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17504$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17505      fi
17506      # Try to locate tool using the code snippet
17507      for ac_prog in unzip
17508do
17509  # Extract the first word of "$ac_prog", so it can be a program name with args.
17510set dummy $ac_prog; ac_word=$2
17511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17512$as_echo_n "checking for $ac_word... " >&6; }
17513if ${ac_cv_path_UNZIP+:} false; then :
17514  $as_echo_n "(cached) " >&6
17515else
17516  case $UNZIP in
17517  [\\/]* | ?:[\\/]*)
17518  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17519  ;;
17520  *)
17521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17522for as_dir in $PATH
17523do
17524  IFS=$as_save_IFS
17525  test -z "$as_dir" && as_dir=.
17526    for ac_exec_ext in '' $ac_executable_extensions; do
17527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17528    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17530    break 2
17531  fi
17532done
17533  done
17534IFS=$as_save_IFS
17535
17536  ;;
17537esac
17538fi
17539UNZIP=$ac_cv_path_UNZIP
17540if test -n "$UNZIP"; then
17541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17542$as_echo "$UNZIP" >&6; }
17543else
17544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17545$as_echo "no" >&6; }
17546fi
17547
17548
17549  test -n "$UNZIP" && break
17550done
17551
17552    else
17553      # If it succeeded, then it was overridden by the user. We will use it
17554      # for the tool.
17555
17556      # First remove it from the list of overridden variables, so we can test
17557      # for unknown variables in the end.
17558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17559
17560      # Check if the provided tool contains a complete path.
17561      tool_specified="$UNZIP"
17562      tool_basename="${tool_specified##*/}"
17563      if test "x$tool_basename" = "x$tool_specified"; then
17564        # A command without a complete path is provided, search $PATH.
17565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17566$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17567        # Extract the first word of "$tool_basename", so it can be a program name with args.
17568set dummy $tool_basename; ac_word=$2
17569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17570$as_echo_n "checking for $ac_word... " >&6; }
17571if ${ac_cv_path_UNZIP+:} false; then :
17572  $as_echo_n "(cached) " >&6
17573else
17574  case $UNZIP in
17575  [\\/]* | ?:[\\/]*)
17576  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17577  ;;
17578  *)
17579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17580for as_dir in $PATH
17581do
17582  IFS=$as_save_IFS
17583  test -z "$as_dir" && as_dir=.
17584    for ac_exec_ext in '' $ac_executable_extensions; do
17585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17586    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17588    break 2
17589  fi
17590done
17591  done
17592IFS=$as_save_IFS
17593
17594  ;;
17595esac
17596fi
17597UNZIP=$ac_cv_path_UNZIP
17598if test -n "$UNZIP"; then
17599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17600$as_echo "$UNZIP" >&6; }
17601else
17602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17603$as_echo "no" >&6; }
17604fi
17605
17606
17607        if test "x$UNZIP" = x; then
17608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17609        fi
17610      else
17611        # Otherwise we believe it is a complete path. Use it as it is.
17612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17613$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17615$as_echo_n "checking for UNZIP... " >&6; }
17616        if test ! -x "$tool_specified"; then
17617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17618$as_echo "not found" >&6; }
17619          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17620        fi
17621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17622$as_echo "$tool_specified" >&6; }
17623      fi
17624    fi
17625  fi
17626
17627
17628
17629  if test "x$UNZIP" = x; then
17630    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17631  fi
17632
17633
17634
17635
17636
17637  # Publish this variable in the help.
17638
17639
17640  if test "x$ZIP" = x; then
17641    # The variable is not set by user, try to locate tool using the code snippet
17642    for ac_prog in zip
17643do
17644  # Extract the first word of "$ac_prog", so it can be a program name with args.
17645set dummy $ac_prog; ac_word=$2
17646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17647$as_echo_n "checking for $ac_word... " >&6; }
17648if ${ac_cv_path_ZIP+:} false; then :
17649  $as_echo_n "(cached) " >&6
17650else
17651  case $ZIP in
17652  [\\/]* | ?:[\\/]*)
17653  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17654  ;;
17655  *)
17656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17657for as_dir in $PATH
17658do
17659  IFS=$as_save_IFS
17660  test -z "$as_dir" && as_dir=.
17661    for ac_exec_ext in '' $ac_executable_extensions; do
17662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17663    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17665    break 2
17666  fi
17667done
17668  done
17669IFS=$as_save_IFS
17670
17671  ;;
17672esac
17673fi
17674ZIP=$ac_cv_path_ZIP
17675if test -n "$ZIP"; then
17676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17677$as_echo "$ZIP" >&6; }
17678else
17679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17680$as_echo "no" >&6; }
17681fi
17682
17683
17684  test -n "$ZIP" && break
17685done
17686
17687  else
17688    # The variable is set, but is it from the command line or the environment?
17689
17690    # Try to remove the string !ZIP! from our list.
17691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17693      # If it failed, the variable was not from the command line. Ignore it,
17694      # but warn the user (except for BASH, which is always set by the calling BASH).
17695      if test "xZIP" != xBASH; then
17696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17697$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17698      fi
17699      # Try to locate tool using the code snippet
17700      for ac_prog in zip
17701do
17702  # Extract the first word of "$ac_prog", so it can be a program name with args.
17703set dummy $ac_prog; ac_word=$2
17704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17705$as_echo_n "checking for $ac_word... " >&6; }
17706if ${ac_cv_path_ZIP+:} false; then :
17707  $as_echo_n "(cached) " >&6
17708else
17709  case $ZIP in
17710  [\\/]* | ?:[\\/]*)
17711  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17712  ;;
17713  *)
17714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17715for as_dir in $PATH
17716do
17717  IFS=$as_save_IFS
17718  test -z "$as_dir" && as_dir=.
17719    for ac_exec_ext in '' $ac_executable_extensions; do
17720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17721    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17723    break 2
17724  fi
17725done
17726  done
17727IFS=$as_save_IFS
17728
17729  ;;
17730esac
17731fi
17732ZIP=$ac_cv_path_ZIP
17733if test -n "$ZIP"; then
17734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17735$as_echo "$ZIP" >&6; }
17736else
17737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17738$as_echo "no" >&6; }
17739fi
17740
17741
17742  test -n "$ZIP" && break
17743done
17744
17745    else
17746      # If it succeeded, then it was overridden by the user. We will use it
17747      # for the tool.
17748
17749      # First remove it from the list of overridden variables, so we can test
17750      # for unknown variables in the end.
17751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17752
17753      # Check if the provided tool contains a complete path.
17754      tool_specified="$ZIP"
17755      tool_basename="${tool_specified##*/}"
17756      if test "x$tool_basename" = "x$tool_specified"; then
17757        # A command without a complete path is provided, search $PATH.
17758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17759$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17760        # Extract the first word of "$tool_basename", so it can be a program name with args.
17761set dummy $tool_basename; ac_word=$2
17762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17763$as_echo_n "checking for $ac_word... " >&6; }
17764if ${ac_cv_path_ZIP+:} false; then :
17765  $as_echo_n "(cached) " >&6
17766else
17767  case $ZIP in
17768  [\\/]* | ?:[\\/]*)
17769  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17770  ;;
17771  *)
17772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17773for as_dir in $PATH
17774do
17775  IFS=$as_save_IFS
17776  test -z "$as_dir" && as_dir=.
17777    for ac_exec_ext in '' $ac_executable_extensions; do
17778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17779    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17781    break 2
17782  fi
17783done
17784  done
17785IFS=$as_save_IFS
17786
17787  ;;
17788esac
17789fi
17790ZIP=$ac_cv_path_ZIP
17791if test -n "$ZIP"; then
17792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17793$as_echo "$ZIP" >&6; }
17794else
17795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796$as_echo "no" >&6; }
17797fi
17798
17799
17800        if test "x$ZIP" = x; then
17801          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17802        fi
17803      else
17804        # Otherwise we believe it is a complete path. Use it as it is.
17805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17806$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17808$as_echo_n "checking for ZIP... " >&6; }
17809        if test ! -x "$tool_specified"; then
17810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17811$as_echo "not found" >&6; }
17812          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17813        fi
17814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17815$as_echo "$tool_specified" >&6; }
17816      fi
17817    fi
17818  fi
17819
17820
17821
17822  if test "x$ZIP" = x; then
17823    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17824  fi
17825
17826
17827
17828  # Non-required basic tools
17829
17830
17831
17832  # Publish this variable in the help.
17833
17834
17835  if test "x$LDD" = x; then
17836    # The variable is not set by user, try to locate tool using the code snippet
17837    for ac_prog in ldd
17838do
17839  # Extract the first word of "$ac_prog", so it can be a program name with args.
17840set dummy $ac_prog; ac_word=$2
17841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17842$as_echo_n "checking for $ac_word... " >&6; }
17843if ${ac_cv_path_LDD+:} false; then :
17844  $as_echo_n "(cached) " >&6
17845else
17846  case $LDD in
17847  [\\/]* | ?:[\\/]*)
17848  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17849  ;;
17850  *)
17851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17852for as_dir in $PATH
17853do
17854  IFS=$as_save_IFS
17855  test -z "$as_dir" && as_dir=.
17856    for ac_exec_ext in '' $ac_executable_extensions; do
17857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17858    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17860    break 2
17861  fi
17862done
17863  done
17864IFS=$as_save_IFS
17865
17866  ;;
17867esac
17868fi
17869LDD=$ac_cv_path_LDD
17870if test -n "$LDD"; then
17871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17872$as_echo "$LDD" >&6; }
17873else
17874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17875$as_echo "no" >&6; }
17876fi
17877
17878
17879  test -n "$LDD" && break
17880done
17881
17882  else
17883    # The variable is set, but is it from the command line or the environment?
17884
17885    # Try to remove the string !LDD! from our list.
17886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17888      # If it failed, the variable was not from the command line. Ignore it,
17889      # but warn the user (except for BASH, which is always set by the calling BASH).
17890      if test "xLDD" != xBASH; then
17891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17892$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17893      fi
17894      # Try to locate tool using the code snippet
17895      for ac_prog in ldd
17896do
17897  # Extract the first word of "$ac_prog", so it can be a program name with args.
17898set dummy $ac_prog; ac_word=$2
17899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17900$as_echo_n "checking for $ac_word... " >&6; }
17901if ${ac_cv_path_LDD+:} false; then :
17902  $as_echo_n "(cached) " >&6
17903else
17904  case $LDD in
17905  [\\/]* | ?:[\\/]*)
17906  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17907  ;;
17908  *)
17909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17910for as_dir in $PATH
17911do
17912  IFS=$as_save_IFS
17913  test -z "$as_dir" && as_dir=.
17914    for ac_exec_ext in '' $ac_executable_extensions; do
17915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17916    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17918    break 2
17919  fi
17920done
17921  done
17922IFS=$as_save_IFS
17923
17924  ;;
17925esac
17926fi
17927LDD=$ac_cv_path_LDD
17928if test -n "$LDD"; then
17929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17930$as_echo "$LDD" >&6; }
17931else
17932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17933$as_echo "no" >&6; }
17934fi
17935
17936
17937  test -n "$LDD" && break
17938done
17939
17940    else
17941      # If it succeeded, then it was overridden by the user. We will use it
17942      # for the tool.
17943
17944      # First remove it from the list of overridden variables, so we can test
17945      # for unknown variables in the end.
17946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17947
17948      # Check if the provided tool contains a complete path.
17949      tool_specified="$LDD"
17950      tool_basename="${tool_specified##*/}"
17951      if test "x$tool_basename" = "x$tool_specified"; then
17952        # A command without a complete path is provided, search $PATH.
17953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17954$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17955        # Extract the first word of "$tool_basename", so it can be a program name with args.
17956set dummy $tool_basename; ac_word=$2
17957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17958$as_echo_n "checking for $ac_word... " >&6; }
17959if ${ac_cv_path_LDD+:} false; then :
17960  $as_echo_n "(cached) " >&6
17961else
17962  case $LDD in
17963  [\\/]* | ?:[\\/]*)
17964  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17965  ;;
17966  *)
17967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17968for as_dir in $PATH
17969do
17970  IFS=$as_save_IFS
17971  test -z "$as_dir" && as_dir=.
17972    for ac_exec_ext in '' $ac_executable_extensions; do
17973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17974    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17976    break 2
17977  fi
17978done
17979  done
17980IFS=$as_save_IFS
17981
17982  ;;
17983esac
17984fi
17985LDD=$ac_cv_path_LDD
17986if test -n "$LDD"; then
17987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17988$as_echo "$LDD" >&6; }
17989else
17990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17991$as_echo "no" >&6; }
17992fi
17993
17994
17995        if test "x$LDD" = x; then
17996          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17997        fi
17998      else
17999        # Otherwise we believe it is a complete path. Use it as it is.
18000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18001$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18003$as_echo_n "checking for LDD... " >&6; }
18004        if test ! -x "$tool_specified"; then
18005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18006$as_echo "not found" >&6; }
18007          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18008        fi
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18010$as_echo "$tool_specified" >&6; }
18011      fi
18012    fi
18013  fi
18014
18015
18016  if test "x$LDD" = "x"; then
18017    # List shared lib dependencies is used for
18018    # debug output and checking for forbidden dependencies.
18019    # We can build without it.
18020    LDD="true"
18021  fi
18022
18023
18024  # Publish this variable in the help.
18025
18026
18027  if test "x$OTOOL" = x; then
18028    # The variable is not set by user, try to locate tool using the code snippet
18029    for ac_prog in otool
18030do
18031  # Extract the first word of "$ac_prog", so it can be a program name with args.
18032set dummy $ac_prog; ac_word=$2
18033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18034$as_echo_n "checking for $ac_word... " >&6; }
18035if ${ac_cv_path_OTOOL+:} false; then :
18036  $as_echo_n "(cached) " >&6
18037else
18038  case $OTOOL in
18039  [\\/]* | ?:[\\/]*)
18040  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18041  ;;
18042  *)
18043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18044for as_dir in $PATH
18045do
18046  IFS=$as_save_IFS
18047  test -z "$as_dir" && as_dir=.
18048    for ac_exec_ext in '' $ac_executable_extensions; do
18049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18050    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18052    break 2
18053  fi
18054done
18055  done
18056IFS=$as_save_IFS
18057
18058  ;;
18059esac
18060fi
18061OTOOL=$ac_cv_path_OTOOL
18062if test -n "$OTOOL"; then
18063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18064$as_echo "$OTOOL" >&6; }
18065else
18066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18067$as_echo "no" >&6; }
18068fi
18069
18070
18071  test -n "$OTOOL" && break
18072done
18073
18074  else
18075    # The variable is set, but is it from the command line or the environment?
18076
18077    # Try to remove the string !OTOOL! from our list.
18078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18080      # If it failed, the variable was not from the command line. Ignore it,
18081      # but warn the user (except for BASH, which is always set by the calling BASH).
18082      if test "xOTOOL" != xBASH; then
18083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18084$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18085      fi
18086      # Try to locate tool using the code snippet
18087      for ac_prog in otool
18088do
18089  # Extract the first word of "$ac_prog", so it can be a program name with args.
18090set dummy $ac_prog; ac_word=$2
18091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18092$as_echo_n "checking for $ac_word... " >&6; }
18093if ${ac_cv_path_OTOOL+:} false; then :
18094  $as_echo_n "(cached) " >&6
18095else
18096  case $OTOOL in
18097  [\\/]* | ?:[\\/]*)
18098  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18099  ;;
18100  *)
18101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18102for as_dir in $PATH
18103do
18104  IFS=$as_save_IFS
18105  test -z "$as_dir" && as_dir=.
18106    for ac_exec_ext in '' $ac_executable_extensions; do
18107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18108    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18110    break 2
18111  fi
18112done
18113  done
18114IFS=$as_save_IFS
18115
18116  ;;
18117esac
18118fi
18119OTOOL=$ac_cv_path_OTOOL
18120if test -n "$OTOOL"; then
18121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18122$as_echo "$OTOOL" >&6; }
18123else
18124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18125$as_echo "no" >&6; }
18126fi
18127
18128
18129  test -n "$OTOOL" && break
18130done
18131
18132    else
18133      # If it succeeded, then it was overridden by the user. We will use it
18134      # for the tool.
18135
18136      # First remove it from the list of overridden variables, so we can test
18137      # for unknown variables in the end.
18138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18139
18140      # Check if the provided tool contains a complete path.
18141      tool_specified="$OTOOL"
18142      tool_basename="${tool_specified##*/}"
18143      if test "x$tool_basename" = "x$tool_specified"; then
18144        # A command without a complete path is provided, search $PATH.
18145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18146$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18147        # Extract the first word of "$tool_basename", so it can be a program name with args.
18148set dummy $tool_basename; ac_word=$2
18149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18150$as_echo_n "checking for $ac_word... " >&6; }
18151if ${ac_cv_path_OTOOL+:} false; then :
18152  $as_echo_n "(cached) " >&6
18153else
18154  case $OTOOL in
18155  [\\/]* | ?:[\\/]*)
18156  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18157  ;;
18158  *)
18159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18160for as_dir in $PATH
18161do
18162  IFS=$as_save_IFS
18163  test -z "$as_dir" && as_dir=.
18164    for ac_exec_ext in '' $ac_executable_extensions; do
18165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18166    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18168    break 2
18169  fi
18170done
18171  done
18172IFS=$as_save_IFS
18173
18174  ;;
18175esac
18176fi
18177OTOOL=$ac_cv_path_OTOOL
18178if test -n "$OTOOL"; then
18179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18180$as_echo "$OTOOL" >&6; }
18181else
18182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18183$as_echo "no" >&6; }
18184fi
18185
18186
18187        if test "x$OTOOL" = x; then
18188          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18189        fi
18190      else
18191        # Otherwise we believe it is a complete path. Use it as it is.
18192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18193$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18195$as_echo_n "checking for OTOOL... " >&6; }
18196        if test ! -x "$tool_specified"; then
18197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18198$as_echo "not found" >&6; }
18199          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18200        fi
18201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18202$as_echo "$tool_specified" >&6; }
18203      fi
18204    fi
18205  fi
18206
18207
18208  if test "x$OTOOL" = "x"; then
18209    OTOOL="true"
18210  fi
18211
18212
18213  # Publish this variable in the help.
18214
18215
18216  if test "x$READELF" = x; then
18217    # The variable is not set by user, try to locate tool using the code snippet
18218    for ac_prog in greadelf readelf
18219do
18220  # Extract the first word of "$ac_prog", so it can be a program name with args.
18221set dummy $ac_prog; ac_word=$2
18222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18223$as_echo_n "checking for $ac_word... " >&6; }
18224if ${ac_cv_path_READELF+:} false; then :
18225  $as_echo_n "(cached) " >&6
18226else
18227  case $READELF in
18228  [\\/]* | ?:[\\/]*)
18229  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18230  ;;
18231  *)
18232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18233for as_dir in $PATH
18234do
18235  IFS=$as_save_IFS
18236  test -z "$as_dir" && as_dir=.
18237    for ac_exec_ext in '' $ac_executable_extensions; do
18238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18239    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18241    break 2
18242  fi
18243done
18244  done
18245IFS=$as_save_IFS
18246
18247  ;;
18248esac
18249fi
18250READELF=$ac_cv_path_READELF
18251if test -n "$READELF"; then
18252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18253$as_echo "$READELF" >&6; }
18254else
18255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18256$as_echo "no" >&6; }
18257fi
18258
18259
18260  test -n "$READELF" && break
18261done
18262
18263  else
18264    # The variable is set, but is it from the command line or the environment?
18265
18266    # Try to remove the string !READELF! from our list.
18267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18269      # If it failed, the variable was not from the command line. Ignore it,
18270      # but warn the user (except for BASH, which is always set by the calling BASH).
18271      if test "xREADELF" != xBASH; then
18272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18273$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18274      fi
18275      # Try to locate tool using the code snippet
18276      for ac_prog in greadelf readelf
18277do
18278  # Extract the first word of "$ac_prog", so it can be a program name with args.
18279set dummy $ac_prog; ac_word=$2
18280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18281$as_echo_n "checking for $ac_word... " >&6; }
18282if ${ac_cv_path_READELF+:} false; then :
18283  $as_echo_n "(cached) " >&6
18284else
18285  case $READELF in
18286  [\\/]* | ?:[\\/]*)
18287  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18288  ;;
18289  *)
18290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18291for as_dir in $PATH
18292do
18293  IFS=$as_save_IFS
18294  test -z "$as_dir" && as_dir=.
18295    for ac_exec_ext in '' $ac_executable_extensions; do
18296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18297    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18299    break 2
18300  fi
18301done
18302  done
18303IFS=$as_save_IFS
18304
18305  ;;
18306esac
18307fi
18308READELF=$ac_cv_path_READELF
18309if test -n "$READELF"; then
18310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18311$as_echo "$READELF" >&6; }
18312else
18313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18314$as_echo "no" >&6; }
18315fi
18316
18317
18318  test -n "$READELF" && break
18319done
18320
18321    else
18322      # If it succeeded, then it was overridden by the user. We will use it
18323      # for the tool.
18324
18325      # First remove it from the list of overridden variables, so we can test
18326      # for unknown variables in the end.
18327      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18328
18329      # Check if the provided tool contains a complete path.
18330      tool_specified="$READELF"
18331      tool_basename="${tool_specified##*/}"
18332      if test "x$tool_basename" = "x$tool_specified"; then
18333        # A command without a complete path is provided, search $PATH.
18334        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18335$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18336        # Extract the first word of "$tool_basename", so it can be a program name with args.
18337set dummy $tool_basename; ac_word=$2
18338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18339$as_echo_n "checking for $ac_word... " >&6; }
18340if ${ac_cv_path_READELF+:} false; then :
18341  $as_echo_n "(cached) " >&6
18342else
18343  case $READELF in
18344  [\\/]* | ?:[\\/]*)
18345  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18346  ;;
18347  *)
18348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18349for as_dir in $PATH
18350do
18351  IFS=$as_save_IFS
18352  test -z "$as_dir" && as_dir=.
18353    for ac_exec_ext in '' $ac_executable_extensions; do
18354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18355    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18357    break 2
18358  fi
18359done
18360  done
18361IFS=$as_save_IFS
18362
18363  ;;
18364esac
18365fi
18366READELF=$ac_cv_path_READELF
18367if test -n "$READELF"; then
18368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18369$as_echo "$READELF" >&6; }
18370else
18371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18372$as_echo "no" >&6; }
18373fi
18374
18375
18376        if test "x$READELF" = x; then
18377          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18378        fi
18379      else
18380        # Otherwise we believe it is a complete path. Use it as it is.
18381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18382$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18384$as_echo_n "checking for READELF... " >&6; }
18385        if test ! -x "$tool_specified"; then
18386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18387$as_echo "not found" >&6; }
18388          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18389        fi
18390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18391$as_echo "$tool_specified" >&6; }
18392      fi
18393    fi
18394  fi
18395
18396
18397
18398
18399  # Publish this variable in the help.
18400
18401
18402  if test "x$HG" = x; then
18403    # The variable is not set by user, try to locate tool using the code snippet
18404    for ac_prog in hg
18405do
18406  # Extract the first word of "$ac_prog", so it can be a program name with args.
18407set dummy $ac_prog; ac_word=$2
18408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18409$as_echo_n "checking for $ac_word... " >&6; }
18410if ${ac_cv_path_HG+:} false; then :
18411  $as_echo_n "(cached) " >&6
18412else
18413  case $HG in
18414  [\\/]* | ?:[\\/]*)
18415  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18416  ;;
18417  *)
18418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18419for as_dir in $PATH
18420do
18421  IFS=$as_save_IFS
18422  test -z "$as_dir" && as_dir=.
18423    for ac_exec_ext in '' $ac_executable_extensions; do
18424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18425    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18427    break 2
18428  fi
18429done
18430  done
18431IFS=$as_save_IFS
18432
18433  ;;
18434esac
18435fi
18436HG=$ac_cv_path_HG
18437if test -n "$HG"; then
18438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18439$as_echo "$HG" >&6; }
18440else
18441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18442$as_echo "no" >&6; }
18443fi
18444
18445
18446  test -n "$HG" && break
18447done
18448
18449  else
18450    # The variable is set, but is it from the command line or the environment?
18451
18452    # Try to remove the string !HG! from our list.
18453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18455      # If it failed, the variable was not from the command line. Ignore it,
18456      # but warn the user (except for BASH, which is always set by the calling BASH).
18457      if test "xHG" != xBASH; then
18458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18459$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18460      fi
18461      # Try to locate tool using the code snippet
18462      for ac_prog in hg
18463do
18464  # Extract the first word of "$ac_prog", so it can be a program name with args.
18465set dummy $ac_prog; ac_word=$2
18466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18467$as_echo_n "checking for $ac_word... " >&6; }
18468if ${ac_cv_path_HG+:} false; then :
18469  $as_echo_n "(cached) " >&6
18470else
18471  case $HG in
18472  [\\/]* | ?:[\\/]*)
18473  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18474  ;;
18475  *)
18476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18477for as_dir in $PATH
18478do
18479  IFS=$as_save_IFS
18480  test -z "$as_dir" && as_dir=.
18481    for ac_exec_ext in '' $ac_executable_extensions; do
18482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18483    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18485    break 2
18486  fi
18487done
18488  done
18489IFS=$as_save_IFS
18490
18491  ;;
18492esac
18493fi
18494HG=$ac_cv_path_HG
18495if test -n "$HG"; then
18496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18497$as_echo "$HG" >&6; }
18498else
18499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18500$as_echo "no" >&6; }
18501fi
18502
18503
18504  test -n "$HG" && break
18505done
18506
18507    else
18508      # If it succeeded, then it was overridden by the user. We will use it
18509      # for the tool.
18510
18511      # First remove it from the list of overridden variables, so we can test
18512      # for unknown variables in the end.
18513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18514
18515      # Check if the provided tool contains a complete path.
18516      tool_specified="$HG"
18517      tool_basename="${tool_specified##*/}"
18518      if test "x$tool_basename" = "x$tool_specified"; then
18519        # A command without a complete path is provided, search $PATH.
18520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18521$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18522        # Extract the first word of "$tool_basename", so it can be a program name with args.
18523set dummy $tool_basename; ac_word=$2
18524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18525$as_echo_n "checking for $ac_word... " >&6; }
18526if ${ac_cv_path_HG+:} false; then :
18527  $as_echo_n "(cached) " >&6
18528else
18529  case $HG in
18530  [\\/]* | ?:[\\/]*)
18531  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18532  ;;
18533  *)
18534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18535for as_dir in $PATH
18536do
18537  IFS=$as_save_IFS
18538  test -z "$as_dir" && as_dir=.
18539    for ac_exec_ext in '' $ac_executable_extensions; do
18540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18541    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18543    break 2
18544  fi
18545done
18546  done
18547IFS=$as_save_IFS
18548
18549  ;;
18550esac
18551fi
18552HG=$ac_cv_path_HG
18553if test -n "$HG"; then
18554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18555$as_echo "$HG" >&6; }
18556else
18557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18558$as_echo "no" >&6; }
18559fi
18560
18561
18562        if test "x$HG" = x; then
18563          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18564        fi
18565      else
18566        # Otherwise we believe it is a complete path. Use it as it is.
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18568$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18570$as_echo_n "checking for HG... " >&6; }
18571        if test ! -x "$tool_specified"; then
18572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18573$as_echo "not found" >&6; }
18574          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18575        fi
18576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18577$as_echo "$tool_specified" >&6; }
18578      fi
18579    fi
18580  fi
18581
18582
18583
18584
18585  # Publish this variable in the help.
18586
18587
18588  if test "x$STAT" = x; then
18589    # The variable is not set by user, try to locate tool using the code snippet
18590    for ac_prog in stat
18591do
18592  # Extract the first word of "$ac_prog", so it can be a program name with args.
18593set dummy $ac_prog; ac_word=$2
18594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18595$as_echo_n "checking for $ac_word... " >&6; }
18596if ${ac_cv_path_STAT+:} false; then :
18597  $as_echo_n "(cached) " >&6
18598else
18599  case $STAT in
18600  [\\/]* | ?:[\\/]*)
18601  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18602  ;;
18603  *)
18604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18605for as_dir in $PATH
18606do
18607  IFS=$as_save_IFS
18608  test -z "$as_dir" && as_dir=.
18609    for ac_exec_ext in '' $ac_executable_extensions; do
18610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18611    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18613    break 2
18614  fi
18615done
18616  done
18617IFS=$as_save_IFS
18618
18619  ;;
18620esac
18621fi
18622STAT=$ac_cv_path_STAT
18623if test -n "$STAT"; then
18624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18625$as_echo "$STAT" >&6; }
18626else
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18628$as_echo "no" >&6; }
18629fi
18630
18631
18632  test -n "$STAT" && break
18633done
18634
18635  else
18636    # The variable is set, but is it from the command line or the environment?
18637
18638    # Try to remove the string !STAT! from our list.
18639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18641      # If it failed, the variable was not from the command line. Ignore it,
18642      # but warn the user (except for BASH, which is always set by the calling BASH).
18643      if test "xSTAT" != xBASH; then
18644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18645$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18646      fi
18647      # Try to locate tool using the code snippet
18648      for ac_prog in stat
18649do
18650  # Extract the first word of "$ac_prog", so it can be a program name with args.
18651set dummy $ac_prog; ac_word=$2
18652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18653$as_echo_n "checking for $ac_word... " >&6; }
18654if ${ac_cv_path_STAT+:} false; then :
18655  $as_echo_n "(cached) " >&6
18656else
18657  case $STAT in
18658  [\\/]* | ?:[\\/]*)
18659  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18660  ;;
18661  *)
18662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18663for as_dir in $PATH
18664do
18665  IFS=$as_save_IFS
18666  test -z "$as_dir" && as_dir=.
18667    for ac_exec_ext in '' $ac_executable_extensions; do
18668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18669    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18671    break 2
18672  fi
18673done
18674  done
18675IFS=$as_save_IFS
18676
18677  ;;
18678esac
18679fi
18680STAT=$ac_cv_path_STAT
18681if test -n "$STAT"; then
18682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18683$as_echo "$STAT" >&6; }
18684else
18685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18686$as_echo "no" >&6; }
18687fi
18688
18689
18690  test -n "$STAT" && break
18691done
18692
18693    else
18694      # If it succeeded, then it was overridden by the user. We will use it
18695      # for the tool.
18696
18697      # First remove it from the list of overridden variables, so we can test
18698      # for unknown variables in the end.
18699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18700
18701      # Check if the provided tool contains a complete path.
18702      tool_specified="$STAT"
18703      tool_basename="${tool_specified##*/}"
18704      if test "x$tool_basename" = "x$tool_specified"; then
18705        # A command without a complete path is provided, search $PATH.
18706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18707$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18708        # Extract the first word of "$tool_basename", so it can be a program name with args.
18709set dummy $tool_basename; ac_word=$2
18710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18711$as_echo_n "checking for $ac_word... " >&6; }
18712if ${ac_cv_path_STAT+:} false; then :
18713  $as_echo_n "(cached) " >&6
18714else
18715  case $STAT in
18716  [\\/]* | ?:[\\/]*)
18717  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18718  ;;
18719  *)
18720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18721for as_dir in $PATH
18722do
18723  IFS=$as_save_IFS
18724  test -z "$as_dir" && as_dir=.
18725    for ac_exec_ext in '' $ac_executable_extensions; do
18726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18727    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18729    break 2
18730  fi
18731done
18732  done
18733IFS=$as_save_IFS
18734
18735  ;;
18736esac
18737fi
18738STAT=$ac_cv_path_STAT
18739if test -n "$STAT"; then
18740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18741$as_echo "$STAT" >&6; }
18742else
18743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18744$as_echo "no" >&6; }
18745fi
18746
18747
18748        if test "x$STAT" = x; then
18749          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18750        fi
18751      else
18752        # Otherwise we believe it is a complete path. Use it as it is.
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18754$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18756$as_echo_n "checking for STAT... " >&6; }
18757        if test ! -x "$tool_specified"; then
18758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18759$as_echo "not found" >&6; }
18760          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18761        fi
18762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18763$as_echo "$tool_specified" >&6; }
18764      fi
18765    fi
18766  fi
18767
18768
18769
18770
18771  # Publish this variable in the help.
18772
18773
18774  if test "x$TIME" = x; then
18775    # The variable is not set by user, try to locate tool using the code snippet
18776    for ac_prog in time
18777do
18778  # Extract the first word of "$ac_prog", so it can be a program name with args.
18779set dummy $ac_prog; ac_word=$2
18780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18781$as_echo_n "checking for $ac_word... " >&6; }
18782if ${ac_cv_path_TIME+:} false; then :
18783  $as_echo_n "(cached) " >&6
18784else
18785  case $TIME in
18786  [\\/]* | ?:[\\/]*)
18787  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18788  ;;
18789  *)
18790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18791for as_dir in $PATH
18792do
18793  IFS=$as_save_IFS
18794  test -z "$as_dir" && as_dir=.
18795    for ac_exec_ext in '' $ac_executable_extensions; do
18796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18797    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18799    break 2
18800  fi
18801done
18802  done
18803IFS=$as_save_IFS
18804
18805  ;;
18806esac
18807fi
18808TIME=$ac_cv_path_TIME
18809if test -n "$TIME"; then
18810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18811$as_echo "$TIME" >&6; }
18812else
18813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18814$as_echo "no" >&6; }
18815fi
18816
18817
18818  test -n "$TIME" && break
18819done
18820
18821  else
18822    # The variable is set, but is it from the command line or the environment?
18823
18824    # Try to remove the string !TIME! from our list.
18825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18827      # If it failed, the variable was not from the command line. Ignore it,
18828      # but warn the user (except for BASH, which is always set by the calling BASH).
18829      if test "xTIME" != xBASH; then
18830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18831$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18832      fi
18833      # Try to locate tool using the code snippet
18834      for ac_prog in time
18835do
18836  # Extract the first word of "$ac_prog", so it can be a program name with args.
18837set dummy $ac_prog; ac_word=$2
18838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18839$as_echo_n "checking for $ac_word... " >&6; }
18840if ${ac_cv_path_TIME+:} false; then :
18841  $as_echo_n "(cached) " >&6
18842else
18843  case $TIME in
18844  [\\/]* | ?:[\\/]*)
18845  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18846  ;;
18847  *)
18848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18849for as_dir in $PATH
18850do
18851  IFS=$as_save_IFS
18852  test -z "$as_dir" && as_dir=.
18853    for ac_exec_ext in '' $ac_executable_extensions; do
18854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18855    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18857    break 2
18858  fi
18859done
18860  done
18861IFS=$as_save_IFS
18862
18863  ;;
18864esac
18865fi
18866TIME=$ac_cv_path_TIME
18867if test -n "$TIME"; then
18868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18869$as_echo "$TIME" >&6; }
18870else
18871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18872$as_echo "no" >&6; }
18873fi
18874
18875
18876  test -n "$TIME" && break
18877done
18878
18879    else
18880      # If it succeeded, then it was overridden by the user. We will use it
18881      # for the tool.
18882
18883      # First remove it from the list of overridden variables, so we can test
18884      # for unknown variables in the end.
18885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18886
18887      # Check if the provided tool contains a complete path.
18888      tool_specified="$TIME"
18889      tool_basename="${tool_specified##*/}"
18890      if test "x$tool_basename" = "x$tool_specified"; then
18891        # A command without a complete path is provided, search $PATH.
18892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18893$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18894        # Extract the first word of "$tool_basename", so it can be a program name with args.
18895set dummy $tool_basename; ac_word=$2
18896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18897$as_echo_n "checking for $ac_word... " >&6; }
18898if ${ac_cv_path_TIME+:} false; then :
18899  $as_echo_n "(cached) " >&6
18900else
18901  case $TIME in
18902  [\\/]* | ?:[\\/]*)
18903  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18904  ;;
18905  *)
18906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18907for as_dir in $PATH
18908do
18909  IFS=$as_save_IFS
18910  test -z "$as_dir" && as_dir=.
18911    for ac_exec_ext in '' $ac_executable_extensions; do
18912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18913    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18915    break 2
18916  fi
18917done
18918  done
18919IFS=$as_save_IFS
18920
18921  ;;
18922esac
18923fi
18924TIME=$ac_cv_path_TIME
18925if test -n "$TIME"; then
18926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18927$as_echo "$TIME" >&6; }
18928else
18929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18930$as_echo "no" >&6; }
18931fi
18932
18933
18934        if test "x$TIME" = x; then
18935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18936        fi
18937      else
18938        # Otherwise we believe it is a complete path. Use it as it is.
18939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18940$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18942$as_echo_n "checking for TIME... " >&6; }
18943        if test ! -x "$tool_specified"; then
18944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18945$as_echo "not found" >&6; }
18946          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18947        fi
18948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18949$as_echo "$tool_specified" >&6; }
18950      fi
18951    fi
18952  fi
18953
18954
18955
18956
18957  # Publish this variable in the help.
18958
18959
18960  if test "x$PATCH" = x; then
18961    # The variable is not set by user, try to locate tool using the code snippet
18962    for ac_prog in gpatch patch
18963do
18964  # Extract the first word of "$ac_prog", so it can be a program name with args.
18965set dummy $ac_prog; ac_word=$2
18966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18967$as_echo_n "checking for $ac_word... " >&6; }
18968if ${ac_cv_path_PATCH+:} false; then :
18969  $as_echo_n "(cached) " >&6
18970else
18971  case $PATCH in
18972  [\\/]* | ?:[\\/]*)
18973  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18974  ;;
18975  *)
18976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18977for as_dir in $PATH
18978do
18979  IFS=$as_save_IFS
18980  test -z "$as_dir" && as_dir=.
18981    for ac_exec_ext in '' $ac_executable_extensions; do
18982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18983    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18985    break 2
18986  fi
18987done
18988  done
18989IFS=$as_save_IFS
18990
18991  ;;
18992esac
18993fi
18994PATCH=$ac_cv_path_PATCH
18995if test -n "$PATCH"; then
18996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18997$as_echo "$PATCH" >&6; }
18998else
18999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19000$as_echo "no" >&6; }
19001fi
19002
19003
19004  test -n "$PATCH" && break
19005done
19006
19007  else
19008    # The variable is set, but is it from the command line or the environment?
19009
19010    # Try to remove the string !PATCH! from our list.
19011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
19012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19013      # If it failed, the variable was not from the command line. Ignore it,
19014      # but warn the user (except for BASH, which is always set by the calling BASH).
19015      if test "xPATCH" != xBASH; then
19016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
19017$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
19018      fi
19019      # Try to locate tool using the code snippet
19020      for ac_prog in gpatch patch
19021do
19022  # Extract the first word of "$ac_prog", so it can be a program name with args.
19023set dummy $ac_prog; ac_word=$2
19024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19025$as_echo_n "checking for $ac_word... " >&6; }
19026if ${ac_cv_path_PATCH+:} false; then :
19027  $as_echo_n "(cached) " >&6
19028else
19029  case $PATCH in
19030  [\\/]* | ?:[\\/]*)
19031  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19032  ;;
19033  *)
19034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19035for as_dir in $PATH
19036do
19037  IFS=$as_save_IFS
19038  test -z "$as_dir" && as_dir=.
19039    for ac_exec_ext in '' $ac_executable_extensions; do
19040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19041    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19043    break 2
19044  fi
19045done
19046  done
19047IFS=$as_save_IFS
19048
19049  ;;
19050esac
19051fi
19052PATCH=$ac_cv_path_PATCH
19053if test -n "$PATCH"; then
19054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19055$as_echo "$PATCH" >&6; }
19056else
19057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19058$as_echo "no" >&6; }
19059fi
19060
19061
19062  test -n "$PATCH" && break
19063done
19064
19065    else
19066      # If it succeeded, then it was overridden by the user. We will use it
19067      # for the tool.
19068
19069      # First remove it from the list of overridden variables, so we can test
19070      # for unknown variables in the end.
19071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19072
19073      # Check if the provided tool contains a complete path.
19074      tool_specified="$PATCH"
19075      tool_basename="${tool_specified##*/}"
19076      if test "x$tool_basename" = "x$tool_specified"; then
19077        # A command without a complete path is provided, search $PATH.
19078        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19079$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19080        # Extract the first word of "$tool_basename", so it can be a program name with args.
19081set dummy $tool_basename; ac_word=$2
19082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19083$as_echo_n "checking for $ac_word... " >&6; }
19084if ${ac_cv_path_PATCH+:} false; then :
19085  $as_echo_n "(cached) " >&6
19086else
19087  case $PATCH in
19088  [\\/]* | ?:[\\/]*)
19089  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19090  ;;
19091  *)
19092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19093for as_dir in $PATH
19094do
19095  IFS=$as_save_IFS
19096  test -z "$as_dir" && as_dir=.
19097    for ac_exec_ext in '' $ac_executable_extensions; do
19098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19099    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19101    break 2
19102  fi
19103done
19104  done
19105IFS=$as_save_IFS
19106
19107  ;;
19108esac
19109fi
19110PATCH=$ac_cv_path_PATCH
19111if test -n "$PATCH"; then
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19113$as_echo "$PATCH" >&6; }
19114else
19115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19116$as_echo "no" >&6; }
19117fi
19118
19119
19120        if test "x$PATCH" = x; then
19121          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19122        fi
19123      else
19124        # Otherwise we believe it is a complete path. Use it as it is.
19125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
19126$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
19127        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19128$as_echo_n "checking for PATCH... " >&6; }
19129        if test ! -x "$tool_specified"; then
19130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19131$as_echo "not found" >&6; }
19132          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
19133        fi
19134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19135$as_echo "$tool_specified" >&6; }
19136      fi
19137    fi
19138  fi
19139
19140
19141  # Check if it's GNU time
19142  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19143  if test "x$IS_GNU_TIME" != x; then
19144    IS_GNU_TIME=yes
19145  else
19146    IS_GNU_TIME=no
19147  fi
19148
19149
19150  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19151
19152
19153
19154  # Publish this variable in the help.
19155
19156
19157  if test "x$DSYMUTIL" = x; then
19158    # The variable is not set by user, try to locate tool using the code snippet
19159    for ac_prog in dsymutil
19160do
19161  # Extract the first word of "$ac_prog", so it can be a program name with args.
19162set dummy $ac_prog; ac_word=$2
19163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19164$as_echo_n "checking for $ac_word... " >&6; }
19165if ${ac_cv_path_DSYMUTIL+:} false; then :
19166  $as_echo_n "(cached) " >&6
19167else
19168  case $DSYMUTIL in
19169  [\\/]* | ?:[\\/]*)
19170  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19171  ;;
19172  *)
19173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19174for as_dir in $PATH
19175do
19176  IFS=$as_save_IFS
19177  test -z "$as_dir" && as_dir=.
19178    for ac_exec_ext in '' $ac_executable_extensions; do
19179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19180    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19182    break 2
19183  fi
19184done
19185  done
19186IFS=$as_save_IFS
19187
19188  ;;
19189esac
19190fi
19191DSYMUTIL=$ac_cv_path_DSYMUTIL
19192if test -n "$DSYMUTIL"; then
19193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19194$as_echo "$DSYMUTIL" >&6; }
19195else
19196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19197$as_echo "no" >&6; }
19198fi
19199
19200
19201  test -n "$DSYMUTIL" && break
19202done
19203
19204  else
19205    # The variable is set, but is it from the command line or the environment?
19206
19207    # Try to remove the string !DSYMUTIL! from our list.
19208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19210      # If it failed, the variable was not from the command line. Ignore it,
19211      # but warn the user (except for BASH, which is always set by the calling BASH).
19212      if test "xDSYMUTIL" != xBASH; then
19213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19214$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19215      fi
19216      # Try to locate tool using the code snippet
19217      for ac_prog in dsymutil
19218do
19219  # Extract the first word of "$ac_prog", so it can be a program name with args.
19220set dummy $ac_prog; ac_word=$2
19221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19222$as_echo_n "checking for $ac_word... " >&6; }
19223if ${ac_cv_path_DSYMUTIL+:} false; then :
19224  $as_echo_n "(cached) " >&6
19225else
19226  case $DSYMUTIL in
19227  [\\/]* | ?:[\\/]*)
19228  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19229  ;;
19230  *)
19231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19232for as_dir in $PATH
19233do
19234  IFS=$as_save_IFS
19235  test -z "$as_dir" && as_dir=.
19236    for ac_exec_ext in '' $ac_executable_extensions; do
19237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19238    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19240    break 2
19241  fi
19242done
19243  done
19244IFS=$as_save_IFS
19245
19246  ;;
19247esac
19248fi
19249DSYMUTIL=$ac_cv_path_DSYMUTIL
19250if test -n "$DSYMUTIL"; then
19251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19252$as_echo "$DSYMUTIL" >&6; }
19253else
19254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19255$as_echo "no" >&6; }
19256fi
19257
19258
19259  test -n "$DSYMUTIL" && break
19260done
19261
19262    else
19263      # If it succeeded, then it was overridden by the user. We will use it
19264      # for the tool.
19265
19266      # First remove it from the list of overridden variables, so we can test
19267      # for unknown variables in the end.
19268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19269
19270      # Check if the provided tool contains a complete path.
19271      tool_specified="$DSYMUTIL"
19272      tool_basename="${tool_specified##*/}"
19273      if test "x$tool_basename" = "x$tool_specified"; then
19274        # A command without a complete path is provided, search $PATH.
19275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19276$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19277        # Extract the first word of "$tool_basename", so it can be a program name with args.
19278set dummy $tool_basename; ac_word=$2
19279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19280$as_echo_n "checking for $ac_word... " >&6; }
19281if ${ac_cv_path_DSYMUTIL+:} false; then :
19282  $as_echo_n "(cached) " >&6
19283else
19284  case $DSYMUTIL in
19285  [\\/]* | ?:[\\/]*)
19286  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19287  ;;
19288  *)
19289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19290for as_dir in $PATH
19291do
19292  IFS=$as_save_IFS
19293  test -z "$as_dir" && as_dir=.
19294    for ac_exec_ext in '' $ac_executable_extensions; do
19295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19296    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19298    break 2
19299  fi
19300done
19301  done
19302IFS=$as_save_IFS
19303
19304  ;;
19305esac
19306fi
19307DSYMUTIL=$ac_cv_path_DSYMUTIL
19308if test -n "$DSYMUTIL"; then
19309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19310$as_echo "$DSYMUTIL" >&6; }
19311else
19312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19313$as_echo "no" >&6; }
19314fi
19315
19316
19317        if test "x$DSYMUTIL" = x; then
19318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19319        fi
19320      else
19321        # Otherwise we believe it is a complete path. Use it as it is.
19322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19323$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19325$as_echo_n "checking for DSYMUTIL... " >&6; }
19326        if test ! -x "$tool_specified"; then
19327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19328$as_echo "not found" >&6; }
19329          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19330        fi
19331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19332$as_echo "$tool_specified" >&6; }
19333      fi
19334    fi
19335  fi
19336
19337
19338
19339  if test "x$DSYMUTIL" = x; then
19340    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19341  fi
19342
19343
19344
19345
19346
19347  # Publish this variable in the help.
19348
19349
19350  if test "x$XATTR" = x; then
19351    # The variable is not set by user, try to locate tool using the code snippet
19352    for ac_prog in xattr
19353do
19354  # Extract the first word of "$ac_prog", so it can be a program name with args.
19355set dummy $ac_prog; ac_word=$2
19356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19357$as_echo_n "checking for $ac_word... " >&6; }
19358if ${ac_cv_path_XATTR+:} false; then :
19359  $as_echo_n "(cached) " >&6
19360else
19361  case $XATTR in
19362  [\\/]* | ?:[\\/]*)
19363  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19364  ;;
19365  *)
19366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19367for as_dir in $PATH
19368do
19369  IFS=$as_save_IFS
19370  test -z "$as_dir" && as_dir=.
19371    for ac_exec_ext in '' $ac_executable_extensions; do
19372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19373    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19375    break 2
19376  fi
19377done
19378  done
19379IFS=$as_save_IFS
19380
19381  ;;
19382esac
19383fi
19384XATTR=$ac_cv_path_XATTR
19385if test -n "$XATTR"; then
19386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19387$as_echo "$XATTR" >&6; }
19388else
19389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19390$as_echo "no" >&6; }
19391fi
19392
19393
19394  test -n "$XATTR" && break
19395done
19396
19397  else
19398    # The variable is set, but is it from the command line or the environment?
19399
19400    # Try to remove the string !XATTR! from our list.
19401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19403      # If it failed, the variable was not from the command line. Ignore it,
19404      # but warn the user (except for BASH, which is always set by the calling BASH).
19405      if test "xXATTR" != xBASH; then
19406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19407$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19408      fi
19409      # Try to locate tool using the code snippet
19410      for ac_prog in xattr
19411do
19412  # Extract the first word of "$ac_prog", so it can be a program name with args.
19413set dummy $ac_prog; ac_word=$2
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19415$as_echo_n "checking for $ac_word... " >&6; }
19416if ${ac_cv_path_XATTR+:} false; then :
19417  $as_echo_n "(cached) " >&6
19418else
19419  case $XATTR in
19420  [\\/]* | ?:[\\/]*)
19421  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19422  ;;
19423  *)
19424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19425for as_dir in $PATH
19426do
19427  IFS=$as_save_IFS
19428  test -z "$as_dir" && as_dir=.
19429    for ac_exec_ext in '' $ac_executable_extensions; do
19430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19431    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19433    break 2
19434  fi
19435done
19436  done
19437IFS=$as_save_IFS
19438
19439  ;;
19440esac
19441fi
19442XATTR=$ac_cv_path_XATTR
19443if test -n "$XATTR"; then
19444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19445$as_echo "$XATTR" >&6; }
19446else
19447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19448$as_echo "no" >&6; }
19449fi
19450
19451
19452  test -n "$XATTR" && break
19453done
19454
19455    else
19456      # If it succeeded, then it was overridden by the user. We will use it
19457      # for the tool.
19458
19459      # First remove it from the list of overridden variables, so we can test
19460      # for unknown variables in the end.
19461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19462
19463      # Check if the provided tool contains a complete path.
19464      tool_specified="$XATTR"
19465      tool_basename="${tool_specified##*/}"
19466      if test "x$tool_basename" = "x$tool_specified"; then
19467        # A command without a complete path is provided, search $PATH.
19468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19469$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19470        # Extract the first word of "$tool_basename", so it can be a program name with args.
19471set dummy $tool_basename; ac_word=$2
19472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19473$as_echo_n "checking for $ac_word... " >&6; }
19474if ${ac_cv_path_XATTR+:} false; then :
19475  $as_echo_n "(cached) " >&6
19476else
19477  case $XATTR in
19478  [\\/]* | ?:[\\/]*)
19479  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19480  ;;
19481  *)
19482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19483for as_dir in $PATH
19484do
19485  IFS=$as_save_IFS
19486  test -z "$as_dir" && as_dir=.
19487    for ac_exec_ext in '' $ac_executable_extensions; do
19488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19489    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19491    break 2
19492  fi
19493done
19494  done
19495IFS=$as_save_IFS
19496
19497  ;;
19498esac
19499fi
19500XATTR=$ac_cv_path_XATTR
19501if test -n "$XATTR"; then
19502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19503$as_echo "$XATTR" >&6; }
19504else
19505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19506$as_echo "no" >&6; }
19507fi
19508
19509
19510        if test "x$XATTR" = x; then
19511          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19512        fi
19513      else
19514        # Otherwise we believe it is a complete path. Use it as it is.
19515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19516$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19518$as_echo_n "checking for XATTR... " >&6; }
19519        if test ! -x "$tool_specified"; then
19520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19521$as_echo "not found" >&6; }
19522          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19523        fi
19524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19525$as_echo "$tool_specified" >&6; }
19526      fi
19527    fi
19528  fi
19529
19530
19531
19532  if test "x$XATTR" = x; then
19533    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19534  fi
19535
19536
19537
19538
19539  # Publish this variable in the help.
19540
19541
19542  if test "x$CODESIGN" = x; then
19543    # The variable is not set by user, try to locate tool using the code snippet
19544    for ac_prog in codesign
19545do
19546  # Extract the first word of "$ac_prog", so it can be a program name with args.
19547set dummy $ac_prog; ac_word=$2
19548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19549$as_echo_n "checking for $ac_word... " >&6; }
19550if ${ac_cv_path_CODESIGN+:} false; then :
19551  $as_echo_n "(cached) " >&6
19552else
19553  case $CODESIGN in
19554  [\\/]* | ?:[\\/]*)
19555  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19556  ;;
19557  *)
19558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19559for as_dir in $PATH
19560do
19561  IFS=$as_save_IFS
19562  test -z "$as_dir" && as_dir=.
19563    for ac_exec_ext in '' $ac_executable_extensions; do
19564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19565    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19567    break 2
19568  fi
19569done
19570  done
19571IFS=$as_save_IFS
19572
19573  ;;
19574esac
19575fi
19576CODESIGN=$ac_cv_path_CODESIGN
19577if test -n "$CODESIGN"; then
19578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19579$as_echo "$CODESIGN" >&6; }
19580else
19581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19582$as_echo "no" >&6; }
19583fi
19584
19585
19586  test -n "$CODESIGN" && break
19587done
19588
19589  else
19590    # The variable is set, but is it from the command line or the environment?
19591
19592    # Try to remove the string !CODESIGN! from our list.
19593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19595      # If it failed, the variable was not from the command line. Ignore it,
19596      # but warn the user (except for BASH, which is always set by the calling BASH).
19597      if test "xCODESIGN" != xBASH; then
19598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19599$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19600      fi
19601      # Try to locate tool using the code snippet
19602      for ac_prog in codesign
19603do
19604  # Extract the first word of "$ac_prog", so it can be a program name with args.
19605set dummy $ac_prog; ac_word=$2
19606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19607$as_echo_n "checking for $ac_word... " >&6; }
19608if ${ac_cv_path_CODESIGN+:} false; then :
19609  $as_echo_n "(cached) " >&6
19610else
19611  case $CODESIGN in
19612  [\\/]* | ?:[\\/]*)
19613  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19614  ;;
19615  *)
19616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19617for as_dir in $PATH
19618do
19619  IFS=$as_save_IFS
19620  test -z "$as_dir" && as_dir=.
19621    for ac_exec_ext in '' $ac_executable_extensions; do
19622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19623    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19625    break 2
19626  fi
19627done
19628  done
19629IFS=$as_save_IFS
19630
19631  ;;
19632esac
19633fi
19634CODESIGN=$ac_cv_path_CODESIGN
19635if test -n "$CODESIGN"; then
19636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19637$as_echo "$CODESIGN" >&6; }
19638else
19639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19640$as_echo "no" >&6; }
19641fi
19642
19643
19644  test -n "$CODESIGN" && break
19645done
19646
19647    else
19648      # If it succeeded, then it was overridden by the user. We will use it
19649      # for the tool.
19650
19651      # First remove it from the list of overridden variables, so we can test
19652      # for unknown variables in the end.
19653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19654
19655      # Check if the provided tool contains a complete path.
19656      tool_specified="$CODESIGN"
19657      tool_basename="${tool_specified##*/}"
19658      if test "x$tool_basename" = "x$tool_specified"; then
19659        # A command without a complete path is provided, search $PATH.
19660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19661$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19662        # Extract the first word of "$tool_basename", so it can be a program name with args.
19663set dummy $tool_basename; ac_word=$2
19664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19665$as_echo_n "checking for $ac_word... " >&6; }
19666if ${ac_cv_path_CODESIGN+:} false; then :
19667  $as_echo_n "(cached) " >&6
19668else
19669  case $CODESIGN in
19670  [\\/]* | ?:[\\/]*)
19671  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19672  ;;
19673  *)
19674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19675for as_dir in $PATH
19676do
19677  IFS=$as_save_IFS
19678  test -z "$as_dir" && as_dir=.
19679    for ac_exec_ext in '' $ac_executable_extensions; do
19680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19681    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19683    break 2
19684  fi
19685done
19686  done
19687IFS=$as_save_IFS
19688
19689  ;;
19690esac
19691fi
19692CODESIGN=$ac_cv_path_CODESIGN
19693if test -n "$CODESIGN"; then
19694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19695$as_echo "$CODESIGN" >&6; }
19696else
19697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19698$as_echo "no" >&6; }
19699fi
19700
19701
19702        if test "x$CODESIGN" = x; then
19703          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19704        fi
19705      else
19706        # Otherwise we believe it is a complete path. Use it as it is.
19707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19708$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19710$as_echo_n "checking for CODESIGN... " >&6; }
19711        if test ! -x "$tool_specified"; then
19712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19713$as_echo "not found" >&6; }
19714          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19715        fi
19716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19717$as_echo "$tool_specified" >&6; }
19718      fi
19719    fi
19720  fi
19721
19722
19723    if test "x$CODESIGN" != "x"; then
19724      # Verify that the openjdk_codesign certificate is present
19725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19726$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19727      rm -f codesign-testfile
19728      touch codesign-testfile
19729      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19730      rm -f codesign-testfile
19731      if test "x$CODESIGN" = x; then
19732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19733$as_echo "no" >&6; }
19734      else
19735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19736$as_echo "yes" >&6; }
19737      fi
19738    fi
19739
19740
19741
19742  # Publish this variable in the help.
19743
19744
19745  if test "x$SETFILE" = x; then
19746    # The variable is not set by user, try to locate tool using the code snippet
19747    for ac_prog in SetFile
19748do
19749  # Extract the first word of "$ac_prog", so it can be a program name with args.
19750set dummy $ac_prog; ac_word=$2
19751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19752$as_echo_n "checking for $ac_word... " >&6; }
19753if ${ac_cv_path_SETFILE+:} false; then :
19754  $as_echo_n "(cached) " >&6
19755else
19756  case $SETFILE in
19757  [\\/]* | ?:[\\/]*)
19758  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19759  ;;
19760  *)
19761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19762for as_dir in $PATH
19763do
19764  IFS=$as_save_IFS
19765  test -z "$as_dir" && as_dir=.
19766    for ac_exec_ext in '' $ac_executable_extensions; do
19767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19768    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19770    break 2
19771  fi
19772done
19773  done
19774IFS=$as_save_IFS
19775
19776  ;;
19777esac
19778fi
19779SETFILE=$ac_cv_path_SETFILE
19780if test -n "$SETFILE"; then
19781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19782$as_echo "$SETFILE" >&6; }
19783else
19784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19785$as_echo "no" >&6; }
19786fi
19787
19788
19789  test -n "$SETFILE" && break
19790done
19791
19792  else
19793    # The variable is set, but is it from the command line or the environment?
19794
19795    # Try to remove the string !SETFILE! from our list.
19796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19798      # If it failed, the variable was not from the command line. Ignore it,
19799      # but warn the user (except for BASH, which is always set by the calling BASH).
19800      if test "xSETFILE" != xBASH; then
19801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19802$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19803      fi
19804      # Try to locate tool using the code snippet
19805      for ac_prog in SetFile
19806do
19807  # Extract the first word of "$ac_prog", so it can be a program name with args.
19808set dummy $ac_prog; ac_word=$2
19809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19810$as_echo_n "checking for $ac_word... " >&6; }
19811if ${ac_cv_path_SETFILE+:} false; then :
19812  $as_echo_n "(cached) " >&6
19813else
19814  case $SETFILE in
19815  [\\/]* | ?:[\\/]*)
19816  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19817  ;;
19818  *)
19819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19820for as_dir in $PATH
19821do
19822  IFS=$as_save_IFS
19823  test -z "$as_dir" && as_dir=.
19824    for ac_exec_ext in '' $ac_executable_extensions; do
19825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19826    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19828    break 2
19829  fi
19830done
19831  done
19832IFS=$as_save_IFS
19833
19834  ;;
19835esac
19836fi
19837SETFILE=$ac_cv_path_SETFILE
19838if test -n "$SETFILE"; then
19839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19840$as_echo "$SETFILE" >&6; }
19841else
19842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19843$as_echo "no" >&6; }
19844fi
19845
19846
19847  test -n "$SETFILE" && break
19848done
19849
19850    else
19851      # If it succeeded, then it was overridden by the user. We will use it
19852      # for the tool.
19853
19854      # First remove it from the list of overridden variables, so we can test
19855      # for unknown variables in the end.
19856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19857
19858      # Check if the provided tool contains a complete path.
19859      tool_specified="$SETFILE"
19860      tool_basename="${tool_specified##*/}"
19861      if test "x$tool_basename" = "x$tool_specified"; then
19862        # A command without a complete path is provided, search $PATH.
19863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19864$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19865        # Extract the first word of "$tool_basename", so it can be a program name with args.
19866set dummy $tool_basename; ac_word=$2
19867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19868$as_echo_n "checking for $ac_word... " >&6; }
19869if ${ac_cv_path_SETFILE+:} false; then :
19870  $as_echo_n "(cached) " >&6
19871else
19872  case $SETFILE in
19873  [\\/]* | ?:[\\/]*)
19874  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19875  ;;
19876  *)
19877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19878for as_dir in $PATH
19879do
19880  IFS=$as_save_IFS
19881  test -z "$as_dir" && as_dir=.
19882    for ac_exec_ext in '' $ac_executable_extensions; do
19883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19884    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19886    break 2
19887  fi
19888done
19889  done
19890IFS=$as_save_IFS
19891
19892  ;;
19893esac
19894fi
19895SETFILE=$ac_cv_path_SETFILE
19896if test -n "$SETFILE"; then
19897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19898$as_echo "$SETFILE" >&6; }
19899else
19900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19901$as_echo "no" >&6; }
19902fi
19903
19904
19905        if test "x$SETFILE" = x; then
19906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19907        fi
19908      else
19909        # Otherwise we believe it is a complete path. Use it as it is.
19910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19911$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19913$as_echo_n "checking for SETFILE... " >&6; }
19914        if test ! -x "$tool_specified"; then
19915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19916$as_echo "not found" >&6; }
19917          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19918        fi
19919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19920$as_echo "$tool_specified" >&6; }
19921      fi
19922    fi
19923  fi
19924
19925
19926
19927  if test "x$SETFILE" = x; then
19928    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19929  fi
19930
19931
19932  fi
19933
19934
19935  # Test if bash supports pipefail.
19936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19937$as_echo_n "checking if bash supports pipefail... " >&6; }
19938  if ${BASH} -c 'set -o pipefail'; then
19939    BASH_ARGS="$BASH_ARGS -o pipefail"
19940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19941$as_echo "yes" >&6; }
19942  else
19943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19944$as_echo "no" >&6; }
19945  fi
19946
19947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19948$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19949  if ${BASH} -e -c 'true'; then
19950    BASH_ARGS="$BASH_ARGS -e"
19951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19952$as_echo "yes" >&6; }
19953  else
19954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19955$as_echo "no" >&6; }
19956  fi
19957
19958
19959
19960
19961# Check if pkg-config is available.
19962
19963
19964if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19965	if test -n "$ac_tool_prefix"; then
19966  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19967set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19969$as_echo_n "checking for $ac_word... " >&6; }
19970if ${ac_cv_path_PKG_CONFIG+:} false; then :
19971  $as_echo_n "(cached) " >&6
19972else
19973  case $PKG_CONFIG in
19974  [\\/]* | ?:[\\/]*)
19975  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19976  ;;
19977  *)
19978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19979for as_dir in $PATH
19980do
19981  IFS=$as_save_IFS
19982  test -z "$as_dir" && as_dir=.
19983    for ac_exec_ext in '' $ac_executable_extensions; do
19984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19985    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19987    break 2
19988  fi
19989done
19990  done
19991IFS=$as_save_IFS
19992
19993  ;;
19994esac
19995fi
19996PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19997if test -n "$PKG_CONFIG"; then
19998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19999$as_echo "$PKG_CONFIG" >&6; }
20000else
20001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20002$as_echo "no" >&6; }
20003fi
20004
20005
20006fi
20007if test -z "$ac_cv_path_PKG_CONFIG"; then
20008  ac_pt_PKG_CONFIG=$PKG_CONFIG
20009  # Extract the first word of "pkg-config", so it can be a program name with args.
20010set dummy pkg-config; ac_word=$2
20011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20012$as_echo_n "checking for $ac_word... " >&6; }
20013if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
20014  $as_echo_n "(cached) " >&6
20015else
20016  case $ac_pt_PKG_CONFIG in
20017  [\\/]* | ?:[\\/]*)
20018  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
20019  ;;
20020  *)
20021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20022for as_dir in $PATH
20023do
20024  IFS=$as_save_IFS
20025  test -z "$as_dir" && as_dir=.
20026    for ac_exec_ext in '' $ac_executable_extensions; do
20027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20028    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20030    break 2
20031  fi
20032done
20033  done
20034IFS=$as_save_IFS
20035
20036  ;;
20037esac
20038fi
20039ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
20040if test -n "$ac_pt_PKG_CONFIG"; then
20041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
20042$as_echo "$ac_pt_PKG_CONFIG" >&6; }
20043else
20044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20045$as_echo "no" >&6; }
20046fi
20047
20048  if test "x$ac_pt_PKG_CONFIG" = x; then
20049    PKG_CONFIG=""
20050  else
20051    case $cross_compiling:$ac_tool_warned in
20052yes:)
20053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20055ac_tool_warned=yes ;;
20056esac
20057    PKG_CONFIG=$ac_pt_PKG_CONFIG
20058  fi
20059else
20060  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
20061fi
20062
20063fi
20064if test -n "$PKG_CONFIG"; then
20065	_pkg_min_version=0.9.0
20066	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
20067$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
20068	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
20069		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20070$as_echo "yes" >&6; }
20071	else
20072		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20073$as_echo "no" >&6; }
20074		PKG_CONFIG=""
20075	fi
20076
20077fi
20078
20079# After basic tools have been setup, we can check build os specific details.
20080
20081  ###############################################################################
20082
20083  # Note that this is the build platform OS version!
20084
20085  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
20086  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
20087  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
20088  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
20089
20090
20091
20092
20093
20094# Setup builddeps, for automatic downloading of tools we need.
20095# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
20096# boot-jdk setup, but we need to have basic tools setup first.
20097
20098
20099# Check whether --with-builddeps-conf was given.
20100if test "${with_builddeps_conf+set}" = set; then :
20101  withval=$with_builddeps_conf;
20102fi
20103
20104
20105
20106# Check whether --with-builddeps-server was given.
20107if test "${with_builddeps_server+set}" = set; then :
20108  withval=$with_builddeps_server;
20109fi
20110
20111
20112
20113# Check whether --with-builddeps-dir was given.
20114if test "${with_builddeps_dir+set}" = set; then :
20115  withval=$with_builddeps_dir;
20116else
20117  with_builddeps_dir=/localhome/builddeps
20118fi
20119
20120
20121
20122# Check whether --with-builddeps-group was given.
20123if test "${with_builddeps_group+set}" = set; then :
20124  withval=$with_builddeps_group;
20125fi
20126
20127
20128
20129
20130  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20131    if test "x$with_builddeps_conf" != x; then
20132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
20133$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
20134      builddepsfile=$with_builddeps_conf
20135      if test -s $builddepsfile; then
20136        . $builddepsfile
20137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
20138$as_echo "loaded!" >&6; }
20139      else
20140        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
20141      fi
20142    else
20143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
20144$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
20145      builddepsfile=`mktemp`
20146      touch $builddepsfile
20147      # Put all found confs into a single file.
20148      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
20149      # Source the file to acquire the variables
20150      if test -s $builddepsfile; then
20151        . $builddepsfile
20152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
20153$as_echo "found at least one!" >&6; }
20154      else
20155        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
20156      fi
20157    fi
20158    # Create build and target names that use _ instead of "-" and ".".
20159    # This is necessary to use them in variable names.
20160    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20161    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20162    # Extract rewrite information for build and target
20163    eval rewritten_build=\${REWRITE_${build_var}}
20164    if test "x$rewritten_build" = x; then
20165      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
20166      echo Build stays the same $rewritten_build
20167    else
20168      echo Rewriting build for builddeps into $rewritten_build
20169    fi
20170    eval rewritten_target=\${REWRITE_${target_var}}
20171    if test "x$rewritten_target" = x; then
20172      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
20173      echo Target stays the same $rewritten_target
20174    else
20175      echo Rewriting target for builddeps into $rewritten_target
20176    fi
20177    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
20178    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
20179  fi
20180  for ac_prog in 7z unzip
20181do
20182  # Extract the first word of "$ac_prog", so it can be a program name with args.
20183set dummy $ac_prog; ac_word=$2
20184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20185$as_echo_n "checking for $ac_word... " >&6; }
20186if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
20187  $as_echo_n "(cached) " >&6
20188else
20189  if test -n "$BDEPS_UNZIP"; then
20190  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
20191else
20192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20193for as_dir in $PATH
20194do
20195  IFS=$as_save_IFS
20196  test -z "$as_dir" && as_dir=.
20197    for ac_exec_ext in '' $ac_executable_extensions; do
20198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20199    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20201    break 2
20202  fi
20203done
20204  done
20205IFS=$as_save_IFS
20206
20207fi
20208fi
20209BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20210if test -n "$BDEPS_UNZIP"; then
20211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20212$as_echo "$BDEPS_UNZIP" >&6; }
20213else
20214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20215$as_echo "no" >&6; }
20216fi
20217
20218
20219  test -n "$BDEPS_UNZIP" && break
20220done
20221
20222  if test "x$BDEPS_UNZIP" = x7z; then
20223    BDEPS_UNZIP="7z x"
20224  fi
20225
20226  for ac_prog in wget lftp ftp
20227do
20228  # Extract the first word of "$ac_prog", so it can be a program name with args.
20229set dummy $ac_prog; ac_word=$2
20230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20231$as_echo_n "checking for $ac_word... " >&6; }
20232if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20233  $as_echo_n "(cached) " >&6
20234else
20235  if test -n "$BDEPS_FTP"; then
20236  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20237else
20238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20239for as_dir in $PATH
20240do
20241  IFS=$as_save_IFS
20242  test -z "$as_dir" && as_dir=.
20243    for ac_exec_ext in '' $ac_executable_extensions; do
20244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20245    ac_cv_prog_BDEPS_FTP="$ac_prog"
20246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20247    break 2
20248  fi
20249done
20250  done
20251IFS=$as_save_IFS
20252
20253fi
20254fi
20255BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20256if test -n "$BDEPS_FTP"; then
20257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20258$as_echo "$BDEPS_FTP" >&6; }
20259else
20260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20261$as_echo "no" >&6; }
20262fi
20263
20264
20265  test -n "$BDEPS_FTP" && break
20266done
20267
20268
20269
20270###############################################################################
20271#
20272# Determine OpenJDK variants, options and version numbers.
20273#
20274###############################################################################
20275
20276# We need build & target for this.
20277
20278
20279  ###############################################################################
20280  #
20281  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20282  # We always build headless support.
20283  #
20284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20285$as_echo_n "checking headful support... " >&6; }
20286  # Check whether --enable-headful was given.
20287if test "${enable_headful+set}" = set; then :
20288  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20289else
20290  SUPPORT_HEADFUL=yes
20291fi
20292
20293
20294  SUPPORT_HEADLESS=yes
20295  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20296
20297  if test "x$SUPPORT_HEADFUL" = xyes; then
20298    # We are building both headful and headless.
20299    headful_msg="include support for both headful and headless"
20300  fi
20301
20302  if test "x$SUPPORT_HEADFUL" = xno; then
20303    # Thus we are building headless only.
20304    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20305    headful_msg="headless only"
20306  fi
20307
20308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20309$as_echo "$headful_msg" >&6; }
20310
20311
20312
20313
20314
20315  # Control wether Hotspot runs Queens test after build.
20316  # Check whether --enable-hotspot-test-in-build was given.
20317if test "${enable_hotspot_test_in_build+set}" = set; then :
20318  enableval=$enable_hotspot_test_in_build;
20319else
20320  enable_hotspot_test_in_build=no
20321fi
20322
20323  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20324    TEST_IN_BUILD=true
20325  else
20326    TEST_IN_BUILD=false
20327  fi
20328
20329
20330  ###############################################################################
20331  #
20332  # Choose cacerts source file
20333  #
20334
20335# Check whether --with-cacerts-file was given.
20336if test "${with_cacerts_file+set}" = set; then :
20337  withval=$with_cacerts_file;
20338fi
20339
20340  if test "x$with_cacerts_file" != x; then
20341    CACERTS_FILE=$with_cacerts_file
20342  fi
20343
20344
20345  ###############################################################################
20346  #
20347  # Enable or disable unlimited crypto
20348  #
20349  # Check whether --enable-unlimited-crypto was given.
20350if test "${enable_unlimited_crypto+set}" = set; then :
20351  enableval=$enable_unlimited_crypto;
20352else
20353  enable_unlimited_crypto=no
20354fi
20355
20356  if test "x$enable_unlimited_crypto" = "xyes"; then
20357    UNLIMITED_CRYPTO=true
20358  else
20359    UNLIMITED_CRYPTO=false
20360  fi
20361
20362
20363  ###############################################################################
20364  #
20365  # Compress jars
20366  #
20367  COMPRESS_JARS=false
20368
20369
20370
20371  # Setup default copyright year. Mostly overridden when building close to a new year.
20372
20373# Check whether --with-copyright-year was given.
20374if test "${with_copyright_year+set}" = set; then :
20375  withval=$with_copyright_year;
20376fi
20377
20378  if test "x$with_copyright_year" = xyes; then
20379    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20380  elif test "x$with_copyright_year" != x; then
20381    COPYRIGHT_YEAR="$with_copyright_year"
20382  else
20383    COPYRIGHT_YEAR=`date +'%Y'`
20384  fi
20385
20386
20387
20388  # Warn user that old version arguments are deprecated.
20389
20390
20391# Check whether --with-milestone was given.
20392if test "${with_milestone+set}" = set; then :
20393  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20394$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20395fi
20396
20397
20398
20399
20400# Check whether --with-update-version was given.
20401if test "${with_update_version+set}" = set; then :
20402  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20403$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20404fi
20405
20406
20407
20408
20409# Check whether --with-user-release-suffix was given.
20410if test "${with_user_release_suffix+set}" = set; then :
20411  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20412$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20413fi
20414
20415
20416
20417
20418# Check whether --with-build-number was given.
20419if test "${with_build_number+set}" = set; then :
20420  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20421$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20422fi
20423
20424
20425
20426  # Source the version numbers file
20427  . $AUTOCONF_DIR/version-numbers
20428
20429  # Some non-version number information is set in that file
20430
20431
20432
20433
20434
20435
20436
20437
20438  # Override version from arguments
20439
20440  # If --with-version-string is set, process it first. It is possible to
20441  # override parts with more specific flags, since these are processed later.
20442
20443# Check whether --with-version-string was given.
20444if test "${with_version_string+set}" = set; then :
20445  withval=$with_version_string;
20446fi
20447
20448  if test "x$with_version_string" = xyes; then
20449    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20450  elif test "x$with_version_string" != x; then
20451    # Additional [] needed to keep m4 from mangling shell constructs.
20452    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?(_([a-zA-Z]+))?)?$ ]] ; then
20453      VERSION_MAJOR=${BASH_REMATCH[1]}
20454      VERSION_MINOR=${BASH_REMATCH[3]}
20455      VERSION_SECURITY=${BASH_REMATCH[5]}
20456      VERSION_PATCH=${BASH_REMATCH[7]}
20457      VERSION_PRE=${BASH_REMATCH[9]}
20458      version_plus_separator=${BASH_REMATCH[11]}
20459      VERSION_BUILD=${BASH_REMATCH[12]}
20460      VERSION_OPT_BASE=${BASH_REMATCH[14]}
20461      VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[16]}
20462      # Unspecified numerical fields are interpreted as 0.
20463      if test "x$VERSION_MINOR" = x; then
20464        VERSION_MINOR=0
20465      fi
20466      if test "x$VERSION_SECURITY" = x; then
20467        VERSION_SECURITY=0
20468      fi
20469      if test "x$VERSION_PATCH" = x; then
20470        VERSION_PATCH=0
20471      fi
20472      if test "x$version_plus_separator" != x \
20473          && test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then
20474        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20475      fi
20476      # Stop the version part process from setting default values.
20477      # We still allow them to explicitely override though.
20478      NO_DEFAULT_VERSION_PARTS=true
20479    else
20480      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20481    fi
20482  fi
20483
20484
20485# Check whether --with-version-pre was given.
20486if test "${with_version_pre+set}" = set; then :
20487  withval=$with_version_pre; with_version_pre_present=true
20488else
20489  with_version_pre_present=false
20490fi
20491
20492
20493  if test "x$with_version_pre_present" = xtrue; then
20494    if test "x$with_version_pre" = xyes; then
20495      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
20496    elif test "x$with_version_pre" = xno; then
20497      # Interpret --without-* as empty string instead of the literal "no"
20498      VERSION_PRE=
20499    else
20500      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20501       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
20502      if test "x$VERSION_PRE" != "x$with_version_pre"; then
20503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
20504$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
20505      fi
20506    fi
20507  else
20508    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20509      # Default is to use "internal" as pre
20510      VERSION_PRE="internal"
20511    fi
20512  fi
20513
20514
20515# Check whether --with-version-opt-base was given.
20516if test "${with_version_opt_base+set}" = set; then :
20517  withval=$with_version_opt_base; with_version_opt_base_present=true
20518else
20519  with_version_opt_base_present=false
20520fi
20521
20522
20523  if test "x$with_version_opt_base_present" = xtrue; then
20524    if test "x$with_version_opt_base" = xyes; then
20525      as_fn_error $? "--with-version-opt-base must have a value" "$LINENO" 5
20526    elif test "x$with_version_opt_base" = xno; then
20527      # Interpret --without-* as empty string instead of the literal "no"
20528      VERSION_OPT_BASE=
20529    else
20530      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4.
20531       VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'`
20532      if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then
20533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&5
20534$as_echo "$as_me: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&2;}
20535      fi
20536    fi
20537  else
20538    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20539      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20540      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20541      # Outer [ ] to quote m4.
20542       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20543       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20544      VERSION_OPT_BASE="$timestamp.$username.$basedirname"
20545    fi
20546  fi
20547
20548
20549# Check whether --with-version-opt-debuglevel was given.
20550if test "${with_version_opt_debuglevel+set}" = set; then :
20551  withval=$with_version_opt_debuglevel; with_version_opt_debuglevel_present=true
20552else
20553  with_version_opt_debuglevel_present=false
20554fi
20555
20556
20557  if test "x$with_version_opt_debuglevel_present" = xtrue; then
20558    if test "x$with_version_opt_debuglevel" = xyes; then
20559      as_fn_error $? "--with-version-opt-debuglevel must have a value" "$LINENO" 5
20560    elif test "x$with_version_opt_debuglevel" = xno; then
20561      # Interpret --without-* as empty string instead of the literal "no"
20562      VERSION_OPT_DEBUGLEVEL=
20563    else
20564      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4.
20565       VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'`
20566      if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then
20567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&5
20568$as_echo "$as_me: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&2;}
20569      fi
20570    fi
20571  else
20572    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20573      # Default is to use the debug level name, except for release which is empty.
20574      if test "x$DEBUG_LEVEL" != "xrelease"; then
20575        VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL"
20576      else
20577        VERSION_OPT_DEBUGLEVEL=""
20578      fi
20579    fi
20580  fi
20581
20582# Check whether --with-version-build was given.
20583if test "${with_version_build+set}" = set; then :
20584  withval=$with_version_build; with_version_build_present=true
20585else
20586  with_version_build_present=false
20587fi
20588
20589
20590  if test "x$with_version_build_present" = xtrue; then
20591    if test "x$with_version_build" = xyes; then
20592      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20593    elif test "x$with_version_build" = xno; then
20594      # Interpret --without-* as empty string instead of the literal "no"
20595      VERSION_BUILD=
20596    elif test "x$with_version_build" = x; then
20597      VERSION_BUILD=
20598    else
20599
20600  # Additional [] needed to keep m4 from mangling shell constructs.
20601  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20602    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20603  fi
20604  # Extract the version number without leading zeros.
20605  cleaned_value=${BASH_REMATCH[1]}
20606  if test "x$cleaned_value" = x; then
20607    # Special case for zero
20608    cleaned_value=${BASH_REMATCH[2]}
20609  fi
20610
20611  if test $cleaned_value -gt 255; then
20612    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20613  fi
20614  if test "x$cleaned_value" != "x$with_version_build"; then
20615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20616$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20617  fi
20618  VERSION_BUILD=$cleaned_value
20619
20620    fi
20621  else
20622    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20623      # Default is to not have a build number.
20624      VERSION_BUILD=""
20625      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20626      VERSION_BUILD=0
20627    fi
20628  fi
20629
20630
20631# Check whether --with-version-major was given.
20632if test "${with_version_major+set}" = set; then :
20633  withval=$with_version_major; with_version_major_present=true
20634else
20635  with_version_major_present=false
20636fi
20637
20638
20639  if test "x$with_version_major_present" = xtrue; then
20640    if test "x$with_version_major" = xyes; then
20641      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20642    else
20643
20644  # Additional [] needed to keep m4 from mangling shell constructs.
20645  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20646    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20647  fi
20648  # Extract the version number without leading zeros.
20649  cleaned_value=${BASH_REMATCH[1]}
20650  if test "x$cleaned_value" = x; then
20651    # Special case for zero
20652    cleaned_value=${BASH_REMATCH[2]}
20653  fi
20654
20655  if test $cleaned_value -gt 255; then
20656    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20657  fi
20658  if test "x$cleaned_value" != "x$with_version_major"; then
20659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20660$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20661  fi
20662  VERSION_MAJOR=$cleaned_value
20663
20664    fi
20665  else
20666    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20667      # Default is to get value from version-numbers
20668      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20669    fi
20670  fi
20671
20672
20673# Check whether --with-version-minor was given.
20674if test "${with_version_minor+set}" = set; then :
20675  withval=$with_version_minor; with_version_minor_present=true
20676else
20677  with_version_minor_present=false
20678fi
20679
20680
20681  if test "x$with_version_minor_present" = xtrue; then
20682    if test "x$with_version_minor" = xyes; then
20683      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20684    elif test "x$with_version_minor" = xno; then
20685      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20686      VERSION_MINOR=0
20687    elif test "x$with_version_minor" = x; then
20688      VERSION_MINOR=0
20689    else
20690
20691  # Additional [] needed to keep m4 from mangling shell constructs.
20692  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20693    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20694  fi
20695  # Extract the version number without leading zeros.
20696  cleaned_value=${BASH_REMATCH[1]}
20697  if test "x$cleaned_value" = x; then
20698    # Special case for zero
20699    cleaned_value=${BASH_REMATCH[2]}
20700  fi
20701
20702  if test $cleaned_value -gt 255; then
20703    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20704  fi
20705  if test "x$cleaned_value" != "x$with_version_minor"; then
20706    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20707$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20708  fi
20709  VERSION_MINOR=$cleaned_value
20710
20711    fi
20712  else
20713    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20714      # Default is 0, if unspecified
20715      VERSION_MINOR=0
20716    fi
20717  fi
20718
20719
20720# Check whether --with-version-security was given.
20721if test "${with_version_security+set}" = set; then :
20722  withval=$with_version_security; with_version_security_present=true
20723else
20724  with_version_security_present=false
20725fi
20726
20727
20728  if test "x$with_version_security_present" = xtrue; then
20729    if test "x$with_version_security" = xyes; then
20730      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20731    elif test "x$with_version_security" = xno; then
20732      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20733      VERSION_SECURITY=0
20734    elif test "x$with_version_security" = x; then
20735      VERSION_SECURITY=0
20736    else
20737
20738  # Additional [] needed to keep m4 from mangling shell constructs.
20739  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20740    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20741  fi
20742  # Extract the version number without leading zeros.
20743  cleaned_value=${BASH_REMATCH[1]}
20744  if test "x$cleaned_value" = x; then
20745    # Special case for zero
20746    cleaned_value=${BASH_REMATCH[2]}
20747  fi
20748
20749  if test $cleaned_value -gt 255; then
20750    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20751  fi
20752  if test "x$cleaned_value" != "x$with_version_security"; then
20753    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20754$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20755  fi
20756  VERSION_SECURITY=$cleaned_value
20757
20758    fi
20759  else
20760    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20761      # Default is 0, if unspecified
20762      VERSION_SECURITY=0
20763    fi
20764  fi
20765
20766
20767# Check whether --with-version-patch was given.
20768if test "${with_version_patch+set}" = set; then :
20769  withval=$with_version_patch; with_version_patch_present=true
20770else
20771  with_version_patch_present=false
20772fi
20773
20774
20775  if test "x$with_version_patch_present" = xtrue; then
20776    if test "x$with_version_patch" = xyes; then
20777      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20778    elif test "x$with_version_patch" = xno; then
20779      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20780      VERSION_PATCH=0
20781    elif test "x$with_version_patch" = x; then
20782      VERSION_PATCH=0
20783    else
20784
20785  # Additional [] needed to keep m4 from mangling shell constructs.
20786  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20787    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20788  fi
20789  # Extract the version number without leading zeros.
20790  cleaned_value=${BASH_REMATCH[1]}
20791  if test "x$cleaned_value" = x; then
20792    # Special case for zero
20793    cleaned_value=${BASH_REMATCH[2]}
20794  fi
20795
20796  if test $cleaned_value -gt 255; then
20797    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20798  fi
20799  if test "x$cleaned_value" != "x$with_version_patch"; then
20800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20801$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20802  fi
20803  VERSION_PATCH=$cleaned_value
20804
20805    fi
20806  else
20807    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20808      # Default is 0, if unspecified
20809      VERSION_PATCH=0
20810    fi
20811  fi
20812
20813  # Calculate derived version properties
20814
20815  # Set opt to "opt-base" if debug level is empty (i.e. release), or
20816  # "opt-base_debug-level" otherwise.
20817  VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL}
20818
20819  # Set VERSION_IS_GA based on if VERSION_PRE has a value
20820  if test "x$VERSION_PRE" = x; then
20821    VERSION_IS_GA=true
20822  else
20823    VERSION_IS_GA=false
20824  fi
20825
20826  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20827  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20828
20829  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20830  # Strip trailing zeroes from stripped_version_number
20831  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20832  VERSION_NUMBER=$stripped_version_number
20833
20834  # The complete version string, with additional build information
20835  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20836    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20837  else
20838    # If either build or opt is set, we need a + separator
20839    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20840  fi
20841
20842  # The short version string, just VERSION_NUMBER and PRE, if present.
20843  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20844
20845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20846$as_echo_n "checking for version string... " >&6; }
20847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20848$as_echo "$VERSION_STRING" >&6; }
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864###############################################################################
20865#
20866# Setup BootJDK, used to bootstrap the build.
20867#
20868###############################################################################
20869
20870
20871  BOOT_JDK_FOUND=no
20872
20873# Check whether --with-boot-jdk was given.
20874if test "${with_boot_jdk+set}" = set; then :
20875  withval=$with_boot_jdk;
20876fi
20877
20878
20879  # We look for the Boot JDK through various means, going from more certain to
20880  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20881  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20882  # must check if this is indeed valid; otherwise we'll continue looking.
20883
20884  # Test: Is bootjdk explicitely set by command line arguments?
20885
20886  if test "x$BOOT_JDK_FOUND" = xno; then
20887    # Now execute the test
20888
20889  if test "x$with_boot_jdk" != x; then
20890    BOOT_JDK=$with_boot_jdk
20891    BOOT_JDK_FOUND=maybe
20892    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20893$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20894  fi
20895
20896
20897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20899      # Do we have a bin/java?
20900      if test ! -x "$BOOT_JDK/bin/java"; then
20901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20903        BOOT_JDK_FOUND=no
20904      else
20905        # Do we have a bin/javac?
20906        if test ! -x "$BOOT_JDK/bin/javac"; then
20907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20911          BOOT_JDK_FOUND=no
20912        else
20913          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20914          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20915
20916          # Extra M4 quote needed to protect [] in grep expression.
20917          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
20918          if test "x$FOUND_CORRECT_VERSION" = x; then
20919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20921            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20922$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20923            BOOT_JDK_FOUND=no
20924          else
20925            # We're done! :-)
20926            BOOT_JDK_FOUND=yes
20927
20928  # Only process if variable expands to non-empty
20929
20930  if test "x$BOOT_JDK" != x; then
20931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20932
20933  # Input might be given as Windows format, start by converting to
20934  # unix format.
20935  path="$BOOT_JDK"
20936  new_path=`$CYGPATH -u "$path"`
20937
20938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20941  # "foo.exe" is OK but "foo" is an error.
20942  #
20943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20944  # It is also a way to make sure we got the proper file name for the real test later on.
20945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20946  if test "x$test_shortpath" = x; then
20947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20949    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20950  fi
20951
20952  # Call helper function which possibly converts this using DOS-style short mode.
20953  # If so, the updated path is stored in $new_path.
20954
20955  input_path="$new_path"
20956  # Check if we need to convert this using DOS-style short mode. If the path
20957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20958  # take no chances and rewrite it.
20959  # Note: m4 eats our [], so we need to use [ and ] instead.
20960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20961  if test "x$has_forbidden_chars" != x; then
20962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20966      # Going to short mode and back again did indeed matter. Since short mode is
20967      # case insensitive, let's make it lowercase to improve readability.
20968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20969      # Now convert it back to Unix-style (cygpath)
20970      input_path=`$CYGPATH -u "$shortmode_path"`
20971      new_path="$input_path"
20972    fi
20973  fi
20974
20975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20976  if test "x$test_cygdrive_prefix" = x; then
20977    # As a simple fix, exclude /usr/bin since it's not a real path.
20978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20980      # a path prefixed by /cygdrive for fixpath to work.
20981      new_path="$CYGWIN_ROOT_PATH$input_path"
20982    fi
20983  fi
20984
20985
20986  if test "x$path" != "x$new_path"; then
20987    BOOT_JDK="$new_path"
20988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20989$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20990  fi
20991
20992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20993
20994  path="$BOOT_JDK"
20995  has_colon=`$ECHO $path | $GREP ^.:`
20996  new_path="$path"
20997  if test "x$has_colon" = x; then
20998    # Not in mixed or Windows style, start by that.
20999    new_path=`cmd //c echo $path`
21000  fi
21001
21002
21003  input_path="$new_path"
21004  # Check if we need to convert this using DOS-style short mode. If the path
21005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21006  # take no chances and rewrite it.
21007  # Note: m4 eats our [], so we need to use [ and ] instead.
21008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21009  if test "x$has_forbidden_chars" != x; then
21010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21012  fi
21013
21014
21015  windows_path="$new_path"
21016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21017    unix_path=`$CYGPATH -u "$windows_path"`
21018    new_path="$unix_path"
21019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21021    new_path="$unix_path"
21022  fi
21023
21024  if test "x$path" != "x$new_path"; then
21025    BOOT_JDK="$new_path"
21026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21027$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21028  fi
21029
21030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21032
21033    else
21034      # We're on a unix platform. Hooray! :)
21035      path="$BOOT_JDK"
21036      has_space=`$ECHO "$path" | $GREP " "`
21037      if test "x$has_space" != x; then
21038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21040        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21041      fi
21042
21043      # Use eval to expand a potential ~
21044      eval path="$path"
21045      if test ! -f "$path" && test ! -d "$path"; then
21046        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21047      fi
21048
21049      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21050    fi
21051  fi
21052
21053            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21054$as_echo_n "checking for Boot JDK... " >&6; }
21055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21056$as_echo "$BOOT_JDK" >&6; }
21057            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21058$as_echo_n "checking Boot JDK version... " >&6; }
21059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21061$as_echo "$BOOT_JDK_VERSION" >&6; }
21062          fi # end check jdk version
21063        fi # end check javac
21064      fi # end check java
21065    fi # end check boot jdk found
21066  fi
21067
21068  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
21069    # Having specified an argument which is incorrect will produce an instant failure;
21070    # we should not go on looking
21071    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
21072  fi
21073
21074  # Test: Is bootjdk available from builddeps?
21075
21076  if test "x$BOOT_JDK_FOUND" = xno; then
21077    # Now execute the test
21078
21079
21080
21081  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
21082    # Source the builddeps file again, to make sure it uses the latest variables!
21083    . $builddepsfile
21084    # Look for a target and build machine specific resource!
21085    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
21086    if test "x$resource" = x; then
21087      # Ok, lets instead look for a target specific resource
21088      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
21089    fi
21090    if test "x$resource" = x; then
21091      # Ok, lets instead look for a build specific resource
21092      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
21093    fi
21094    if test "x$resource" = x; then
21095      # Ok, lets instead look for a generic resource
21096      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
21097      resource=${builddep_bootjdk}
21098    fi
21099    if test "x$resource" != x; then
21100      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
21101$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
21102      # If the resource in the builddeps.conf file is an existing directory,
21103      # for example /java/linux/cups
21104      if test -d ${resource}; then
21105        depdir=${resource}
21106      else
21107
21108  # bootjdk is for example mymodule
21109  # $resource is for example libs/general/libmymod_1_2_3.zip
21110  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
21111  # $with_builddeps_dir is for example /localhome/builddeps
21112  # depdir is the name of the variable into which we store the depdir, eg MYMOD
21113  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
21114  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
21115  filename=`basename $resource`
21116  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
21117  filebase=${filename%%.*}
21118  extension=${filename#*.}
21119  installdir=$with_builddeps_dir/$filebase
21120  if test ! -f $installdir/$filename.unpacked; then
21121    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
21122$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
21123    if test ! -d $installdir; then
21124      mkdir -p $installdir
21125    fi
21126    if test ! -d $installdir; then
21127      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
21128    fi
21129    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
21130    touch $tmpfile
21131    if test ! -f $tmpfile; then
21132      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
21133    fi
21134
21135  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
21136  # $tmpfile is the local file name for the downloaded file.
21137  VALID_TOOL=no
21138  if test "x$BDEPS_FTP" = xwget; then
21139    VALID_TOOL=yes
21140    wget -O $tmpfile $with_builddeps_server/$resource
21141  fi
21142  if test "x$BDEPS_FTP" = xlftp; then
21143    VALID_TOOL=yes
21144    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
21145  fi
21146  if test "x$BDEPS_FTP" = xftp; then
21147    VALID_TOOL=yes
21148    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
21149    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
21150    FTPUSERPWD=${FTPSERVER%%@*}
21151    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
21152      FTPUSER=${userpwd%%:*}
21153      FTPPWD=${userpwd#*@}
21154      FTPSERVER=${FTPSERVER#*@}
21155    else
21156      FTPUSER=ftp
21157      FTPPWD=ftp
21158    fi
21159    # the "pass" command does not work on some
21160    # ftp clients (read ftp.exe) but if it works,
21161    # passive mode is better!
21162    ( \
21163        echo "user $FTPUSER $FTPPWD"        ; \
21164        echo "pass"                         ; \
21165        echo "bin"                          ; \
21166        echo "get $FTPPATH $tmpfile"              ; \
21167    ) | ftp -in $FTPSERVER
21168  fi
21169  if test "x$VALID_TOOL" != xyes; then
21170    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
21171  fi
21172
21173    mv $tmpfile $installdir/$filename
21174    if test ! -s $installdir/$filename; then
21175      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
21176    fi
21177    case "$extension" in
21178      zip)  echo "Unzipping $installdir/$filename..."
21179        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
21180        ;;
21181      tar.gz) echo "Untaring $installdir/$filename..."
21182        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21183        ;;
21184      tgz) echo "Untaring $installdir/$filename..."
21185        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21186        ;;
21187      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
21188        ;;
21189    esac
21190  fi
21191  if test -f $installdir/$filename.unpacked; then
21192    depdir=$installdir
21193  fi
21194
21195      fi
21196      # Source the builddeps file again, because in the previous command, the depdir
21197      # was updated to point at the current build dependency install directory.
21198      . $builddepsfile
21199      # Now extract variables from the builddeps.conf files.
21200      theroot=${builddep_bootjdk_ROOT}
21201      thecflags=${builddep_bootjdk_CFLAGS}
21202      thelibs=${builddep_bootjdk_LIBS}
21203      if test "x$depdir" = x; then
21204        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21205      fi
21206      BOOT_JDK=$depdir
21207      if test "x$theroot" != x; then
21208        BOOT_JDK="$theroot"
21209      fi
21210      if test "x$thecflags" != x; then
21211        BOOT_JDK_CFLAGS="$thecflags"
21212      fi
21213      if test "x$thelibs" != x; then
21214        BOOT_JDK_LIBS="$thelibs"
21215      fi
21216      BOOT_JDK_FOUND=maybe
21217      else BOOT_JDK_FOUND=no
21218
21219    fi
21220    else BOOT_JDK_FOUND=no
21221
21222  fi
21223
21224
21225
21226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21228      # Do we have a bin/java?
21229      if test ! -x "$BOOT_JDK/bin/java"; then
21230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21232        BOOT_JDK_FOUND=no
21233      else
21234        # Do we have a bin/javac?
21235        if test ! -x "$BOOT_JDK/bin/javac"; then
21236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21240          BOOT_JDK_FOUND=no
21241        else
21242          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21243          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21244
21245          # Extra M4 quote needed to protect [] in grep expression.
21246          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21247          if test "x$FOUND_CORRECT_VERSION" = x; then
21248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21250            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21251$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21252            BOOT_JDK_FOUND=no
21253          else
21254            # We're done! :-)
21255            BOOT_JDK_FOUND=yes
21256
21257  # Only process if variable expands to non-empty
21258
21259  if test "x$BOOT_JDK" != x; then
21260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21261
21262  # Input might be given as Windows format, start by converting to
21263  # unix format.
21264  path="$BOOT_JDK"
21265  new_path=`$CYGPATH -u "$path"`
21266
21267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21270  # "foo.exe" is OK but "foo" is an error.
21271  #
21272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21273  # It is also a way to make sure we got the proper file name for the real test later on.
21274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21275  if test "x$test_shortpath" = x; then
21276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21278    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21279  fi
21280
21281  # Call helper function which possibly converts this using DOS-style short mode.
21282  # If so, the updated path is stored in $new_path.
21283
21284  input_path="$new_path"
21285  # Check if we need to convert this using DOS-style short mode. If the path
21286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21287  # take no chances and rewrite it.
21288  # Note: m4 eats our [], so we need to use [ and ] instead.
21289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21290  if test "x$has_forbidden_chars" != x; then
21291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21295      # Going to short mode and back again did indeed matter. Since short mode is
21296      # case insensitive, let's make it lowercase to improve readability.
21297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21298      # Now convert it back to Unix-style (cygpath)
21299      input_path=`$CYGPATH -u "$shortmode_path"`
21300      new_path="$input_path"
21301    fi
21302  fi
21303
21304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21305  if test "x$test_cygdrive_prefix" = x; then
21306    # As a simple fix, exclude /usr/bin since it's not a real path.
21307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21309      # a path prefixed by /cygdrive for fixpath to work.
21310      new_path="$CYGWIN_ROOT_PATH$input_path"
21311    fi
21312  fi
21313
21314
21315  if test "x$path" != "x$new_path"; then
21316    BOOT_JDK="$new_path"
21317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21319  fi
21320
21321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21322
21323  path="$BOOT_JDK"
21324  has_colon=`$ECHO $path | $GREP ^.:`
21325  new_path="$path"
21326  if test "x$has_colon" = x; then
21327    # Not in mixed or Windows style, start by that.
21328    new_path=`cmd //c echo $path`
21329  fi
21330
21331
21332  input_path="$new_path"
21333  # Check if we need to convert this using DOS-style short mode. If the path
21334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21335  # take no chances and rewrite it.
21336  # Note: m4 eats our [], so we need to use [ and ] instead.
21337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21338  if test "x$has_forbidden_chars" != x; then
21339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21341  fi
21342
21343
21344  windows_path="$new_path"
21345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21346    unix_path=`$CYGPATH -u "$windows_path"`
21347    new_path="$unix_path"
21348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21350    new_path="$unix_path"
21351  fi
21352
21353  if test "x$path" != "x$new_path"; then
21354    BOOT_JDK="$new_path"
21355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21357  fi
21358
21359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21361
21362    else
21363      # We're on a unix platform. Hooray! :)
21364      path="$BOOT_JDK"
21365      has_space=`$ECHO "$path" | $GREP " "`
21366      if test "x$has_space" != x; then
21367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21370      fi
21371
21372      # Use eval to expand a potential ~
21373      eval path="$path"
21374      if test ! -f "$path" && test ! -d "$path"; then
21375        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21376      fi
21377
21378      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21379    fi
21380  fi
21381
21382            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21383$as_echo_n "checking for Boot JDK... " >&6; }
21384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21385$as_echo "$BOOT_JDK" >&6; }
21386            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21387$as_echo_n "checking Boot JDK version... " >&6; }
21388            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21390$as_echo "$BOOT_JDK_VERSION" >&6; }
21391          fi # end check jdk version
21392        fi # end check javac
21393      fi # end check java
21394    fi # end check boot jdk found
21395  fi
21396
21397
21398  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21399
21400  if test "x$BOOT_JDK_FOUND" = xno; then
21401    # Now execute the test
21402
21403  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21404    # First check at user selected default
21405
21406  if test "x$BOOT_JDK_FOUND" = xno; then
21407    # Now execute the test
21408
21409  if test -x /usr/libexec/java_home; then
21410    BOOT_JDK=`/usr/libexec/java_home `
21411    BOOT_JDK_FOUND=maybe
21412    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21413$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21414  fi
21415
21416
21417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21419      # Do we have a bin/java?
21420      if test ! -x "$BOOT_JDK/bin/java"; then
21421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21423        BOOT_JDK_FOUND=no
21424      else
21425        # Do we have a bin/javac?
21426        if test ! -x "$BOOT_JDK/bin/javac"; then
21427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21431          BOOT_JDK_FOUND=no
21432        else
21433          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21434          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21435
21436          # Extra M4 quote needed to protect [] in grep expression.
21437          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21438          if test "x$FOUND_CORRECT_VERSION" = x; then
21439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21441            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21442$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21443            BOOT_JDK_FOUND=no
21444          else
21445            # We're done! :-)
21446            BOOT_JDK_FOUND=yes
21447
21448  # Only process if variable expands to non-empty
21449
21450  if test "x$BOOT_JDK" != x; then
21451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21452
21453  # Input might be given as Windows format, start by converting to
21454  # unix format.
21455  path="$BOOT_JDK"
21456  new_path=`$CYGPATH -u "$path"`
21457
21458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21461  # "foo.exe" is OK but "foo" is an error.
21462  #
21463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21464  # It is also a way to make sure we got the proper file name for the real test later on.
21465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21466  if test "x$test_shortpath" = x; then
21467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21469    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21470  fi
21471
21472  # Call helper function which possibly converts this using DOS-style short mode.
21473  # If so, the updated path is stored in $new_path.
21474
21475  input_path="$new_path"
21476  # Check if we need to convert this using DOS-style short mode. If the path
21477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21478  # take no chances and rewrite it.
21479  # Note: m4 eats our [], so we need to use [ and ] instead.
21480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21481  if test "x$has_forbidden_chars" != x; then
21482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21486      # Going to short mode and back again did indeed matter. Since short mode is
21487      # case insensitive, let's make it lowercase to improve readability.
21488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21489      # Now convert it back to Unix-style (cygpath)
21490      input_path=`$CYGPATH -u "$shortmode_path"`
21491      new_path="$input_path"
21492    fi
21493  fi
21494
21495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21496  if test "x$test_cygdrive_prefix" = x; then
21497    # As a simple fix, exclude /usr/bin since it's not a real path.
21498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21500      # a path prefixed by /cygdrive for fixpath to work.
21501      new_path="$CYGWIN_ROOT_PATH$input_path"
21502    fi
21503  fi
21504
21505
21506  if test "x$path" != "x$new_path"; then
21507    BOOT_JDK="$new_path"
21508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21510  fi
21511
21512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21513
21514  path="$BOOT_JDK"
21515  has_colon=`$ECHO $path | $GREP ^.:`
21516  new_path="$path"
21517  if test "x$has_colon" = x; then
21518    # Not in mixed or Windows style, start by that.
21519    new_path=`cmd //c echo $path`
21520  fi
21521
21522
21523  input_path="$new_path"
21524  # Check if we need to convert this using DOS-style short mode. If the path
21525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21526  # take no chances and rewrite it.
21527  # Note: m4 eats our [], so we need to use [ and ] instead.
21528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21529  if test "x$has_forbidden_chars" != x; then
21530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21532  fi
21533
21534
21535  windows_path="$new_path"
21536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21537    unix_path=`$CYGPATH -u "$windows_path"`
21538    new_path="$unix_path"
21539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21541    new_path="$unix_path"
21542  fi
21543
21544  if test "x$path" != "x$new_path"; then
21545    BOOT_JDK="$new_path"
21546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21548  fi
21549
21550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21552
21553    else
21554      # We're on a unix platform. Hooray! :)
21555      path="$BOOT_JDK"
21556      has_space=`$ECHO "$path" | $GREP " "`
21557      if test "x$has_space" != x; then
21558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21561      fi
21562
21563      # Use eval to expand a potential ~
21564      eval path="$path"
21565      if test ! -f "$path" && test ! -d "$path"; then
21566        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21567      fi
21568
21569      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21570    fi
21571  fi
21572
21573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21574$as_echo_n "checking for Boot JDK... " >&6; }
21575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21576$as_echo "$BOOT_JDK" >&6; }
21577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21578$as_echo_n "checking Boot JDK version... " >&6; }
21579            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21581$as_echo "$BOOT_JDK_VERSION" >&6; }
21582          fi # end check jdk version
21583        fi # end check javac
21584      fi # end check java
21585    fi # end check boot jdk found
21586  fi
21587
21588    # If that did not work out (e.g. too old), try explicit versions instead
21589
21590  if test "x$BOOT_JDK_FOUND" = xno; then
21591    # Now execute the test
21592
21593  if test -x /usr/libexec/java_home; then
21594    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21595    BOOT_JDK_FOUND=maybe
21596    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21597$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21598  fi
21599
21600
21601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21603      # Do we have a bin/java?
21604      if test ! -x "$BOOT_JDK/bin/java"; then
21605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21607        BOOT_JDK_FOUND=no
21608      else
21609        # Do we have a bin/javac?
21610        if test ! -x "$BOOT_JDK/bin/javac"; then
21611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21615          BOOT_JDK_FOUND=no
21616        else
21617          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21618          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21619
21620          # Extra M4 quote needed to protect [] in grep expression.
21621          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21622          if test "x$FOUND_CORRECT_VERSION" = x; then
21623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21625            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21626$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21627            BOOT_JDK_FOUND=no
21628          else
21629            # We're done! :-)
21630            BOOT_JDK_FOUND=yes
21631
21632  # Only process if variable expands to non-empty
21633
21634  if test "x$BOOT_JDK" != x; then
21635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21636
21637  # Input might be given as Windows format, start by converting to
21638  # unix format.
21639  path="$BOOT_JDK"
21640  new_path=`$CYGPATH -u "$path"`
21641
21642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21645  # "foo.exe" is OK but "foo" is an error.
21646  #
21647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21648  # It is also a way to make sure we got the proper file name for the real test later on.
21649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21650  if test "x$test_shortpath" = x; then
21651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21654  fi
21655
21656  # Call helper function which possibly converts this using DOS-style short mode.
21657  # If so, the updated path is stored in $new_path.
21658
21659  input_path="$new_path"
21660  # Check if we need to convert this using DOS-style short mode. If the path
21661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21662  # take no chances and rewrite it.
21663  # Note: m4 eats our [], so we need to use [ and ] instead.
21664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21665  if test "x$has_forbidden_chars" != x; then
21666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21670      # Going to short mode and back again did indeed matter. Since short mode is
21671      # case insensitive, let's make it lowercase to improve readability.
21672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21673      # Now convert it back to Unix-style (cygpath)
21674      input_path=`$CYGPATH -u "$shortmode_path"`
21675      new_path="$input_path"
21676    fi
21677  fi
21678
21679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21680  if test "x$test_cygdrive_prefix" = x; then
21681    # As a simple fix, exclude /usr/bin since it's not a real path.
21682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21684      # a path prefixed by /cygdrive for fixpath to work.
21685      new_path="$CYGWIN_ROOT_PATH$input_path"
21686    fi
21687  fi
21688
21689
21690  if test "x$path" != "x$new_path"; then
21691    BOOT_JDK="$new_path"
21692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21694  fi
21695
21696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21697
21698  path="$BOOT_JDK"
21699  has_colon=`$ECHO $path | $GREP ^.:`
21700  new_path="$path"
21701  if test "x$has_colon" = x; then
21702    # Not in mixed or Windows style, start by that.
21703    new_path=`cmd //c echo $path`
21704  fi
21705
21706
21707  input_path="$new_path"
21708  # Check if we need to convert this using DOS-style short mode. If the path
21709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21710  # take no chances and rewrite it.
21711  # Note: m4 eats our [], so we need to use [ and ] instead.
21712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21713  if test "x$has_forbidden_chars" != x; then
21714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21716  fi
21717
21718
21719  windows_path="$new_path"
21720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21721    unix_path=`$CYGPATH -u "$windows_path"`
21722    new_path="$unix_path"
21723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21725    new_path="$unix_path"
21726  fi
21727
21728  if test "x$path" != "x$new_path"; then
21729    BOOT_JDK="$new_path"
21730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21732  fi
21733
21734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21736
21737    else
21738      # We're on a unix platform. Hooray! :)
21739      path="$BOOT_JDK"
21740      has_space=`$ECHO "$path" | $GREP " "`
21741      if test "x$has_space" != x; then
21742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21745      fi
21746
21747      # Use eval to expand a potential ~
21748      eval path="$path"
21749      if test ! -f "$path" && test ! -d "$path"; then
21750        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21751      fi
21752
21753      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21754    fi
21755  fi
21756
21757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21758$as_echo_n "checking for Boot JDK... " >&6; }
21759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21760$as_echo "$BOOT_JDK" >&6; }
21761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21762$as_echo_n "checking Boot JDK version... " >&6; }
21763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21765$as_echo "$BOOT_JDK_VERSION" >&6; }
21766          fi # end check jdk version
21767        fi # end check javac
21768      fi # end check java
21769    fi # end check boot jdk found
21770  fi
21771
21772
21773  if test "x$BOOT_JDK_FOUND" = xno; then
21774    # Now execute the test
21775
21776  if test -x /usr/libexec/java_home; then
21777    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21778    BOOT_JDK_FOUND=maybe
21779    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21780$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21781  fi
21782
21783
21784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21786      # Do we have a bin/java?
21787      if test ! -x "$BOOT_JDK/bin/java"; then
21788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21790        BOOT_JDK_FOUND=no
21791      else
21792        # Do we have a bin/javac?
21793        if test ! -x "$BOOT_JDK/bin/javac"; then
21794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21798          BOOT_JDK_FOUND=no
21799        else
21800          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21801          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21802
21803          # Extra M4 quote needed to protect [] in grep expression.
21804          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21805          if test "x$FOUND_CORRECT_VERSION" = x; then
21806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21808            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21810            BOOT_JDK_FOUND=no
21811          else
21812            # We're done! :-)
21813            BOOT_JDK_FOUND=yes
21814
21815  # Only process if variable expands to non-empty
21816
21817  if test "x$BOOT_JDK" != x; then
21818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21819
21820  # Input might be given as Windows format, start by converting to
21821  # unix format.
21822  path="$BOOT_JDK"
21823  new_path=`$CYGPATH -u "$path"`
21824
21825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21828  # "foo.exe" is OK but "foo" is an error.
21829  #
21830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21831  # It is also a way to make sure we got the proper file name for the real test later on.
21832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21833  if test "x$test_shortpath" = x; then
21834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21837  fi
21838
21839  # Call helper function which possibly converts this using DOS-style short mode.
21840  # If so, the updated path is stored in $new_path.
21841
21842  input_path="$new_path"
21843  # Check if we need to convert this using DOS-style short mode. If the path
21844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21845  # take no chances and rewrite it.
21846  # Note: m4 eats our [], so we need to use [ and ] instead.
21847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21848  if test "x$has_forbidden_chars" != x; then
21849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21853      # Going to short mode and back again did indeed matter. Since short mode is
21854      # case insensitive, let's make it lowercase to improve readability.
21855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21856      # Now convert it back to Unix-style (cygpath)
21857      input_path=`$CYGPATH -u "$shortmode_path"`
21858      new_path="$input_path"
21859    fi
21860  fi
21861
21862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21863  if test "x$test_cygdrive_prefix" = x; then
21864    # As a simple fix, exclude /usr/bin since it's not a real path.
21865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21867      # a path prefixed by /cygdrive for fixpath to work.
21868      new_path="$CYGWIN_ROOT_PATH$input_path"
21869    fi
21870  fi
21871
21872
21873  if test "x$path" != "x$new_path"; then
21874    BOOT_JDK="$new_path"
21875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21877  fi
21878
21879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21880
21881  path="$BOOT_JDK"
21882  has_colon=`$ECHO $path | $GREP ^.:`
21883  new_path="$path"
21884  if test "x$has_colon" = x; then
21885    # Not in mixed or Windows style, start by that.
21886    new_path=`cmd //c echo $path`
21887  fi
21888
21889
21890  input_path="$new_path"
21891  # Check if we need to convert this using DOS-style short mode. If the path
21892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21893  # take no chances and rewrite it.
21894  # Note: m4 eats our [], so we need to use [ and ] instead.
21895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21896  if test "x$has_forbidden_chars" != x; then
21897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21899  fi
21900
21901
21902  windows_path="$new_path"
21903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21904    unix_path=`$CYGPATH -u "$windows_path"`
21905    new_path="$unix_path"
21906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21908    new_path="$unix_path"
21909  fi
21910
21911  if test "x$path" != "x$new_path"; then
21912    BOOT_JDK="$new_path"
21913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21915  fi
21916
21917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21919
21920    else
21921      # We're on a unix platform. Hooray! :)
21922      path="$BOOT_JDK"
21923      has_space=`$ECHO "$path" | $GREP " "`
21924      if test "x$has_space" != x; then
21925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21928      fi
21929
21930      # Use eval to expand a potential ~
21931      eval path="$path"
21932      if test ! -f "$path" && test ! -d "$path"; then
21933        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21934      fi
21935
21936      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21937    fi
21938  fi
21939
21940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21941$as_echo_n "checking for Boot JDK... " >&6; }
21942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21943$as_echo "$BOOT_JDK" >&6; }
21944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21945$as_echo_n "checking Boot JDK version... " >&6; }
21946            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21948$as_echo "$BOOT_JDK_VERSION" >&6; }
21949          fi # end check jdk version
21950        fi # end check javac
21951      fi # end check java
21952    fi # end check boot jdk found
21953  fi
21954
21955
21956  if test "x$BOOT_JDK_FOUND" = xno; then
21957    # Now execute the test
21958
21959  if test -x /usr/libexec/java_home; then
21960    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21961    BOOT_JDK_FOUND=maybe
21962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21963$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21964  fi
21965
21966
21967    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21968    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21969      # Do we have a bin/java?
21970      if test ! -x "$BOOT_JDK/bin/java"; then
21971        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21973        BOOT_JDK_FOUND=no
21974      else
21975        # Do we have a bin/javac?
21976        if test ! -x "$BOOT_JDK/bin/javac"; then
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21979          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21980$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21981          BOOT_JDK_FOUND=no
21982        else
21983          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21984          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21985
21986          # Extra M4 quote needed to protect [] in grep expression.
21987          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21988          if test "x$FOUND_CORRECT_VERSION" = x; then
21989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21991            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21992$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21993            BOOT_JDK_FOUND=no
21994          else
21995            # We're done! :-)
21996            BOOT_JDK_FOUND=yes
21997
21998  # Only process if variable expands to non-empty
21999
22000  if test "x$BOOT_JDK" != x; then
22001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22002
22003  # Input might be given as Windows format, start by converting to
22004  # unix format.
22005  path="$BOOT_JDK"
22006  new_path=`$CYGPATH -u "$path"`
22007
22008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22011  # "foo.exe" is OK but "foo" is an error.
22012  #
22013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22014  # It is also a way to make sure we got the proper file name for the real test later on.
22015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22016  if test "x$test_shortpath" = x; then
22017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22019    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22020  fi
22021
22022  # Call helper function which possibly converts this using DOS-style short mode.
22023  # If so, the updated path is stored in $new_path.
22024
22025  input_path="$new_path"
22026  # Check if we need to convert this using DOS-style short mode. If the path
22027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22028  # take no chances and rewrite it.
22029  # Note: m4 eats our [], so we need to use [ and ] instead.
22030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22031  if test "x$has_forbidden_chars" != x; then
22032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22036      # Going to short mode and back again did indeed matter. Since short mode is
22037      # case insensitive, let's make it lowercase to improve readability.
22038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22039      # Now convert it back to Unix-style (cygpath)
22040      input_path=`$CYGPATH -u "$shortmode_path"`
22041      new_path="$input_path"
22042    fi
22043  fi
22044
22045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22046  if test "x$test_cygdrive_prefix" = x; then
22047    # As a simple fix, exclude /usr/bin since it's not a real path.
22048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22050      # a path prefixed by /cygdrive for fixpath to work.
22051      new_path="$CYGWIN_ROOT_PATH$input_path"
22052    fi
22053  fi
22054
22055
22056  if test "x$path" != "x$new_path"; then
22057    BOOT_JDK="$new_path"
22058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22060  fi
22061
22062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22063
22064  path="$BOOT_JDK"
22065  has_colon=`$ECHO $path | $GREP ^.:`
22066  new_path="$path"
22067  if test "x$has_colon" = x; then
22068    # Not in mixed or Windows style, start by that.
22069    new_path=`cmd //c echo $path`
22070  fi
22071
22072
22073  input_path="$new_path"
22074  # Check if we need to convert this using DOS-style short mode. If the path
22075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22076  # take no chances and rewrite it.
22077  # Note: m4 eats our [], so we need to use [ and ] instead.
22078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22079  if test "x$has_forbidden_chars" != x; then
22080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22082  fi
22083
22084
22085  windows_path="$new_path"
22086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22087    unix_path=`$CYGPATH -u "$windows_path"`
22088    new_path="$unix_path"
22089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22091    new_path="$unix_path"
22092  fi
22093
22094  if test "x$path" != "x$new_path"; then
22095    BOOT_JDK="$new_path"
22096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22098  fi
22099
22100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22102
22103    else
22104      # We're on a unix platform. Hooray! :)
22105      path="$BOOT_JDK"
22106      has_space=`$ECHO "$path" | $GREP " "`
22107      if test "x$has_space" != x; then
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22111      fi
22112
22113      # Use eval to expand a potential ~
22114      eval path="$path"
22115      if test ! -f "$path" && test ! -d "$path"; then
22116        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22117      fi
22118
22119      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22120    fi
22121  fi
22122
22123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22124$as_echo_n "checking for Boot JDK... " >&6; }
22125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22126$as_echo "$BOOT_JDK" >&6; }
22127            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22128$as_echo_n "checking Boot JDK version... " >&6; }
22129            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22131$as_echo "$BOOT_JDK_VERSION" >&6; }
22132          fi # end check jdk version
22133        fi # end check javac
22134      fi # end check java
22135    fi # end check boot jdk found
22136  fi
22137
22138  fi
22139
22140
22141    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22142    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22143      # Do we have a bin/java?
22144      if test ! -x "$BOOT_JDK/bin/java"; then
22145        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22147        BOOT_JDK_FOUND=no
22148      else
22149        # Do we have a bin/javac?
22150        if test ! -x "$BOOT_JDK/bin/javac"; then
22151          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22153          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22154$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22155          BOOT_JDK_FOUND=no
22156        else
22157          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22158          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22159
22160          # Extra M4 quote needed to protect [] in grep expression.
22161          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22162          if test "x$FOUND_CORRECT_VERSION" = x; then
22163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22165            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22166$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22167            BOOT_JDK_FOUND=no
22168          else
22169            # We're done! :-)
22170            BOOT_JDK_FOUND=yes
22171
22172  # Only process if variable expands to non-empty
22173
22174  if test "x$BOOT_JDK" != x; then
22175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22176
22177  # Input might be given as Windows format, start by converting to
22178  # unix format.
22179  path="$BOOT_JDK"
22180  new_path=`$CYGPATH -u "$path"`
22181
22182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22185  # "foo.exe" is OK but "foo" is an error.
22186  #
22187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22188  # It is also a way to make sure we got the proper file name for the real test later on.
22189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22190  if test "x$test_shortpath" = x; then
22191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22194  fi
22195
22196  # Call helper function which possibly converts this using DOS-style short mode.
22197  # If so, the updated path is stored in $new_path.
22198
22199  input_path="$new_path"
22200  # Check if we need to convert this using DOS-style short mode. If the path
22201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22202  # take no chances and rewrite it.
22203  # Note: m4 eats our [], so we need to use [ and ] instead.
22204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22205  if test "x$has_forbidden_chars" != x; then
22206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22210      # Going to short mode and back again did indeed matter. Since short mode is
22211      # case insensitive, let's make it lowercase to improve readability.
22212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22213      # Now convert it back to Unix-style (cygpath)
22214      input_path=`$CYGPATH -u "$shortmode_path"`
22215      new_path="$input_path"
22216    fi
22217  fi
22218
22219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22220  if test "x$test_cygdrive_prefix" = x; then
22221    # As a simple fix, exclude /usr/bin since it's not a real path.
22222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22224      # a path prefixed by /cygdrive for fixpath to work.
22225      new_path="$CYGWIN_ROOT_PATH$input_path"
22226    fi
22227  fi
22228
22229
22230  if test "x$path" != "x$new_path"; then
22231    BOOT_JDK="$new_path"
22232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22234  fi
22235
22236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22237
22238  path="$BOOT_JDK"
22239  has_colon=`$ECHO $path | $GREP ^.:`
22240  new_path="$path"
22241  if test "x$has_colon" = x; then
22242    # Not in mixed or Windows style, start by that.
22243    new_path=`cmd //c echo $path`
22244  fi
22245
22246
22247  input_path="$new_path"
22248  # Check if we need to convert this using DOS-style short mode. If the path
22249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22250  # take no chances and rewrite it.
22251  # Note: m4 eats our [], so we need to use [ and ] instead.
22252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22253  if test "x$has_forbidden_chars" != x; then
22254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22256  fi
22257
22258
22259  windows_path="$new_path"
22260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22261    unix_path=`$CYGPATH -u "$windows_path"`
22262    new_path="$unix_path"
22263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22265    new_path="$unix_path"
22266  fi
22267
22268  if test "x$path" != "x$new_path"; then
22269    BOOT_JDK="$new_path"
22270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22272  fi
22273
22274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22276
22277    else
22278      # We're on a unix platform. Hooray! :)
22279      path="$BOOT_JDK"
22280      has_space=`$ECHO "$path" | $GREP " "`
22281      if test "x$has_space" != x; then
22282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22285      fi
22286
22287      # Use eval to expand a potential ~
22288      eval path="$path"
22289      if test ! -f "$path" && test ! -d "$path"; then
22290        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22291      fi
22292
22293      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22294    fi
22295  fi
22296
22297            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22298$as_echo_n "checking for Boot JDK... " >&6; }
22299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22300$as_echo "$BOOT_JDK" >&6; }
22301            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22302$as_echo_n "checking Boot JDK version... " >&6; }
22303            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22305$as_echo "$BOOT_JDK_VERSION" >&6; }
22306          fi # end check jdk version
22307        fi # end check javac
22308      fi # end check java
22309    fi # end check boot jdk found
22310  fi
22311
22312
22313  # Test: Is $JAVA_HOME set?
22314
22315  if test "x$BOOT_JDK_FOUND" = xno; then
22316    # Now execute the test
22317
22318  if test "x$JAVA_HOME" != x; then
22319    JAVA_HOME_PROCESSED="$JAVA_HOME"
22320
22321  # Only process if variable expands to non-empty
22322
22323  if test "x$JAVA_HOME_PROCESSED" != x; then
22324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22325
22326  # Input might be given as Windows format, start by converting to
22327  # unix format.
22328  path="$JAVA_HOME_PROCESSED"
22329  new_path=`$CYGPATH -u "$path"`
22330
22331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22334  # "foo.exe" is OK but "foo" is an error.
22335  #
22336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22337  # It is also a way to make sure we got the proper file name for the real test later on.
22338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22339  if test "x$test_shortpath" = x; then
22340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22341$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22342    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22343  fi
22344
22345  # Call helper function which possibly converts this using DOS-style short mode.
22346  # If so, the updated path is stored in $new_path.
22347
22348  input_path="$new_path"
22349  # Check if we need to convert this using DOS-style short mode. If the path
22350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22351  # take no chances and rewrite it.
22352  # Note: m4 eats our [], so we need to use [ and ] instead.
22353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22354  if test "x$has_forbidden_chars" != x; then
22355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22359      # Going to short mode and back again did indeed matter. Since short mode is
22360      # case insensitive, let's make it lowercase to improve readability.
22361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22362      # Now convert it back to Unix-style (cygpath)
22363      input_path=`$CYGPATH -u "$shortmode_path"`
22364      new_path="$input_path"
22365    fi
22366  fi
22367
22368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22369  if test "x$test_cygdrive_prefix" = x; then
22370    # As a simple fix, exclude /usr/bin since it's not a real path.
22371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22373      # a path prefixed by /cygdrive for fixpath to work.
22374      new_path="$CYGWIN_ROOT_PATH$input_path"
22375    fi
22376  fi
22377
22378
22379  if test "x$path" != "x$new_path"; then
22380    JAVA_HOME_PROCESSED="$new_path"
22381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22382$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22383  fi
22384
22385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22386
22387  path="$JAVA_HOME_PROCESSED"
22388  has_colon=`$ECHO $path | $GREP ^.:`
22389  new_path="$path"
22390  if test "x$has_colon" = x; then
22391    # Not in mixed or Windows style, start by that.
22392    new_path=`cmd //c echo $path`
22393  fi
22394
22395
22396  input_path="$new_path"
22397  # Check if we need to convert this using DOS-style short mode. If the path
22398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22399  # take no chances and rewrite it.
22400  # Note: m4 eats our [], so we need to use [ and ] instead.
22401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22402  if test "x$has_forbidden_chars" != x; then
22403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22405  fi
22406
22407
22408  windows_path="$new_path"
22409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22410    unix_path=`$CYGPATH -u "$windows_path"`
22411    new_path="$unix_path"
22412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22414    new_path="$unix_path"
22415  fi
22416
22417  if test "x$path" != "x$new_path"; then
22418    JAVA_HOME_PROCESSED="$new_path"
22419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22420$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22421  fi
22422
22423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22425
22426    else
22427      # We're on a unix platform. Hooray! :)
22428      path="$JAVA_HOME_PROCESSED"
22429      has_space=`$ECHO "$path" | $GREP " "`
22430      if test "x$has_space" != x; then
22431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22432$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22434      fi
22435
22436      # Use eval to expand a potential ~
22437      eval path="$path"
22438      if test ! -f "$path" && test ! -d "$path"; then
22439        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22440      fi
22441
22442      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22443    fi
22444  fi
22445
22446    if test ! -d "$JAVA_HOME_PROCESSED"; then
22447      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22448$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22449    else
22450      # Aha, the user has set a JAVA_HOME
22451      # let us use that as the Boot JDK.
22452      BOOT_JDK="$JAVA_HOME_PROCESSED"
22453      BOOT_JDK_FOUND=maybe
22454      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22455$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22456    fi
22457  fi
22458
22459
22460    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22461    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22462      # Do we have a bin/java?
22463      if test ! -x "$BOOT_JDK/bin/java"; then
22464        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22466        BOOT_JDK_FOUND=no
22467      else
22468        # Do we have a bin/javac?
22469        if test ! -x "$BOOT_JDK/bin/javac"; then
22470          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22472          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22473$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22474          BOOT_JDK_FOUND=no
22475        else
22476          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22477          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22478
22479          # Extra M4 quote needed to protect [] in grep expression.
22480          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22481          if test "x$FOUND_CORRECT_VERSION" = x; then
22482            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22484            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22485$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22486            BOOT_JDK_FOUND=no
22487          else
22488            # We're done! :-)
22489            BOOT_JDK_FOUND=yes
22490
22491  # Only process if variable expands to non-empty
22492
22493  if test "x$BOOT_JDK" != x; then
22494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22495
22496  # Input might be given as Windows format, start by converting to
22497  # unix format.
22498  path="$BOOT_JDK"
22499  new_path=`$CYGPATH -u "$path"`
22500
22501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22504  # "foo.exe" is OK but "foo" is an error.
22505  #
22506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22507  # It is also a way to make sure we got the proper file name for the real test later on.
22508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22509  if test "x$test_shortpath" = x; then
22510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22512    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22513  fi
22514
22515  # Call helper function which possibly converts this using DOS-style short mode.
22516  # If so, the updated path is stored in $new_path.
22517
22518  input_path="$new_path"
22519  # Check if we need to convert this using DOS-style short mode. If the path
22520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22521  # take no chances and rewrite it.
22522  # Note: m4 eats our [], so we need to use [ and ] instead.
22523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22524  if test "x$has_forbidden_chars" != x; then
22525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22529      # Going to short mode and back again did indeed matter. Since short mode is
22530      # case insensitive, let's make it lowercase to improve readability.
22531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22532      # Now convert it back to Unix-style (cygpath)
22533      input_path=`$CYGPATH -u "$shortmode_path"`
22534      new_path="$input_path"
22535    fi
22536  fi
22537
22538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22539  if test "x$test_cygdrive_prefix" = x; then
22540    # As a simple fix, exclude /usr/bin since it's not a real path.
22541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22543      # a path prefixed by /cygdrive for fixpath to work.
22544      new_path="$CYGWIN_ROOT_PATH$input_path"
22545    fi
22546  fi
22547
22548
22549  if test "x$path" != "x$new_path"; then
22550    BOOT_JDK="$new_path"
22551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22553  fi
22554
22555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22556
22557  path="$BOOT_JDK"
22558  has_colon=`$ECHO $path | $GREP ^.:`
22559  new_path="$path"
22560  if test "x$has_colon" = x; then
22561    # Not in mixed or Windows style, start by that.
22562    new_path=`cmd //c echo $path`
22563  fi
22564
22565
22566  input_path="$new_path"
22567  # Check if we need to convert this using DOS-style short mode. If the path
22568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22569  # take no chances and rewrite it.
22570  # Note: m4 eats our [], so we need to use [ and ] instead.
22571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22572  if test "x$has_forbidden_chars" != x; then
22573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22575  fi
22576
22577
22578  windows_path="$new_path"
22579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22580    unix_path=`$CYGPATH -u "$windows_path"`
22581    new_path="$unix_path"
22582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22584    new_path="$unix_path"
22585  fi
22586
22587  if test "x$path" != "x$new_path"; then
22588    BOOT_JDK="$new_path"
22589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22591  fi
22592
22593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22595
22596    else
22597      # We're on a unix platform. Hooray! :)
22598      path="$BOOT_JDK"
22599      has_space=`$ECHO "$path" | $GREP " "`
22600      if test "x$has_space" != x; then
22601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22604      fi
22605
22606      # Use eval to expand a potential ~
22607      eval path="$path"
22608      if test ! -f "$path" && test ! -d "$path"; then
22609        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22610      fi
22611
22612      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22613    fi
22614  fi
22615
22616            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22617$as_echo_n "checking for Boot JDK... " >&6; }
22618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22619$as_echo "$BOOT_JDK" >&6; }
22620            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22621$as_echo_n "checking Boot JDK version... " >&6; }
22622            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22624$as_echo "$BOOT_JDK_VERSION" >&6; }
22625          fi # end check jdk version
22626        fi # end check javac
22627      fi # end check java
22628    fi # end check boot jdk found
22629  fi
22630
22631
22632  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22633
22634  if test "x$BOOT_JDK_FOUND" = xno; then
22635    # Now execute the test
22636
22637  # Extract the first word of "javac", so it can be a program name with args.
22638set dummy javac; ac_word=$2
22639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22640$as_echo_n "checking for $ac_word... " >&6; }
22641if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22642  $as_echo_n "(cached) " >&6
22643else
22644  case $JAVAC_CHECK in
22645  [\\/]* | ?:[\\/]*)
22646  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22647  ;;
22648  *)
22649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22650for as_dir in $PATH
22651do
22652  IFS=$as_save_IFS
22653  test -z "$as_dir" && as_dir=.
22654    for ac_exec_ext in '' $ac_executable_extensions; do
22655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22656    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22658    break 2
22659  fi
22660done
22661  done
22662IFS=$as_save_IFS
22663
22664  ;;
22665esac
22666fi
22667JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22668if test -n "$JAVAC_CHECK"; then
22669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22670$as_echo "$JAVAC_CHECK" >&6; }
22671else
22672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22673$as_echo "no" >&6; }
22674fi
22675
22676
22677  # Extract the first word of "java", so it can be a program name with args.
22678set dummy java; ac_word=$2
22679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22680$as_echo_n "checking for $ac_word... " >&6; }
22681if ${ac_cv_path_JAVA_CHECK+:} false; then :
22682  $as_echo_n "(cached) " >&6
22683else
22684  case $JAVA_CHECK in
22685  [\\/]* | ?:[\\/]*)
22686  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22687  ;;
22688  *)
22689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22690for as_dir in $PATH
22691do
22692  IFS=$as_save_IFS
22693  test -z "$as_dir" && as_dir=.
22694    for ac_exec_ext in '' $ac_executable_extensions; do
22695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22696    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22698    break 2
22699  fi
22700done
22701  done
22702IFS=$as_save_IFS
22703
22704  ;;
22705esac
22706fi
22707JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22708if test -n "$JAVA_CHECK"; then
22709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22710$as_echo "$JAVA_CHECK" >&6; }
22711else
22712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22713$as_echo "no" >&6; }
22714fi
22715
22716
22717  BINARY="$JAVAC_CHECK"
22718  if test "x$JAVAC_CHECK" = x; then
22719    BINARY="$JAVA_CHECK"
22720  fi
22721  if test "x$BINARY" != x; then
22722    # So there is a java(c) binary, it might be part of a JDK.
22723    # Lets find the JDK/JRE directory by following symbolic links.
22724    # Linux/GNU systems often have links from /usr/bin/java to
22725    # /etc/alternatives/java to the real JDK binary.
22726
22727  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22728    # Follow a chain of symbolic links. Use readlink
22729    # where it exists, else fall back to horribly
22730    # complicated shell code.
22731    if test "x$READLINK_TESTED" != yes; then
22732      # On MacOSX there is a readlink tool with a different
22733      # purpose than the GNU readlink tool. Check the found readlink.
22734      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22735      if test "x$ISGNU" = x; then
22736        # A readlink that we do not know how to use.
22737        # Are there other non-GNU readlinks out there?
22738        READLINK_TESTED=yes
22739        READLINK=
22740      fi
22741    fi
22742
22743    if test "x$READLINK" != x; then
22744      BINARY=`$READLINK -f $BINARY`
22745    else
22746      # Save the current directory for restoring afterwards
22747      STARTDIR=$PWD
22748      COUNTER=0
22749      sym_link_dir=`$DIRNAME $BINARY`
22750      sym_link_file=`$BASENAME $BINARY`
22751      cd $sym_link_dir
22752      # Use -P flag to resolve symlinks in directories.
22753      cd `$THEPWDCMD -P`
22754      sym_link_dir=`$THEPWDCMD -P`
22755      # Resolve file symlinks
22756      while test $COUNTER -lt 20; do
22757        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22758        if test "x$ISLINK" == x; then
22759          # This is not a symbolic link! We are done!
22760          break
22761        fi
22762        # Again resolve directory symlinks since the target of the just found
22763        # link could be in a different directory
22764        cd `$DIRNAME $ISLINK`
22765        sym_link_dir=`$THEPWDCMD -P`
22766        sym_link_file=`$BASENAME $ISLINK`
22767        let COUNTER=COUNTER+1
22768      done
22769      cd $STARTDIR
22770      BINARY=$sym_link_dir/$sym_link_file
22771    fi
22772  fi
22773
22774    BOOT_JDK=`dirname "$BINARY"`
22775    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22776    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22777      # Looks like we found ourselves an JDK
22778      BOOT_JDK_FOUND=maybe
22779      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22780$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22781    fi
22782  fi
22783
22784
22785    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22786    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22787      # Do we have a bin/java?
22788      if test ! -x "$BOOT_JDK/bin/java"; then
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22791        BOOT_JDK_FOUND=no
22792      else
22793        # Do we have a bin/javac?
22794        if test ! -x "$BOOT_JDK/bin/javac"; then
22795          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22797          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22798$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22799          BOOT_JDK_FOUND=no
22800        else
22801          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22802          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22803
22804          # Extra M4 quote needed to protect [] in grep expression.
22805          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22806          if test "x$FOUND_CORRECT_VERSION" = x; then
22807            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22809            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22810$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22811            BOOT_JDK_FOUND=no
22812          else
22813            # We're done! :-)
22814            BOOT_JDK_FOUND=yes
22815
22816  # Only process if variable expands to non-empty
22817
22818  if test "x$BOOT_JDK" != x; then
22819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22820
22821  # Input might be given as Windows format, start by converting to
22822  # unix format.
22823  path="$BOOT_JDK"
22824  new_path=`$CYGPATH -u "$path"`
22825
22826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22829  # "foo.exe" is OK but "foo" is an error.
22830  #
22831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22832  # It is also a way to make sure we got the proper file name for the real test later on.
22833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22834  if test "x$test_shortpath" = x; then
22835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22838  fi
22839
22840  # Call helper function which possibly converts this using DOS-style short mode.
22841  # If so, the updated path is stored in $new_path.
22842
22843  input_path="$new_path"
22844  # Check if we need to convert this using DOS-style short mode. If the path
22845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22846  # take no chances and rewrite it.
22847  # Note: m4 eats our [], so we need to use [ and ] instead.
22848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22849  if test "x$has_forbidden_chars" != x; then
22850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22854      # Going to short mode and back again did indeed matter. Since short mode is
22855      # case insensitive, let's make it lowercase to improve readability.
22856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22857      # Now convert it back to Unix-style (cygpath)
22858      input_path=`$CYGPATH -u "$shortmode_path"`
22859      new_path="$input_path"
22860    fi
22861  fi
22862
22863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22864  if test "x$test_cygdrive_prefix" = x; then
22865    # As a simple fix, exclude /usr/bin since it's not a real path.
22866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22868      # a path prefixed by /cygdrive for fixpath to work.
22869      new_path="$CYGWIN_ROOT_PATH$input_path"
22870    fi
22871  fi
22872
22873
22874  if test "x$path" != "x$new_path"; then
22875    BOOT_JDK="$new_path"
22876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22878  fi
22879
22880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22881
22882  path="$BOOT_JDK"
22883  has_colon=`$ECHO $path | $GREP ^.:`
22884  new_path="$path"
22885  if test "x$has_colon" = x; then
22886    # Not in mixed or Windows style, start by that.
22887    new_path=`cmd //c echo $path`
22888  fi
22889
22890
22891  input_path="$new_path"
22892  # Check if we need to convert this using DOS-style short mode. If the path
22893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22894  # take no chances and rewrite it.
22895  # Note: m4 eats our [], so we need to use [ and ] instead.
22896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22897  if test "x$has_forbidden_chars" != x; then
22898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22900  fi
22901
22902
22903  windows_path="$new_path"
22904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22905    unix_path=`$CYGPATH -u "$windows_path"`
22906    new_path="$unix_path"
22907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22909    new_path="$unix_path"
22910  fi
22911
22912  if test "x$path" != "x$new_path"; then
22913    BOOT_JDK="$new_path"
22914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22916  fi
22917
22918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22920
22921    else
22922      # We're on a unix platform. Hooray! :)
22923      path="$BOOT_JDK"
22924      has_space=`$ECHO "$path" | $GREP " "`
22925      if test "x$has_space" != x; then
22926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22929      fi
22930
22931      # Use eval to expand a potential ~
22932      eval path="$path"
22933      if test ! -f "$path" && test ! -d "$path"; then
22934        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22935      fi
22936
22937      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22938    fi
22939  fi
22940
22941            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22942$as_echo_n "checking for Boot JDK... " >&6; }
22943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22944$as_echo "$BOOT_JDK" >&6; }
22945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22946$as_echo_n "checking Boot JDK version... " >&6; }
22947            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22949$as_echo "$BOOT_JDK_VERSION" >&6; }
22950          fi # end check jdk version
22951        fi # end check javac
22952      fi # end check java
22953    fi # end check boot jdk found
22954  fi
22955
22956
22957  # Test: Is there a JDK installed in default, well-known locations?
22958
22959  if test "x$BOOT_JDK_FOUND" = xno; then
22960    # Now execute the test
22961
22962  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22963
22964  if test "x$BOOT_JDK_FOUND" = xno; then
22965    # Now execute the test
22966
22967  if test "x$ProgramW6432" != x; then
22968    VIRTUAL_DIR="$ProgramW6432/Java"
22969
22970  windows_path="$VIRTUAL_DIR"
22971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22972    unix_path=`$CYGPATH -u "$windows_path"`
22973    VIRTUAL_DIR="$unix_path"
22974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22976    VIRTUAL_DIR="$unix_path"
22977  fi
22978
22979
22980  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22981  BOOT_JDK_SUFFIX=""
22982  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22983  if test "x$ALL_JDKS_FOUND" != x; then
22984    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22985
22986  if test "x$BOOT_JDK_FOUND" = xno; then
22987    # Now execute the test
22988
22989        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22990        if test -d "$BOOT_JDK"; then
22991          BOOT_JDK_FOUND=maybe
22992          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22993$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22994        fi
22995
22996
22997    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22998    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22999      # Do we have a bin/java?
23000      if test ! -x "$BOOT_JDK/bin/java"; then
23001        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23003        BOOT_JDK_FOUND=no
23004      else
23005        # Do we have a bin/javac?
23006        if test ! -x "$BOOT_JDK/bin/javac"; then
23007          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23009          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23010$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23011          BOOT_JDK_FOUND=no
23012        else
23013          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23014          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23015
23016          # Extra M4 quote needed to protect [] in grep expression.
23017          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23018          if test "x$FOUND_CORRECT_VERSION" = x; then
23019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23021            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23022$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23023            BOOT_JDK_FOUND=no
23024          else
23025            # We're done! :-)
23026            BOOT_JDK_FOUND=yes
23027
23028  # Only process if variable expands to non-empty
23029
23030  if test "x$BOOT_JDK" != x; then
23031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23032
23033  # Input might be given as Windows format, start by converting to
23034  # unix format.
23035  path="$BOOT_JDK"
23036  new_path=`$CYGPATH -u "$path"`
23037
23038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23041  # "foo.exe" is OK but "foo" is an error.
23042  #
23043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23044  # It is also a way to make sure we got the proper file name for the real test later on.
23045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23046  if test "x$test_shortpath" = x; then
23047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23050  fi
23051
23052  # Call helper function which possibly converts this using DOS-style short mode.
23053  # If so, the updated path is stored in $new_path.
23054
23055  input_path="$new_path"
23056  # Check if we need to convert this using DOS-style short mode. If the path
23057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23058  # take no chances and rewrite it.
23059  # Note: m4 eats our [], so we need to use [ and ] instead.
23060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23061  if test "x$has_forbidden_chars" != x; then
23062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23066      # Going to short mode and back again did indeed matter. Since short mode is
23067      # case insensitive, let's make it lowercase to improve readability.
23068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23069      # Now convert it back to Unix-style (cygpath)
23070      input_path=`$CYGPATH -u "$shortmode_path"`
23071      new_path="$input_path"
23072    fi
23073  fi
23074
23075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23076  if test "x$test_cygdrive_prefix" = x; then
23077    # As a simple fix, exclude /usr/bin since it's not a real path.
23078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23080      # a path prefixed by /cygdrive for fixpath to work.
23081      new_path="$CYGWIN_ROOT_PATH$input_path"
23082    fi
23083  fi
23084
23085
23086  if test "x$path" != "x$new_path"; then
23087    BOOT_JDK="$new_path"
23088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23090  fi
23091
23092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23093
23094  path="$BOOT_JDK"
23095  has_colon=`$ECHO $path | $GREP ^.:`
23096  new_path="$path"
23097  if test "x$has_colon" = x; then
23098    # Not in mixed or Windows style, start by that.
23099    new_path=`cmd //c echo $path`
23100  fi
23101
23102
23103  input_path="$new_path"
23104  # Check if we need to convert this using DOS-style short mode. If the path
23105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23106  # take no chances and rewrite it.
23107  # Note: m4 eats our [], so we need to use [ and ] instead.
23108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23109  if test "x$has_forbidden_chars" != x; then
23110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23112  fi
23113
23114
23115  windows_path="$new_path"
23116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23117    unix_path=`$CYGPATH -u "$windows_path"`
23118    new_path="$unix_path"
23119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23121    new_path="$unix_path"
23122  fi
23123
23124  if test "x$path" != "x$new_path"; then
23125    BOOT_JDK="$new_path"
23126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23128  fi
23129
23130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23132
23133    else
23134      # We're on a unix platform. Hooray! :)
23135      path="$BOOT_JDK"
23136      has_space=`$ECHO "$path" | $GREP " "`
23137      if test "x$has_space" != x; then
23138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23141      fi
23142
23143      # Use eval to expand a potential ~
23144      eval path="$path"
23145      if test ! -f "$path" && test ! -d "$path"; then
23146        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23147      fi
23148
23149      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23150    fi
23151  fi
23152
23153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23154$as_echo_n "checking for Boot JDK... " >&6; }
23155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23156$as_echo "$BOOT_JDK" >&6; }
23157            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23158$as_echo_n "checking Boot JDK version... " >&6; }
23159            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23161$as_echo "$BOOT_JDK_VERSION" >&6; }
23162          fi # end check jdk version
23163        fi # end check javac
23164      fi # end check java
23165    fi # end check boot jdk found
23166  fi
23167
23168    done
23169  fi
23170
23171  fi
23172
23173
23174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23176      # Do we have a bin/java?
23177      if test ! -x "$BOOT_JDK/bin/java"; then
23178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23180        BOOT_JDK_FOUND=no
23181      else
23182        # Do we have a bin/javac?
23183        if test ! -x "$BOOT_JDK/bin/javac"; then
23184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23188          BOOT_JDK_FOUND=no
23189        else
23190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23192
23193          # Extra M4 quote needed to protect [] in grep expression.
23194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23195          if test "x$FOUND_CORRECT_VERSION" = x; then
23196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23200            BOOT_JDK_FOUND=no
23201          else
23202            # We're done! :-)
23203            BOOT_JDK_FOUND=yes
23204
23205  # Only process if variable expands to non-empty
23206
23207  if test "x$BOOT_JDK" != x; then
23208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209
23210  # Input might be given as Windows format, start by converting to
23211  # unix format.
23212  path="$BOOT_JDK"
23213  new_path=`$CYGPATH -u "$path"`
23214
23215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23218  # "foo.exe" is OK but "foo" is an error.
23219  #
23220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23221  # It is also a way to make sure we got the proper file name for the real test later on.
23222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23223  if test "x$test_shortpath" = x; then
23224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23227  fi
23228
23229  # Call helper function which possibly converts this using DOS-style short mode.
23230  # If so, the updated path is stored in $new_path.
23231
23232  input_path="$new_path"
23233  # Check if we need to convert this using DOS-style short mode. If the path
23234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23235  # take no chances and rewrite it.
23236  # Note: m4 eats our [], so we need to use [ and ] instead.
23237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23238  if test "x$has_forbidden_chars" != x; then
23239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23243      # Going to short mode and back again did indeed matter. Since short mode is
23244      # case insensitive, let's make it lowercase to improve readability.
23245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23246      # Now convert it back to Unix-style (cygpath)
23247      input_path=`$CYGPATH -u "$shortmode_path"`
23248      new_path="$input_path"
23249    fi
23250  fi
23251
23252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23253  if test "x$test_cygdrive_prefix" = x; then
23254    # As a simple fix, exclude /usr/bin since it's not a real path.
23255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23257      # a path prefixed by /cygdrive for fixpath to work.
23258      new_path="$CYGWIN_ROOT_PATH$input_path"
23259    fi
23260  fi
23261
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23270
23271  path="$BOOT_JDK"
23272  has_colon=`$ECHO $path | $GREP ^.:`
23273  new_path="$path"
23274  if test "x$has_colon" = x; then
23275    # Not in mixed or Windows style, start by that.
23276    new_path=`cmd //c echo $path`
23277  fi
23278
23279
23280  input_path="$new_path"
23281  # Check if we need to convert this using DOS-style short mode. If the path
23282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23283  # take no chances and rewrite it.
23284  # Note: m4 eats our [], so we need to use [ and ] instead.
23285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23286  if test "x$has_forbidden_chars" != x; then
23287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23289  fi
23290
23291
23292  windows_path="$new_path"
23293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23294    unix_path=`$CYGPATH -u "$windows_path"`
23295    new_path="$unix_path"
23296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23298    new_path="$unix_path"
23299  fi
23300
23301  if test "x$path" != "x$new_path"; then
23302    BOOT_JDK="$new_path"
23303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23305  fi
23306
23307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23309
23310    else
23311      # We're on a unix platform. Hooray! :)
23312      path="$BOOT_JDK"
23313      has_space=`$ECHO "$path" | $GREP " "`
23314      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
23318      fi
23319
23320      # Use eval to expand a potential ~
23321      eval path="$path"
23322      if test ! -f "$path" && test ! -d "$path"; then
23323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23324      fi
23325
23326      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23327    fi
23328  fi
23329
23330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23331$as_echo_n "checking for Boot JDK... " >&6; }
23332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23333$as_echo "$BOOT_JDK" >&6; }
23334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23335$as_echo_n "checking Boot JDK version... " >&6; }
23336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23338$as_echo "$BOOT_JDK_VERSION" >&6; }
23339          fi # end check jdk version
23340        fi # end check javac
23341      fi # end check java
23342    fi # end check boot jdk found
23343  fi
23344
23345
23346  if test "x$BOOT_JDK_FOUND" = xno; then
23347    # Now execute the test
23348
23349  if test "x$PROGRAMW6432" != x; then
23350    VIRTUAL_DIR="$PROGRAMW6432/Java"
23351
23352  windows_path="$VIRTUAL_DIR"
23353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23354    unix_path=`$CYGPATH -u "$windows_path"`
23355    VIRTUAL_DIR="$unix_path"
23356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23358    VIRTUAL_DIR="$unix_path"
23359  fi
23360
23361
23362  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23363  BOOT_JDK_SUFFIX=""
23364  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23365  if test "x$ALL_JDKS_FOUND" != x; then
23366    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23367
23368  if test "x$BOOT_JDK_FOUND" = xno; then
23369    # Now execute the test
23370
23371        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23372        if test -d "$BOOT_JDK"; then
23373          BOOT_JDK_FOUND=maybe
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23375$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23376        fi
23377
23378
23379    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23380    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23381      # Do we have a bin/java?
23382      if test ! -x "$BOOT_JDK/bin/java"; then
23383        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23385        BOOT_JDK_FOUND=no
23386      else
23387        # Do we have a bin/javac?
23388        if test ! -x "$BOOT_JDK/bin/javac"; then
23389          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23391          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23392$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23393          BOOT_JDK_FOUND=no
23394        else
23395          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23396          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23397
23398          # Extra M4 quote needed to protect [] in grep expression.
23399          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23400          if test "x$FOUND_CORRECT_VERSION" = x; then
23401            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23403            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23404$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23405            BOOT_JDK_FOUND=no
23406          else
23407            # We're done! :-)
23408            BOOT_JDK_FOUND=yes
23409
23410  # Only process if variable expands to non-empty
23411
23412  if test "x$BOOT_JDK" != x; then
23413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23414
23415  # Input might be given as Windows format, start by converting to
23416  # unix format.
23417  path="$BOOT_JDK"
23418  new_path=`$CYGPATH -u "$path"`
23419
23420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23423  # "foo.exe" is OK but "foo" is an error.
23424  #
23425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23426  # It is also a way to make sure we got the proper file name for the real test later on.
23427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23428  if test "x$test_shortpath" = x; then
23429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23431    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23432  fi
23433
23434  # Call helper function which possibly converts this using DOS-style short mode.
23435  # If so, the updated path is stored in $new_path.
23436
23437  input_path="$new_path"
23438  # Check if we need to convert this using DOS-style short mode. If the path
23439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23440  # take no chances and rewrite it.
23441  # Note: m4 eats our [], so we need to use [ and ] instead.
23442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23443  if test "x$has_forbidden_chars" != x; then
23444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23448      # Going to short mode and back again did indeed matter. Since short mode is
23449      # case insensitive, let's make it lowercase to improve readability.
23450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23451      # Now convert it back to Unix-style (cygpath)
23452      input_path=`$CYGPATH -u "$shortmode_path"`
23453      new_path="$input_path"
23454    fi
23455  fi
23456
23457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23458  if test "x$test_cygdrive_prefix" = x; then
23459    # As a simple fix, exclude /usr/bin since it's not a real path.
23460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23462      # a path prefixed by /cygdrive for fixpath to work.
23463      new_path="$CYGWIN_ROOT_PATH$input_path"
23464    fi
23465  fi
23466
23467
23468  if test "x$path" != "x$new_path"; then
23469    BOOT_JDK="$new_path"
23470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23472  fi
23473
23474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23475
23476  path="$BOOT_JDK"
23477  has_colon=`$ECHO $path | $GREP ^.:`
23478  new_path="$path"
23479  if test "x$has_colon" = x; then
23480    # Not in mixed or Windows style, start by that.
23481    new_path=`cmd //c echo $path`
23482  fi
23483
23484
23485  input_path="$new_path"
23486  # Check if we need to convert this using DOS-style short mode. If the path
23487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23488  # take no chances and rewrite it.
23489  # Note: m4 eats our [], so we need to use [ and ] instead.
23490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23491  if test "x$has_forbidden_chars" != x; then
23492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23494  fi
23495
23496
23497  windows_path="$new_path"
23498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23499    unix_path=`$CYGPATH -u "$windows_path"`
23500    new_path="$unix_path"
23501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23503    new_path="$unix_path"
23504  fi
23505
23506  if test "x$path" != "x$new_path"; then
23507    BOOT_JDK="$new_path"
23508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23510  fi
23511
23512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23514
23515    else
23516      # We're on a unix platform. Hooray! :)
23517      path="$BOOT_JDK"
23518      has_space=`$ECHO "$path" | $GREP " "`
23519      if test "x$has_space" != x; then
23520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23523      fi
23524
23525      # Use eval to expand a potential ~
23526      eval path="$path"
23527      if test ! -f "$path" && test ! -d "$path"; then
23528        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23529      fi
23530
23531      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23532    fi
23533  fi
23534
23535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23536$as_echo_n "checking for Boot JDK... " >&6; }
23537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23538$as_echo "$BOOT_JDK" >&6; }
23539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23540$as_echo_n "checking Boot JDK version... " >&6; }
23541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23543$as_echo "$BOOT_JDK_VERSION" >&6; }
23544          fi # end check jdk version
23545        fi # end check javac
23546      fi # end check java
23547    fi # end check boot jdk found
23548  fi
23549
23550    done
23551  fi
23552
23553  fi
23554
23555
23556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23558      # Do we have a bin/java?
23559      if test ! -x "$BOOT_JDK/bin/java"; then
23560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23562        BOOT_JDK_FOUND=no
23563      else
23564        # Do we have a bin/javac?
23565        if test ! -x "$BOOT_JDK/bin/javac"; then
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23570          BOOT_JDK_FOUND=no
23571        else
23572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23574
23575          # Extra M4 quote needed to protect [] in grep expression.
23576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23577          if test "x$FOUND_CORRECT_VERSION" = x; then
23578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23582            BOOT_JDK_FOUND=no
23583          else
23584            # We're done! :-)
23585            BOOT_JDK_FOUND=yes
23586
23587  # Only process if variable expands to non-empty
23588
23589  if test "x$BOOT_JDK" != x; then
23590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23591
23592  # Input might be given as Windows format, start by converting to
23593  # unix format.
23594  path="$BOOT_JDK"
23595  new_path=`$CYGPATH -u "$path"`
23596
23597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23600  # "foo.exe" is OK but "foo" is an error.
23601  #
23602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23603  # It is also a way to make sure we got the proper file name for the real test later on.
23604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23605  if test "x$test_shortpath" = x; then
23606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23609  fi
23610
23611  # Call helper function which possibly converts this using DOS-style short mode.
23612  # If so, the updated path is stored in $new_path.
23613
23614  input_path="$new_path"
23615  # Check if we need to convert this using DOS-style short mode. If the path
23616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23617  # take no chances and rewrite it.
23618  # Note: m4 eats our [], so we need to use [ and ] instead.
23619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23620  if test "x$has_forbidden_chars" != x; then
23621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23625      # Going to short mode and back again did indeed matter. Since short mode is
23626      # case insensitive, let's make it lowercase to improve readability.
23627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23628      # Now convert it back to Unix-style (cygpath)
23629      input_path=`$CYGPATH -u "$shortmode_path"`
23630      new_path="$input_path"
23631    fi
23632  fi
23633
23634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23635  if test "x$test_cygdrive_prefix" = x; then
23636    # As a simple fix, exclude /usr/bin since it's not a real path.
23637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23639      # a path prefixed by /cygdrive for fixpath to work.
23640      new_path="$CYGWIN_ROOT_PATH$input_path"
23641    fi
23642  fi
23643
23644
23645  if test "x$path" != "x$new_path"; then
23646    BOOT_JDK="$new_path"
23647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23649  fi
23650
23651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23652
23653  path="$BOOT_JDK"
23654  has_colon=`$ECHO $path | $GREP ^.:`
23655  new_path="$path"
23656  if test "x$has_colon" = x; then
23657    # Not in mixed or Windows style, start by that.
23658    new_path=`cmd //c echo $path`
23659  fi
23660
23661
23662  input_path="$new_path"
23663  # Check if we need to convert this using DOS-style short mode. If the path
23664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23665  # take no chances and rewrite it.
23666  # Note: m4 eats our [], so we need to use [ and ] instead.
23667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23668  if test "x$has_forbidden_chars" != x; then
23669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23671  fi
23672
23673
23674  windows_path="$new_path"
23675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23676    unix_path=`$CYGPATH -u "$windows_path"`
23677    new_path="$unix_path"
23678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23680    new_path="$unix_path"
23681  fi
23682
23683  if test "x$path" != "x$new_path"; then
23684    BOOT_JDK="$new_path"
23685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23687  fi
23688
23689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23691
23692    else
23693      # We're on a unix platform. Hooray! :)
23694      path="$BOOT_JDK"
23695      has_space=`$ECHO "$path" | $GREP " "`
23696      if test "x$has_space" != x; then
23697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23700      fi
23701
23702      # Use eval to expand a potential ~
23703      eval path="$path"
23704      if test ! -f "$path" && test ! -d "$path"; then
23705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23706      fi
23707
23708      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23709    fi
23710  fi
23711
23712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23713$as_echo_n "checking for Boot JDK... " >&6; }
23714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23715$as_echo "$BOOT_JDK" >&6; }
23716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23717$as_echo_n "checking Boot JDK version... " >&6; }
23718            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23720$as_echo "$BOOT_JDK_VERSION" >&6; }
23721          fi # end check jdk version
23722        fi # end check javac
23723      fi # end check java
23724    fi # end check boot jdk found
23725  fi
23726
23727
23728  if test "x$BOOT_JDK_FOUND" = xno; then
23729    # Now execute the test
23730
23731  if test "x$PROGRAMFILES" != x; then
23732    VIRTUAL_DIR="$PROGRAMFILES/Java"
23733
23734  windows_path="$VIRTUAL_DIR"
23735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23736    unix_path=`$CYGPATH -u "$windows_path"`
23737    VIRTUAL_DIR="$unix_path"
23738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23740    VIRTUAL_DIR="$unix_path"
23741  fi
23742
23743
23744  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23745  BOOT_JDK_SUFFIX=""
23746  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23747  if test "x$ALL_JDKS_FOUND" != x; then
23748    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23749
23750  if test "x$BOOT_JDK_FOUND" = xno; then
23751    # Now execute the test
23752
23753        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23754        if test -d "$BOOT_JDK"; then
23755          BOOT_JDK_FOUND=maybe
23756          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23757$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23758        fi
23759
23760
23761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23763      # Do we have a bin/java?
23764      if test ! -x "$BOOT_JDK/bin/java"; then
23765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23767        BOOT_JDK_FOUND=no
23768      else
23769        # Do we have a bin/javac?
23770        if test ! -x "$BOOT_JDK/bin/javac"; then
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23775          BOOT_JDK_FOUND=no
23776        else
23777          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23778          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23779
23780          # Extra M4 quote needed to protect [] in grep expression.
23781          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23782          if test "x$FOUND_CORRECT_VERSION" = x; then
23783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23785            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23786$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23787            BOOT_JDK_FOUND=no
23788          else
23789            # We're done! :-)
23790            BOOT_JDK_FOUND=yes
23791
23792  # Only process if variable expands to non-empty
23793
23794  if test "x$BOOT_JDK" != x; then
23795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23796
23797  # Input might be given as Windows format, start by converting to
23798  # unix format.
23799  path="$BOOT_JDK"
23800  new_path=`$CYGPATH -u "$path"`
23801
23802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23805  # "foo.exe" is OK but "foo" is an error.
23806  #
23807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23808  # It is also a way to make sure we got the proper file name for the real test later on.
23809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23810  if test "x$test_shortpath" = x; then
23811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23814  fi
23815
23816  # Call helper function which possibly converts this using DOS-style short mode.
23817  # If so, the updated path is stored in $new_path.
23818
23819  input_path="$new_path"
23820  # Check if we need to convert this using DOS-style short mode. If the path
23821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23822  # take no chances and rewrite it.
23823  # Note: m4 eats our [], so we need to use [ and ] instead.
23824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23825  if test "x$has_forbidden_chars" != x; then
23826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23830      # Going to short mode and back again did indeed matter. Since short mode is
23831      # case insensitive, let's make it lowercase to improve readability.
23832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23833      # Now convert it back to Unix-style (cygpath)
23834      input_path=`$CYGPATH -u "$shortmode_path"`
23835      new_path="$input_path"
23836    fi
23837  fi
23838
23839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23840  if test "x$test_cygdrive_prefix" = x; then
23841    # As a simple fix, exclude /usr/bin since it's not a real path.
23842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23844      # a path prefixed by /cygdrive for fixpath to work.
23845      new_path="$CYGWIN_ROOT_PATH$input_path"
23846    fi
23847  fi
23848
23849
23850  if test "x$path" != "x$new_path"; then
23851    BOOT_JDK="$new_path"
23852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23854  fi
23855
23856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23857
23858  path="$BOOT_JDK"
23859  has_colon=`$ECHO $path | $GREP ^.:`
23860  new_path="$path"
23861  if test "x$has_colon" = x; then
23862    # Not in mixed or Windows style, start by that.
23863    new_path=`cmd //c echo $path`
23864  fi
23865
23866
23867  input_path="$new_path"
23868  # Check if we need to convert this using DOS-style short mode. If the path
23869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23870  # take no chances and rewrite it.
23871  # Note: m4 eats our [], so we need to use [ and ] instead.
23872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23873  if test "x$has_forbidden_chars" != x; then
23874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876  fi
23877
23878
23879  windows_path="$new_path"
23880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881    unix_path=`$CYGPATH -u "$windows_path"`
23882    new_path="$unix_path"
23883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23885    new_path="$unix_path"
23886  fi
23887
23888  if test "x$path" != "x$new_path"; then
23889    BOOT_JDK="$new_path"
23890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23892  fi
23893
23894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23896
23897    else
23898      # We're on a unix platform. Hooray! :)
23899      path="$BOOT_JDK"
23900      has_space=`$ECHO "$path" | $GREP " "`
23901      if test "x$has_space" != x; then
23902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23905      fi
23906
23907      # Use eval to expand a potential ~
23908      eval path="$path"
23909      if test ! -f "$path" && test ! -d "$path"; then
23910        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23911      fi
23912
23913      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23914    fi
23915  fi
23916
23917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23918$as_echo_n "checking for Boot JDK... " >&6; }
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23920$as_echo "$BOOT_JDK" >&6; }
23921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23922$as_echo_n "checking Boot JDK version... " >&6; }
23923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23925$as_echo "$BOOT_JDK_VERSION" >&6; }
23926          fi # end check jdk version
23927        fi # end check javac
23928      fi # end check java
23929    fi # end check boot jdk found
23930  fi
23931
23932    done
23933  fi
23934
23935  fi
23936
23937
23938    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23939    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23940      # Do we have a bin/java?
23941      if test ! -x "$BOOT_JDK/bin/java"; then
23942        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23944        BOOT_JDK_FOUND=no
23945      else
23946        # Do we have a bin/javac?
23947        if test ! -x "$BOOT_JDK/bin/javac"; then
23948          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23950          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23951$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23952          BOOT_JDK_FOUND=no
23953        else
23954          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23955          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23956
23957          # Extra M4 quote needed to protect [] in grep expression.
23958          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23959          if test "x$FOUND_CORRECT_VERSION" = x; then
23960            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23962            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23963$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23964            BOOT_JDK_FOUND=no
23965          else
23966            # We're done! :-)
23967            BOOT_JDK_FOUND=yes
23968
23969  # Only process if variable expands to non-empty
23970
23971  if test "x$BOOT_JDK" != x; then
23972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23973
23974  # Input might be given as Windows format, start by converting to
23975  # unix format.
23976  path="$BOOT_JDK"
23977  new_path=`$CYGPATH -u "$path"`
23978
23979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23982  # "foo.exe" is OK but "foo" is an error.
23983  #
23984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23985  # It is also a way to make sure we got the proper file name for the real test later on.
23986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23987  if test "x$test_shortpath" = x; then
23988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23990    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23991  fi
23992
23993  # Call helper function which possibly converts this using DOS-style short mode.
23994  # If so, the updated path is stored in $new_path.
23995
23996  input_path="$new_path"
23997  # Check if we need to convert this using DOS-style short mode. If the path
23998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23999  # take no chances and rewrite it.
24000  # Note: m4 eats our [], so we need to use [ and ] instead.
24001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24002  if test "x$has_forbidden_chars" != x; then
24003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24007      # Going to short mode and back again did indeed matter. Since short mode is
24008      # case insensitive, let's make it lowercase to improve readability.
24009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24010      # Now convert it back to Unix-style (cygpath)
24011      input_path=`$CYGPATH -u "$shortmode_path"`
24012      new_path="$input_path"
24013    fi
24014  fi
24015
24016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24017  if test "x$test_cygdrive_prefix" = x; then
24018    # As a simple fix, exclude /usr/bin since it's not a real path.
24019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24021      # a path prefixed by /cygdrive for fixpath to work.
24022      new_path="$CYGWIN_ROOT_PATH$input_path"
24023    fi
24024  fi
24025
24026
24027  if test "x$path" != "x$new_path"; then
24028    BOOT_JDK="$new_path"
24029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24031  fi
24032
24033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24034
24035  path="$BOOT_JDK"
24036  has_colon=`$ECHO $path | $GREP ^.:`
24037  new_path="$path"
24038  if test "x$has_colon" = x; then
24039    # Not in mixed or Windows style, start by that.
24040    new_path=`cmd //c echo $path`
24041  fi
24042
24043
24044  input_path="$new_path"
24045  # Check if we need to convert this using DOS-style short mode. If the path
24046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24047  # take no chances and rewrite it.
24048  # Note: m4 eats our [], so we need to use [ and ] instead.
24049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24050  if test "x$has_forbidden_chars" != x; then
24051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24053  fi
24054
24055
24056  windows_path="$new_path"
24057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24058    unix_path=`$CYGPATH -u "$windows_path"`
24059    new_path="$unix_path"
24060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24062    new_path="$unix_path"
24063  fi
24064
24065  if test "x$path" != "x$new_path"; then
24066    BOOT_JDK="$new_path"
24067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24069  fi
24070
24071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24073
24074    else
24075      # We're on a unix platform. Hooray! :)
24076      path="$BOOT_JDK"
24077      has_space=`$ECHO "$path" | $GREP " "`
24078      if test "x$has_space" != x; then
24079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24080$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24082      fi
24083
24084      # Use eval to expand a potential ~
24085      eval path="$path"
24086      if test ! -f "$path" && test ! -d "$path"; then
24087        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24088      fi
24089
24090      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24091    fi
24092  fi
24093
24094            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24095$as_echo_n "checking for Boot JDK... " >&6; }
24096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24097$as_echo "$BOOT_JDK" >&6; }
24098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24099$as_echo_n "checking Boot JDK version... " >&6; }
24100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24102$as_echo "$BOOT_JDK_VERSION" >&6; }
24103          fi # end check jdk version
24104        fi # end check javac
24105      fi # end check java
24106    fi # end check boot jdk found
24107  fi
24108
24109
24110  if test "x$BOOT_JDK_FOUND" = xno; then
24111    # Now execute the test
24112
24113  if test "x$ProgramFiles" != x; then
24114    VIRTUAL_DIR="$ProgramFiles/Java"
24115
24116  windows_path="$VIRTUAL_DIR"
24117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24118    unix_path=`$CYGPATH -u "$windows_path"`
24119    VIRTUAL_DIR="$unix_path"
24120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24122    VIRTUAL_DIR="$unix_path"
24123  fi
24124
24125
24126  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24127  BOOT_JDK_SUFFIX=""
24128  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24129  if test "x$ALL_JDKS_FOUND" != x; then
24130    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24131
24132  if test "x$BOOT_JDK_FOUND" = xno; then
24133    # Now execute the test
24134
24135        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24136        if test -d "$BOOT_JDK"; then
24137          BOOT_JDK_FOUND=maybe
24138          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24139$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24140        fi
24141
24142
24143    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24144    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24145      # Do we have a bin/java?
24146      if test ! -x "$BOOT_JDK/bin/java"; then
24147        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24149        BOOT_JDK_FOUND=no
24150      else
24151        # Do we have a bin/javac?
24152        if test ! -x "$BOOT_JDK/bin/javac"; then
24153          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24155          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24156$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24157          BOOT_JDK_FOUND=no
24158        else
24159          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24160          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24161
24162          # Extra M4 quote needed to protect [] in grep expression.
24163          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24164          if test "x$FOUND_CORRECT_VERSION" = x; then
24165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24167            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24168$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24169            BOOT_JDK_FOUND=no
24170          else
24171            # We're done! :-)
24172            BOOT_JDK_FOUND=yes
24173
24174  # Only process if variable expands to non-empty
24175
24176  if test "x$BOOT_JDK" != x; then
24177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24178
24179  # Input might be given as Windows format, start by converting to
24180  # unix format.
24181  path="$BOOT_JDK"
24182  new_path=`$CYGPATH -u "$path"`
24183
24184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24187  # "foo.exe" is OK but "foo" is an error.
24188  #
24189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24190  # It is also a way to make sure we got the proper file name for the real test later on.
24191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24192  if test "x$test_shortpath" = x; then
24193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24195    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24196  fi
24197
24198  # Call helper function which possibly converts this using DOS-style short mode.
24199  # If so, the updated path is stored in $new_path.
24200
24201  input_path="$new_path"
24202  # Check if we need to convert this using DOS-style short mode. If the path
24203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24204  # take no chances and rewrite it.
24205  # Note: m4 eats our [], so we need to use [ and ] instead.
24206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24207  if test "x$has_forbidden_chars" != x; then
24208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24212      # Going to short mode and back again did indeed matter. Since short mode is
24213      # case insensitive, let's make it lowercase to improve readability.
24214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24215      # Now convert it back to Unix-style (cygpath)
24216      input_path=`$CYGPATH -u "$shortmode_path"`
24217      new_path="$input_path"
24218    fi
24219  fi
24220
24221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24222  if test "x$test_cygdrive_prefix" = x; then
24223    # As a simple fix, exclude /usr/bin since it's not a real path.
24224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24226      # a path prefixed by /cygdrive for fixpath to work.
24227      new_path="$CYGWIN_ROOT_PATH$input_path"
24228    fi
24229  fi
24230
24231
24232  if test "x$path" != "x$new_path"; then
24233    BOOT_JDK="$new_path"
24234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24236  fi
24237
24238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24239
24240  path="$BOOT_JDK"
24241  has_colon=`$ECHO $path | $GREP ^.:`
24242  new_path="$path"
24243  if test "x$has_colon" = x; then
24244    # Not in mixed or Windows style, start by that.
24245    new_path=`cmd //c echo $path`
24246  fi
24247
24248
24249  input_path="$new_path"
24250  # Check if we need to convert this using DOS-style short mode. If the path
24251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24252  # take no chances and rewrite it.
24253  # Note: m4 eats our [], so we need to use [ and ] instead.
24254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24255  if test "x$has_forbidden_chars" != x; then
24256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24258  fi
24259
24260
24261  windows_path="$new_path"
24262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24263    unix_path=`$CYGPATH -u "$windows_path"`
24264    new_path="$unix_path"
24265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24267    new_path="$unix_path"
24268  fi
24269
24270  if test "x$path" != "x$new_path"; then
24271    BOOT_JDK="$new_path"
24272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24274  fi
24275
24276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24278
24279    else
24280      # We're on a unix platform. Hooray! :)
24281      path="$BOOT_JDK"
24282      has_space=`$ECHO "$path" | $GREP " "`
24283      if test "x$has_space" != x; then
24284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24287      fi
24288
24289      # Use eval to expand a potential ~
24290      eval path="$path"
24291      if test ! -f "$path" && test ! -d "$path"; then
24292        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24293      fi
24294
24295      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24296    fi
24297  fi
24298
24299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24300$as_echo_n "checking for Boot JDK... " >&6; }
24301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24302$as_echo "$BOOT_JDK" >&6; }
24303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24304$as_echo_n "checking Boot JDK version... " >&6; }
24305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24307$as_echo "$BOOT_JDK_VERSION" >&6; }
24308          fi # end check jdk version
24309        fi # end check javac
24310      fi # end check java
24311    fi # end check boot jdk found
24312  fi
24313
24314    done
24315  fi
24316
24317  fi
24318
24319
24320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24322      # Do we have a bin/java?
24323      if test ! -x "$BOOT_JDK/bin/java"; then
24324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24326        BOOT_JDK_FOUND=no
24327      else
24328        # Do we have a bin/javac?
24329        if test ! -x "$BOOT_JDK/bin/javac"; then
24330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24334          BOOT_JDK_FOUND=no
24335        else
24336          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24337          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24338
24339          # Extra M4 quote needed to protect [] in grep expression.
24340          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24341          if test "x$FOUND_CORRECT_VERSION" = x; then
24342            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24344            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24345$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24346            BOOT_JDK_FOUND=no
24347          else
24348            # We're done! :-)
24349            BOOT_JDK_FOUND=yes
24350
24351  # Only process if variable expands to non-empty
24352
24353  if test "x$BOOT_JDK" != x; then
24354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24355
24356  # Input might be given as Windows format, start by converting to
24357  # unix format.
24358  path="$BOOT_JDK"
24359  new_path=`$CYGPATH -u "$path"`
24360
24361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24364  # "foo.exe" is OK but "foo" is an error.
24365  #
24366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24367  # It is also a way to make sure we got the proper file name for the real test later on.
24368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24369  if test "x$test_shortpath" = x; then
24370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24372    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24373  fi
24374
24375  # Call helper function which possibly converts this using DOS-style short mode.
24376  # If so, the updated path is stored in $new_path.
24377
24378  input_path="$new_path"
24379  # Check if we need to convert this using DOS-style short mode. If the path
24380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24381  # take no chances and rewrite it.
24382  # Note: m4 eats our [], so we need to use [ and ] instead.
24383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24384  if test "x$has_forbidden_chars" != x; then
24385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24389      # Going to short mode and back again did indeed matter. Since short mode is
24390      # case insensitive, let's make it lowercase to improve readability.
24391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24392      # Now convert it back to Unix-style (cygpath)
24393      input_path=`$CYGPATH -u "$shortmode_path"`
24394      new_path="$input_path"
24395    fi
24396  fi
24397
24398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24399  if test "x$test_cygdrive_prefix" = x; then
24400    # As a simple fix, exclude /usr/bin since it's not a real path.
24401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24403      # a path prefixed by /cygdrive for fixpath to work.
24404      new_path="$CYGWIN_ROOT_PATH$input_path"
24405    fi
24406  fi
24407
24408
24409  if test "x$path" != "x$new_path"; then
24410    BOOT_JDK="$new_path"
24411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24413  fi
24414
24415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24416
24417  path="$BOOT_JDK"
24418  has_colon=`$ECHO $path | $GREP ^.:`
24419  new_path="$path"
24420  if test "x$has_colon" = x; then
24421    # Not in mixed or Windows style, start by that.
24422    new_path=`cmd //c echo $path`
24423  fi
24424
24425
24426  input_path="$new_path"
24427  # Check if we need to convert this using DOS-style short mode. If the path
24428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24429  # take no chances and rewrite it.
24430  # Note: m4 eats our [], so we need to use [ and ] instead.
24431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24432  if test "x$has_forbidden_chars" != x; then
24433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24435  fi
24436
24437
24438  windows_path="$new_path"
24439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24440    unix_path=`$CYGPATH -u "$windows_path"`
24441    new_path="$unix_path"
24442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24444    new_path="$unix_path"
24445  fi
24446
24447  if test "x$path" != "x$new_path"; then
24448    BOOT_JDK="$new_path"
24449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24450$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24451  fi
24452
24453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24455
24456    else
24457      # We're on a unix platform. Hooray! :)
24458      path="$BOOT_JDK"
24459      has_space=`$ECHO "$path" | $GREP " "`
24460      if test "x$has_space" != x; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24462$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24464      fi
24465
24466      # Use eval to expand a potential ~
24467      eval path="$path"
24468      if test ! -f "$path" && test ! -d "$path"; then
24469        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24470      fi
24471
24472      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24473    fi
24474  fi
24475
24476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24477$as_echo_n "checking for Boot JDK... " >&6; }
24478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24479$as_echo "$BOOT_JDK" >&6; }
24480            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24481$as_echo_n "checking Boot JDK version... " >&6; }
24482            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24484$as_echo "$BOOT_JDK_VERSION" >&6; }
24485          fi # end check jdk version
24486        fi # end check javac
24487      fi # end check java
24488    fi # end check boot jdk found
24489  fi
24490
24491
24492  if test "x$BOOT_JDK_FOUND" = xno; then
24493    # Now execute the test
24494
24495  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24496  BOOT_JDK_SUFFIX=""
24497  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24498  if test "x$ALL_JDKS_FOUND" != x; then
24499    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24500
24501  if test "x$BOOT_JDK_FOUND" = xno; then
24502    # Now execute the test
24503
24504        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24505        if test -d "$BOOT_JDK"; then
24506          BOOT_JDK_FOUND=maybe
24507          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24508$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24509        fi
24510
24511
24512    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24513    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24514      # Do we have a bin/java?
24515      if test ! -x "$BOOT_JDK/bin/java"; then
24516        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24518        BOOT_JDK_FOUND=no
24519      else
24520        # Do we have a bin/javac?
24521        if test ! -x "$BOOT_JDK/bin/javac"; then
24522          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24524          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24525$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24526          BOOT_JDK_FOUND=no
24527        else
24528          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24529          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24530
24531          # Extra M4 quote needed to protect [] in grep expression.
24532          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24533          if test "x$FOUND_CORRECT_VERSION" = x; then
24534            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24536            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24537$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24538            BOOT_JDK_FOUND=no
24539          else
24540            # We're done! :-)
24541            BOOT_JDK_FOUND=yes
24542
24543  # Only process if variable expands to non-empty
24544
24545  if test "x$BOOT_JDK" != x; then
24546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24547
24548  # Input might be given as Windows format, start by converting to
24549  # unix format.
24550  path="$BOOT_JDK"
24551  new_path=`$CYGPATH -u "$path"`
24552
24553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24556  # "foo.exe" is OK but "foo" is an error.
24557  #
24558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24559  # It is also a way to make sure we got the proper file name for the real test later on.
24560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24561  if test "x$test_shortpath" = x; then
24562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24564    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24565  fi
24566
24567  # Call helper function which possibly converts this using DOS-style short mode.
24568  # If so, the updated path is stored in $new_path.
24569
24570  input_path="$new_path"
24571  # Check if we need to convert this using DOS-style short mode. If the path
24572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24573  # take no chances and rewrite it.
24574  # Note: m4 eats our [], so we need to use [ and ] instead.
24575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24576  if test "x$has_forbidden_chars" != x; then
24577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24581      # Going to short mode and back again did indeed matter. Since short mode is
24582      # case insensitive, let's make it lowercase to improve readability.
24583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24584      # Now convert it back to Unix-style (cygpath)
24585      input_path=`$CYGPATH -u "$shortmode_path"`
24586      new_path="$input_path"
24587    fi
24588  fi
24589
24590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24591  if test "x$test_cygdrive_prefix" = x; then
24592    # As a simple fix, exclude /usr/bin since it's not a real path.
24593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24595      # a path prefixed by /cygdrive for fixpath to work.
24596      new_path="$CYGWIN_ROOT_PATH$input_path"
24597    fi
24598  fi
24599
24600
24601  if test "x$path" != "x$new_path"; then
24602    BOOT_JDK="$new_path"
24603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24605  fi
24606
24607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24608
24609  path="$BOOT_JDK"
24610  has_colon=`$ECHO $path | $GREP ^.:`
24611  new_path="$path"
24612  if test "x$has_colon" = x; then
24613    # Not in mixed or Windows style, start by that.
24614    new_path=`cmd //c echo $path`
24615  fi
24616
24617
24618  input_path="$new_path"
24619  # Check if we need to convert this using DOS-style short mode. If the path
24620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24621  # take no chances and rewrite it.
24622  # Note: m4 eats our [], so we need to use [ and ] instead.
24623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24624  if test "x$has_forbidden_chars" != x; then
24625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24627  fi
24628
24629
24630  windows_path="$new_path"
24631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24632    unix_path=`$CYGPATH -u "$windows_path"`
24633    new_path="$unix_path"
24634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24636    new_path="$unix_path"
24637  fi
24638
24639  if test "x$path" != "x$new_path"; then
24640    BOOT_JDK="$new_path"
24641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24643  fi
24644
24645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24647
24648    else
24649      # We're on a unix platform. Hooray! :)
24650      path="$BOOT_JDK"
24651      has_space=`$ECHO "$path" | $GREP " "`
24652      if test "x$has_space" != x; then
24653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24656      fi
24657
24658      # Use eval to expand a potential ~
24659      eval path="$path"
24660      if test ! -f "$path" && test ! -d "$path"; then
24661        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24662      fi
24663
24664      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24665    fi
24666  fi
24667
24668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24669$as_echo_n "checking for Boot JDK... " >&6; }
24670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24671$as_echo "$BOOT_JDK" >&6; }
24672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24673$as_echo_n "checking Boot JDK version... " >&6; }
24674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24676$as_echo "$BOOT_JDK_VERSION" >&6; }
24677          fi # end check jdk version
24678        fi # end check javac
24679      fi # end check java
24680    fi # end check boot jdk found
24681  fi
24682
24683    done
24684  fi
24685
24686
24687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24689      # Do we have a bin/java?
24690      if test ! -x "$BOOT_JDK/bin/java"; then
24691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24693        BOOT_JDK_FOUND=no
24694      else
24695        # Do we have a bin/javac?
24696        if test ! -x "$BOOT_JDK/bin/javac"; then
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24701          BOOT_JDK_FOUND=no
24702        else
24703          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24704          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24705
24706          # Extra M4 quote needed to protect [] in grep expression.
24707          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24708          if test "x$FOUND_CORRECT_VERSION" = x; then
24709            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24711            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24712$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24713            BOOT_JDK_FOUND=no
24714          else
24715            # We're done! :-)
24716            BOOT_JDK_FOUND=yes
24717
24718  # Only process if variable expands to non-empty
24719
24720  if test "x$BOOT_JDK" != x; then
24721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24722
24723  # Input might be given as Windows format, start by converting to
24724  # unix format.
24725  path="$BOOT_JDK"
24726  new_path=`$CYGPATH -u "$path"`
24727
24728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24731  # "foo.exe" is OK but "foo" is an error.
24732  #
24733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24734  # It is also a way to make sure we got the proper file name for the real test later on.
24735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24736  if test "x$test_shortpath" = x; then
24737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24740  fi
24741
24742  # Call helper function which possibly converts this using DOS-style short mode.
24743  # If so, the updated path is stored in $new_path.
24744
24745  input_path="$new_path"
24746  # Check if we need to convert this using DOS-style short mode. If the path
24747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24748  # take no chances and rewrite it.
24749  # Note: m4 eats our [], so we need to use [ and ] instead.
24750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24751  if test "x$has_forbidden_chars" != x; then
24752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24756      # Going to short mode and back again did indeed matter. Since short mode is
24757      # case insensitive, let's make it lowercase to improve readability.
24758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24759      # Now convert it back to Unix-style (cygpath)
24760      input_path=`$CYGPATH -u "$shortmode_path"`
24761      new_path="$input_path"
24762    fi
24763  fi
24764
24765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24766  if test "x$test_cygdrive_prefix" = x; then
24767    # As a simple fix, exclude /usr/bin since it's not a real path.
24768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24770      # a path prefixed by /cygdrive for fixpath to work.
24771      new_path="$CYGWIN_ROOT_PATH$input_path"
24772    fi
24773  fi
24774
24775
24776  if test "x$path" != "x$new_path"; then
24777    BOOT_JDK="$new_path"
24778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24780  fi
24781
24782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24783
24784  path="$BOOT_JDK"
24785  has_colon=`$ECHO $path | $GREP ^.:`
24786  new_path="$path"
24787  if test "x$has_colon" = x; then
24788    # Not in mixed or Windows style, start by that.
24789    new_path=`cmd //c echo $path`
24790  fi
24791
24792
24793  input_path="$new_path"
24794  # Check if we need to convert this using DOS-style short mode. If the path
24795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24796  # take no chances and rewrite it.
24797  # Note: m4 eats our [], so we need to use [ and ] instead.
24798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24799  if test "x$has_forbidden_chars" != x; then
24800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24802  fi
24803
24804
24805  windows_path="$new_path"
24806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24807    unix_path=`$CYGPATH -u "$windows_path"`
24808    new_path="$unix_path"
24809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24811    new_path="$unix_path"
24812  fi
24813
24814  if test "x$path" != "x$new_path"; then
24815    BOOT_JDK="$new_path"
24816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24818  fi
24819
24820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24822
24823    else
24824      # We're on a unix platform. Hooray! :)
24825      path="$BOOT_JDK"
24826      has_space=`$ECHO "$path" | $GREP " "`
24827      if test "x$has_space" != x; then
24828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24831      fi
24832
24833      # Use eval to expand a potential ~
24834      eval path="$path"
24835      if test ! -f "$path" && test ! -d "$path"; then
24836        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24837      fi
24838
24839      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24840    fi
24841  fi
24842
24843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24844$as_echo_n "checking for Boot JDK... " >&6; }
24845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24846$as_echo "$BOOT_JDK" >&6; }
24847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24848$as_echo_n "checking Boot JDK version... " >&6; }
24849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24851$as_echo "$BOOT_JDK_VERSION" >&6; }
24852          fi # end check jdk version
24853        fi # end check javac
24854      fi # end check java
24855    fi # end check boot jdk found
24856  fi
24857
24858  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24859
24860  if test "x$BOOT_JDK_FOUND" = xno; then
24861    # Now execute the test
24862
24863  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24864  BOOT_JDK_SUFFIX="/Contents/Home"
24865  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24866  if test "x$ALL_JDKS_FOUND" != x; then
24867    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24868
24869  if test "x$BOOT_JDK_FOUND" = xno; then
24870    # Now execute the test
24871
24872        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24873        if test -d "$BOOT_JDK"; then
24874          BOOT_JDK_FOUND=maybe
24875          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24876$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24877        fi
24878
24879
24880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24882      # Do we have a bin/java?
24883      if test ! -x "$BOOT_JDK/bin/java"; then
24884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24886        BOOT_JDK_FOUND=no
24887      else
24888        # Do we have a bin/javac?
24889        if test ! -x "$BOOT_JDK/bin/javac"; then
24890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24894          BOOT_JDK_FOUND=no
24895        else
24896          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24897          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24898
24899          # Extra M4 quote needed to protect [] in grep expression.
24900          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24901          if test "x$FOUND_CORRECT_VERSION" = x; then
24902            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24904            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24906            BOOT_JDK_FOUND=no
24907          else
24908            # We're done! :-)
24909            BOOT_JDK_FOUND=yes
24910
24911  # Only process if variable expands to non-empty
24912
24913  if test "x$BOOT_JDK" != x; then
24914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24915
24916  # Input might be given as Windows format, start by converting to
24917  # unix format.
24918  path="$BOOT_JDK"
24919  new_path=`$CYGPATH -u "$path"`
24920
24921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24924  # "foo.exe" is OK but "foo" is an error.
24925  #
24926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24927  # It is also a way to make sure we got the proper file name for the real test later on.
24928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24929  if test "x$test_shortpath" = x; then
24930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24932    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24933  fi
24934
24935  # Call helper function which possibly converts this using DOS-style short mode.
24936  # If so, the updated path is stored in $new_path.
24937
24938  input_path="$new_path"
24939  # Check if we need to convert this using DOS-style short mode. If the path
24940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24941  # take no chances and rewrite it.
24942  # Note: m4 eats our [], so we need to use [ and ] instead.
24943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24944  if test "x$has_forbidden_chars" != x; then
24945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24949      # Going to short mode and back again did indeed matter. Since short mode is
24950      # case insensitive, let's make it lowercase to improve readability.
24951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24952      # Now convert it back to Unix-style (cygpath)
24953      input_path=`$CYGPATH -u "$shortmode_path"`
24954      new_path="$input_path"
24955    fi
24956  fi
24957
24958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24959  if test "x$test_cygdrive_prefix" = x; then
24960    # As a simple fix, exclude /usr/bin since it's not a real path.
24961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24963      # a path prefixed by /cygdrive for fixpath to work.
24964      new_path="$CYGWIN_ROOT_PATH$input_path"
24965    fi
24966  fi
24967
24968
24969  if test "x$path" != "x$new_path"; then
24970    BOOT_JDK="$new_path"
24971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24973  fi
24974
24975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24976
24977  path="$BOOT_JDK"
24978  has_colon=`$ECHO $path | $GREP ^.:`
24979  new_path="$path"
24980  if test "x$has_colon" = x; then
24981    # Not in mixed or Windows style, start by that.
24982    new_path=`cmd //c echo $path`
24983  fi
24984
24985
24986  input_path="$new_path"
24987  # Check if we need to convert this using DOS-style short mode. If the path
24988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24989  # take no chances and rewrite it.
24990  # Note: m4 eats our [], so we need to use [ and ] instead.
24991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24992  if test "x$has_forbidden_chars" != x; then
24993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24995  fi
24996
24997
24998  windows_path="$new_path"
24999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25000    unix_path=`$CYGPATH -u "$windows_path"`
25001    new_path="$unix_path"
25002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25004    new_path="$unix_path"
25005  fi
25006
25007  if test "x$path" != "x$new_path"; then
25008    BOOT_JDK="$new_path"
25009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25011  fi
25012
25013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25015
25016    else
25017      # We're on a unix platform. Hooray! :)
25018      path="$BOOT_JDK"
25019      has_space=`$ECHO "$path" | $GREP " "`
25020      if test "x$has_space" != x; then
25021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25024      fi
25025
25026      # Use eval to expand a potential ~
25027      eval path="$path"
25028      if test ! -f "$path" && test ! -d "$path"; then
25029        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25030      fi
25031
25032      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25033    fi
25034  fi
25035
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25037$as_echo_n "checking for Boot JDK... " >&6; }
25038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25039$as_echo "$BOOT_JDK" >&6; }
25040            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25041$as_echo_n "checking Boot JDK version... " >&6; }
25042            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25044$as_echo "$BOOT_JDK_VERSION" >&6; }
25045          fi # end check jdk version
25046        fi # end check javac
25047      fi # end check java
25048    fi # end check boot jdk found
25049  fi
25050
25051    done
25052  fi
25053
25054
25055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25057      # Do we have a bin/java?
25058      if test ! -x "$BOOT_JDK/bin/java"; then
25059        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25061        BOOT_JDK_FOUND=no
25062      else
25063        # Do we have a bin/javac?
25064        if test ! -x "$BOOT_JDK/bin/javac"; then
25065          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25067          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25069          BOOT_JDK_FOUND=no
25070        else
25071          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25072          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25073
25074          # Extra M4 quote needed to protect [] in grep expression.
25075          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25076          if test "x$FOUND_CORRECT_VERSION" = x; then
25077            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25079            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25080$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25081            BOOT_JDK_FOUND=no
25082          else
25083            # We're done! :-)
25084            BOOT_JDK_FOUND=yes
25085
25086  # Only process if variable expands to non-empty
25087
25088  if test "x$BOOT_JDK" != x; then
25089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25090
25091  # Input might be given as Windows format, start by converting to
25092  # unix format.
25093  path="$BOOT_JDK"
25094  new_path=`$CYGPATH -u "$path"`
25095
25096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25099  # "foo.exe" is OK but "foo" is an error.
25100  #
25101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25102  # It is also a way to make sure we got the proper file name for the real test later on.
25103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25104  if test "x$test_shortpath" = x; then
25105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25108  fi
25109
25110  # Call helper function which possibly converts this using DOS-style short mode.
25111  # If so, the updated path is stored in $new_path.
25112
25113  input_path="$new_path"
25114  # Check if we need to convert this using DOS-style short mode. If the path
25115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25116  # take no chances and rewrite it.
25117  # Note: m4 eats our [], so we need to use [ and ] instead.
25118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25119  if test "x$has_forbidden_chars" != x; then
25120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25124      # Going to short mode and back again did indeed matter. Since short mode is
25125      # case insensitive, let's make it lowercase to improve readability.
25126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25127      # Now convert it back to Unix-style (cygpath)
25128      input_path=`$CYGPATH -u "$shortmode_path"`
25129      new_path="$input_path"
25130    fi
25131  fi
25132
25133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25134  if test "x$test_cygdrive_prefix" = x; then
25135    # As a simple fix, exclude /usr/bin since it's not a real path.
25136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25138      # a path prefixed by /cygdrive for fixpath to work.
25139      new_path="$CYGWIN_ROOT_PATH$input_path"
25140    fi
25141  fi
25142
25143
25144  if test "x$path" != "x$new_path"; then
25145    BOOT_JDK="$new_path"
25146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25148  fi
25149
25150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25151
25152  path="$BOOT_JDK"
25153  has_colon=`$ECHO $path | $GREP ^.:`
25154  new_path="$path"
25155  if test "x$has_colon" = x; then
25156    # Not in mixed or Windows style, start by that.
25157    new_path=`cmd //c echo $path`
25158  fi
25159
25160
25161  input_path="$new_path"
25162  # Check if we need to convert this using DOS-style short mode. If the path
25163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25164  # take no chances and rewrite it.
25165  # Note: m4 eats our [], so we need to use [ and ] instead.
25166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25167  if test "x$has_forbidden_chars" != x; then
25168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25170  fi
25171
25172
25173  windows_path="$new_path"
25174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25175    unix_path=`$CYGPATH -u "$windows_path"`
25176    new_path="$unix_path"
25177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25179    new_path="$unix_path"
25180  fi
25181
25182  if test "x$path" != "x$new_path"; then
25183    BOOT_JDK="$new_path"
25184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25186  fi
25187
25188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25190
25191    else
25192      # We're on a unix platform. Hooray! :)
25193      path="$BOOT_JDK"
25194      has_space=`$ECHO "$path" | $GREP " "`
25195      if test "x$has_space" != x; then
25196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25199      fi
25200
25201      # Use eval to expand a potential ~
25202      eval path="$path"
25203      if test ! -f "$path" && test ! -d "$path"; then
25204        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25205      fi
25206
25207      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25208    fi
25209  fi
25210
25211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25212$as_echo_n "checking for Boot JDK... " >&6; }
25213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25214$as_echo "$BOOT_JDK" >&6; }
25215            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25216$as_echo_n "checking Boot JDK version... " >&6; }
25217            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25219$as_echo "$BOOT_JDK_VERSION" >&6; }
25220          fi # end check jdk version
25221        fi # end check javac
25222      fi # end check java
25223    fi # end check boot jdk found
25224  fi
25225
25226
25227  if test "x$BOOT_JDK_FOUND" = xno; then
25228    # Now execute the test
25229
25230  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25231  BOOT_JDK_SUFFIX="/Contents/Home"
25232  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25233  if test "x$ALL_JDKS_FOUND" != x; then
25234    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25235
25236  if test "x$BOOT_JDK_FOUND" = xno; then
25237    # Now execute the test
25238
25239        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25240        if test -d "$BOOT_JDK"; then
25241          BOOT_JDK_FOUND=maybe
25242          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25243$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25244        fi
25245
25246
25247    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25248    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25249      # Do we have a bin/java?
25250      if test ! -x "$BOOT_JDK/bin/java"; then
25251        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25253        BOOT_JDK_FOUND=no
25254      else
25255        # Do we have a bin/javac?
25256        if test ! -x "$BOOT_JDK/bin/javac"; then
25257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25259          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25260$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25261          BOOT_JDK_FOUND=no
25262        else
25263          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25264          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25265
25266          # Extra M4 quote needed to protect [] in grep expression.
25267          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25268          if test "x$FOUND_CORRECT_VERSION" = x; then
25269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25271            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25272$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25273            BOOT_JDK_FOUND=no
25274          else
25275            # We're done! :-)
25276            BOOT_JDK_FOUND=yes
25277
25278  # Only process if variable expands to non-empty
25279
25280  if test "x$BOOT_JDK" != x; then
25281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25282
25283  # Input might be given as Windows format, start by converting to
25284  # unix format.
25285  path="$BOOT_JDK"
25286  new_path=`$CYGPATH -u "$path"`
25287
25288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25291  # "foo.exe" is OK but "foo" is an error.
25292  #
25293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25294  # It is also a way to make sure we got the proper file name for the real test later on.
25295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25296  if test "x$test_shortpath" = x; then
25297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25299    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25300  fi
25301
25302  # Call helper function which possibly converts this using DOS-style short mode.
25303  # If so, the updated path is stored in $new_path.
25304
25305  input_path="$new_path"
25306  # Check if we need to convert this using DOS-style short mode. If the path
25307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25308  # take no chances and rewrite it.
25309  # Note: m4 eats our [], so we need to use [ and ] instead.
25310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25311  if test "x$has_forbidden_chars" != x; then
25312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25316      # Going to short mode and back again did indeed matter. Since short mode is
25317      # case insensitive, let's make it lowercase to improve readability.
25318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25319      # Now convert it back to Unix-style (cygpath)
25320      input_path=`$CYGPATH -u "$shortmode_path"`
25321      new_path="$input_path"
25322    fi
25323  fi
25324
25325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25326  if test "x$test_cygdrive_prefix" = x; then
25327    # As a simple fix, exclude /usr/bin since it's not a real path.
25328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25330      # a path prefixed by /cygdrive for fixpath to work.
25331      new_path="$CYGWIN_ROOT_PATH$input_path"
25332    fi
25333  fi
25334
25335
25336  if test "x$path" != "x$new_path"; then
25337    BOOT_JDK="$new_path"
25338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25340  fi
25341
25342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25343
25344  path="$BOOT_JDK"
25345  has_colon=`$ECHO $path | $GREP ^.:`
25346  new_path="$path"
25347  if test "x$has_colon" = x; then
25348    # Not in mixed or Windows style, start by that.
25349    new_path=`cmd //c echo $path`
25350  fi
25351
25352
25353  input_path="$new_path"
25354  # Check if we need to convert this using DOS-style short mode. If the path
25355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25356  # take no chances and rewrite it.
25357  # Note: m4 eats our [], so we need to use [ and ] instead.
25358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25359  if test "x$has_forbidden_chars" != x; then
25360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25362  fi
25363
25364
25365  windows_path="$new_path"
25366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25367    unix_path=`$CYGPATH -u "$windows_path"`
25368    new_path="$unix_path"
25369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25371    new_path="$unix_path"
25372  fi
25373
25374  if test "x$path" != "x$new_path"; then
25375    BOOT_JDK="$new_path"
25376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25378  fi
25379
25380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25382
25383    else
25384      # We're on a unix platform. Hooray! :)
25385      path="$BOOT_JDK"
25386      has_space=`$ECHO "$path" | $GREP " "`
25387      if test "x$has_space" != x; then
25388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25391      fi
25392
25393      # Use eval to expand a potential ~
25394      eval path="$path"
25395      if test ! -f "$path" && test ! -d "$path"; then
25396        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25397      fi
25398
25399      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25400    fi
25401  fi
25402
25403            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25404$as_echo_n "checking for Boot JDK... " >&6; }
25405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25406$as_echo "$BOOT_JDK" >&6; }
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25408$as_echo_n "checking Boot JDK version... " >&6; }
25409            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25411$as_echo "$BOOT_JDK_VERSION" >&6; }
25412          fi # end check jdk version
25413        fi # end check javac
25414      fi # end check java
25415    fi # end check boot jdk found
25416  fi
25417
25418    done
25419  fi
25420
25421
25422    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25423    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25424      # Do we have a bin/java?
25425      if test ! -x "$BOOT_JDK/bin/java"; then
25426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25428        BOOT_JDK_FOUND=no
25429      else
25430        # Do we have a bin/javac?
25431        if test ! -x "$BOOT_JDK/bin/javac"; then
25432          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25434          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25435$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25436          BOOT_JDK_FOUND=no
25437        else
25438          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25439          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25440
25441          # Extra M4 quote needed to protect [] in grep expression.
25442          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25443          if test "x$FOUND_CORRECT_VERSION" = x; then
25444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25446            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25447$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25448            BOOT_JDK_FOUND=no
25449          else
25450            # We're done! :-)
25451            BOOT_JDK_FOUND=yes
25452
25453  # Only process if variable expands to non-empty
25454
25455  if test "x$BOOT_JDK" != x; then
25456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25457
25458  # Input might be given as Windows format, start by converting to
25459  # unix format.
25460  path="$BOOT_JDK"
25461  new_path=`$CYGPATH -u "$path"`
25462
25463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25466  # "foo.exe" is OK but "foo" is an error.
25467  #
25468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25469  # It is also a way to make sure we got the proper file name for the real test later on.
25470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25471  if test "x$test_shortpath" = x; then
25472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25474    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25475  fi
25476
25477  # Call helper function which possibly converts this using DOS-style short mode.
25478  # If so, the updated path is stored in $new_path.
25479
25480  input_path="$new_path"
25481  # Check if we need to convert this using DOS-style short mode. If the path
25482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25483  # take no chances and rewrite it.
25484  # Note: m4 eats our [], so we need to use [ and ] instead.
25485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25486  if test "x$has_forbidden_chars" != x; then
25487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25491      # Going to short mode and back again did indeed matter. Since short mode is
25492      # case insensitive, let's make it lowercase to improve readability.
25493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25494      # Now convert it back to Unix-style (cygpath)
25495      input_path=`$CYGPATH -u "$shortmode_path"`
25496      new_path="$input_path"
25497    fi
25498  fi
25499
25500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25501  if test "x$test_cygdrive_prefix" = x; then
25502    # As a simple fix, exclude /usr/bin since it's not a real path.
25503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25505      # a path prefixed by /cygdrive for fixpath to work.
25506      new_path="$CYGWIN_ROOT_PATH$input_path"
25507    fi
25508  fi
25509
25510
25511  if test "x$path" != "x$new_path"; then
25512    BOOT_JDK="$new_path"
25513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25515  fi
25516
25517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25518
25519  path="$BOOT_JDK"
25520  has_colon=`$ECHO $path | $GREP ^.:`
25521  new_path="$path"
25522  if test "x$has_colon" = x; then
25523    # Not in mixed or Windows style, start by that.
25524    new_path=`cmd //c echo $path`
25525  fi
25526
25527
25528  input_path="$new_path"
25529  # Check if we need to convert this using DOS-style short mode. If the path
25530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25531  # take no chances and rewrite it.
25532  # Note: m4 eats our [], so we need to use [ and ] instead.
25533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25534  if test "x$has_forbidden_chars" != x; then
25535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25537  fi
25538
25539
25540  windows_path="$new_path"
25541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25542    unix_path=`$CYGPATH -u "$windows_path"`
25543    new_path="$unix_path"
25544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25546    new_path="$unix_path"
25547  fi
25548
25549  if test "x$path" != "x$new_path"; then
25550    BOOT_JDK="$new_path"
25551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25553  fi
25554
25555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25557
25558    else
25559      # We're on a unix platform. Hooray! :)
25560      path="$BOOT_JDK"
25561      has_space=`$ECHO "$path" | $GREP " "`
25562      if test "x$has_space" != x; then
25563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25566      fi
25567
25568      # Use eval to expand a potential ~
25569      eval path="$path"
25570      if test ! -f "$path" && test ! -d "$path"; then
25571        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25572      fi
25573
25574      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25575    fi
25576  fi
25577
25578            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25579$as_echo_n "checking for Boot JDK... " >&6; }
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25581$as_echo "$BOOT_JDK" >&6; }
25582            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25583$as_echo_n "checking Boot JDK version... " >&6; }
25584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25586$as_echo "$BOOT_JDK_VERSION" >&6; }
25587          fi # end check jdk version
25588        fi # end check javac
25589      fi # end check java
25590    fi # end check boot jdk found
25591  fi
25592
25593  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25594
25595  if test "x$BOOT_JDK_FOUND" = xno; then
25596    # Now execute the test
25597
25598  BOOT_JDK_PREFIX="/usr/lib/jvm"
25599  BOOT_JDK_SUFFIX=""
25600  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25601  if test "x$ALL_JDKS_FOUND" != x; then
25602    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25603
25604  if test "x$BOOT_JDK_FOUND" = xno; then
25605    # Now execute the test
25606
25607        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25608        if test -d "$BOOT_JDK"; then
25609          BOOT_JDK_FOUND=maybe
25610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25611$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25612        fi
25613
25614
25615    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25616    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25617      # Do we have a bin/java?
25618      if test ! -x "$BOOT_JDK/bin/java"; then
25619        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25621        BOOT_JDK_FOUND=no
25622      else
25623        # Do we have a bin/javac?
25624        if test ! -x "$BOOT_JDK/bin/javac"; then
25625          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25627          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25628$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25629          BOOT_JDK_FOUND=no
25630        else
25631          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25632          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25633
25634          # Extra M4 quote needed to protect [] in grep expression.
25635          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25636          if test "x$FOUND_CORRECT_VERSION" = x; then
25637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25639            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25640$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25641            BOOT_JDK_FOUND=no
25642          else
25643            # We're done! :-)
25644            BOOT_JDK_FOUND=yes
25645
25646  # Only process if variable expands to non-empty
25647
25648  if test "x$BOOT_JDK" != x; then
25649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25650
25651  # Input might be given as Windows format, start by converting to
25652  # unix format.
25653  path="$BOOT_JDK"
25654  new_path=`$CYGPATH -u "$path"`
25655
25656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25659  # "foo.exe" is OK but "foo" is an error.
25660  #
25661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25662  # It is also a way to make sure we got the proper file name for the real test later on.
25663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25664  if test "x$test_shortpath" = x; then
25665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25668  fi
25669
25670  # Call helper function which possibly converts this using DOS-style short mode.
25671  # If so, the updated path is stored in $new_path.
25672
25673  input_path="$new_path"
25674  # Check if we need to convert this using DOS-style short mode. If the path
25675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25676  # take no chances and rewrite it.
25677  # Note: m4 eats our [], so we need to use [ and ] instead.
25678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25679  if test "x$has_forbidden_chars" != x; then
25680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25684      # Going to short mode and back again did indeed matter. Since short mode is
25685      # case insensitive, let's make it lowercase to improve readability.
25686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25687      # Now convert it back to Unix-style (cygpath)
25688      input_path=`$CYGPATH -u "$shortmode_path"`
25689      new_path="$input_path"
25690    fi
25691  fi
25692
25693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25694  if test "x$test_cygdrive_prefix" = x; then
25695    # As a simple fix, exclude /usr/bin since it's not a real path.
25696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25698      # a path prefixed by /cygdrive for fixpath to work.
25699      new_path="$CYGWIN_ROOT_PATH$input_path"
25700    fi
25701  fi
25702
25703
25704  if test "x$path" != "x$new_path"; then
25705    BOOT_JDK="$new_path"
25706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25708  fi
25709
25710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25711
25712  path="$BOOT_JDK"
25713  has_colon=`$ECHO $path | $GREP ^.:`
25714  new_path="$path"
25715  if test "x$has_colon" = x; then
25716    # Not in mixed or Windows style, start by that.
25717    new_path=`cmd //c echo $path`
25718  fi
25719
25720
25721  input_path="$new_path"
25722  # Check if we need to convert this using DOS-style short mode. If the path
25723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25724  # take no chances and rewrite it.
25725  # Note: m4 eats our [], so we need to use [ and ] instead.
25726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25727  if test "x$has_forbidden_chars" != x; then
25728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25730  fi
25731
25732
25733  windows_path="$new_path"
25734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25735    unix_path=`$CYGPATH -u "$windows_path"`
25736    new_path="$unix_path"
25737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25739    new_path="$unix_path"
25740  fi
25741
25742  if test "x$path" != "x$new_path"; then
25743    BOOT_JDK="$new_path"
25744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25746  fi
25747
25748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25750
25751    else
25752      # We're on a unix platform. Hooray! :)
25753      path="$BOOT_JDK"
25754      has_space=`$ECHO "$path" | $GREP " "`
25755      if test "x$has_space" != x; then
25756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25759      fi
25760
25761      # Use eval to expand a potential ~
25762      eval path="$path"
25763      if test ! -f "$path" && test ! -d "$path"; then
25764        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25765      fi
25766
25767      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25768    fi
25769  fi
25770
25771            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25772$as_echo_n "checking for Boot JDK... " >&6; }
25773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25774$as_echo "$BOOT_JDK" >&6; }
25775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25776$as_echo_n "checking Boot JDK version... " >&6; }
25777            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25779$as_echo "$BOOT_JDK_VERSION" >&6; }
25780          fi # end check jdk version
25781        fi # end check javac
25782      fi # end check java
25783    fi # end check boot jdk found
25784  fi
25785
25786    done
25787  fi
25788
25789
25790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25792      # Do we have a bin/java?
25793      if test ! -x "$BOOT_JDK/bin/java"; then
25794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25796        BOOT_JDK_FOUND=no
25797      else
25798        # Do we have a bin/javac?
25799        if test ! -x "$BOOT_JDK/bin/javac"; then
25800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25804          BOOT_JDK_FOUND=no
25805        else
25806          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25807          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25808
25809          # Extra M4 quote needed to protect [] in grep expression.
25810          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25811          if test "x$FOUND_CORRECT_VERSION" = x; then
25812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25814            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25815$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25816            BOOT_JDK_FOUND=no
25817          else
25818            # We're done! :-)
25819            BOOT_JDK_FOUND=yes
25820
25821  # Only process if variable expands to non-empty
25822
25823  if test "x$BOOT_JDK" != x; then
25824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25825
25826  # Input might be given as Windows format, start by converting to
25827  # unix format.
25828  path="$BOOT_JDK"
25829  new_path=`$CYGPATH -u "$path"`
25830
25831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25834  # "foo.exe" is OK but "foo" is an error.
25835  #
25836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25837  # It is also a way to make sure we got the proper file name for the real test later on.
25838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25839  if test "x$test_shortpath" = x; then
25840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25843  fi
25844
25845  # Call helper function which possibly converts this using DOS-style short mode.
25846  # If so, the updated path is stored in $new_path.
25847
25848  input_path="$new_path"
25849  # Check if we need to convert this using DOS-style short mode. If the path
25850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25851  # take no chances and rewrite it.
25852  # Note: m4 eats our [], so we need to use [ and ] instead.
25853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25854  if test "x$has_forbidden_chars" != x; then
25855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25859      # Going to short mode and back again did indeed matter. Since short mode is
25860      # case insensitive, let's make it lowercase to improve readability.
25861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25862      # Now convert it back to Unix-style (cygpath)
25863      input_path=`$CYGPATH -u "$shortmode_path"`
25864      new_path="$input_path"
25865    fi
25866  fi
25867
25868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25869  if test "x$test_cygdrive_prefix" = x; then
25870    # As a simple fix, exclude /usr/bin since it's not a real path.
25871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25873      # a path prefixed by /cygdrive for fixpath to work.
25874      new_path="$CYGWIN_ROOT_PATH$input_path"
25875    fi
25876  fi
25877
25878
25879  if test "x$path" != "x$new_path"; then
25880    BOOT_JDK="$new_path"
25881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25883  fi
25884
25885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25886
25887  path="$BOOT_JDK"
25888  has_colon=`$ECHO $path | $GREP ^.:`
25889  new_path="$path"
25890  if test "x$has_colon" = x; then
25891    # Not in mixed or Windows style, start by that.
25892    new_path=`cmd //c echo $path`
25893  fi
25894
25895
25896  input_path="$new_path"
25897  # Check if we need to convert this using DOS-style short mode. If the path
25898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25899  # take no chances and rewrite it.
25900  # Note: m4 eats our [], so we need to use [ and ] instead.
25901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25902  if test "x$has_forbidden_chars" != x; then
25903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25905  fi
25906
25907
25908  windows_path="$new_path"
25909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25910    unix_path=`$CYGPATH -u "$windows_path"`
25911    new_path="$unix_path"
25912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25914    new_path="$unix_path"
25915  fi
25916
25917  if test "x$path" != "x$new_path"; then
25918    BOOT_JDK="$new_path"
25919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25921  fi
25922
25923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25925
25926    else
25927      # We're on a unix platform. Hooray! :)
25928      path="$BOOT_JDK"
25929      has_space=`$ECHO "$path" | $GREP " "`
25930      if test "x$has_space" != x; then
25931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25934      fi
25935
25936      # Use eval to expand a potential ~
25937      eval path="$path"
25938      if test ! -f "$path" && test ! -d "$path"; then
25939        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25940      fi
25941
25942      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25943    fi
25944  fi
25945
25946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25947$as_echo_n "checking for Boot JDK... " >&6; }
25948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25949$as_echo "$BOOT_JDK" >&6; }
25950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25951$as_echo_n "checking Boot JDK version... " >&6; }
25952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25954$as_echo "$BOOT_JDK_VERSION" >&6; }
25955          fi # end check jdk version
25956        fi # end check javac
25957      fi # end check java
25958    fi # end check boot jdk found
25959  fi
25960
25961  fi
25962
25963
25964    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25965    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25966      # Do we have a bin/java?
25967      if test ! -x "$BOOT_JDK/bin/java"; then
25968        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25970        BOOT_JDK_FOUND=no
25971      else
25972        # Do we have a bin/javac?
25973        if test ! -x "$BOOT_JDK/bin/javac"; then
25974          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25976          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25977$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25978          BOOT_JDK_FOUND=no
25979        else
25980          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25981          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25982
25983          # Extra M4 quote needed to protect [] in grep expression.
25984          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25985          if test "x$FOUND_CORRECT_VERSION" = x; then
25986            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25988            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25989$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25990            BOOT_JDK_FOUND=no
25991          else
25992            # We're done! :-)
25993            BOOT_JDK_FOUND=yes
25994
25995  # Only process if variable expands to non-empty
25996
25997  if test "x$BOOT_JDK" != x; then
25998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25999
26000  # Input might be given as Windows format, start by converting to
26001  # unix format.
26002  path="$BOOT_JDK"
26003  new_path=`$CYGPATH -u "$path"`
26004
26005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26008  # "foo.exe" is OK but "foo" is an error.
26009  #
26010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26011  # It is also a way to make sure we got the proper file name for the real test later on.
26012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26013  if test "x$test_shortpath" = x; then
26014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26016    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26017  fi
26018
26019  # Call helper function which possibly converts this using DOS-style short mode.
26020  # If so, the updated path is stored in $new_path.
26021
26022  input_path="$new_path"
26023  # Check if we need to convert this using DOS-style short mode. If the path
26024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26025  # take no chances and rewrite it.
26026  # Note: m4 eats our [], so we need to use [ and ] instead.
26027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26028  if test "x$has_forbidden_chars" != x; then
26029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26033      # Going to short mode and back again did indeed matter. Since short mode is
26034      # case insensitive, let's make it lowercase to improve readability.
26035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26036      # Now convert it back to Unix-style (cygpath)
26037      input_path=`$CYGPATH -u "$shortmode_path"`
26038      new_path="$input_path"
26039    fi
26040  fi
26041
26042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26043  if test "x$test_cygdrive_prefix" = x; then
26044    # As a simple fix, exclude /usr/bin since it's not a real path.
26045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26047      # a path prefixed by /cygdrive for fixpath to work.
26048      new_path="$CYGWIN_ROOT_PATH$input_path"
26049    fi
26050  fi
26051
26052
26053  if test "x$path" != "x$new_path"; then
26054    BOOT_JDK="$new_path"
26055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26056$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26057  fi
26058
26059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26060
26061  path="$BOOT_JDK"
26062  has_colon=`$ECHO $path | $GREP ^.:`
26063  new_path="$path"
26064  if test "x$has_colon" = x; then
26065    # Not in mixed or Windows style, start by that.
26066    new_path=`cmd //c echo $path`
26067  fi
26068
26069
26070  input_path="$new_path"
26071  # Check if we need to convert this using DOS-style short mode. If the path
26072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26073  # take no chances and rewrite it.
26074  # Note: m4 eats our [], so we need to use [ and ] instead.
26075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26076  if test "x$has_forbidden_chars" != x; then
26077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26079  fi
26080
26081
26082  windows_path="$new_path"
26083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26084    unix_path=`$CYGPATH -u "$windows_path"`
26085    new_path="$unix_path"
26086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26088    new_path="$unix_path"
26089  fi
26090
26091  if test "x$path" != "x$new_path"; then
26092    BOOT_JDK="$new_path"
26093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26095  fi
26096
26097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26099
26100    else
26101      # We're on a unix platform. Hooray! :)
26102      path="$BOOT_JDK"
26103      has_space=`$ECHO "$path" | $GREP " "`
26104      if test "x$has_space" != x; then
26105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26108      fi
26109
26110      # Use eval to expand a potential ~
26111      eval path="$path"
26112      if test ! -f "$path" && test ! -d "$path"; then
26113        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26114      fi
26115
26116      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26117    fi
26118  fi
26119
26120            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26121$as_echo_n "checking for Boot JDK... " >&6; }
26122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26123$as_echo "$BOOT_JDK" >&6; }
26124            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26125$as_echo_n "checking Boot JDK version... " >&6; }
26126            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26128$as_echo "$BOOT_JDK_VERSION" >&6; }
26129          fi # end check jdk version
26130        fi # end check javac
26131      fi # end check java
26132    fi # end check boot jdk found
26133  fi
26134
26135
26136  # If we haven't found anything yet, we've truly lost. Give up.
26137  if test "x$BOOT_JDK_FOUND" = xno; then
26138
26139  # Print a helpful message on how to acquire the necessary build dependency.
26140  # openjdk is the help tag: freetype, cups, pulse, alsa etc
26141  MISSING_DEPENDENCY=openjdk
26142
26143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26144    cygwin_help $MISSING_DEPENDENCY
26145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26146    msys_help $MISSING_DEPENDENCY
26147  else
26148    PKGHANDLER_COMMAND=
26149
26150    case $PKGHANDLER in
26151      apt-get)
26152        apt_help     $MISSING_DEPENDENCY ;;
26153      yum)
26154        yum_help     $MISSING_DEPENDENCY ;;
26155      port)
26156        port_help    $MISSING_DEPENDENCY ;;
26157      pkgutil)
26158        pkgutil_help $MISSING_DEPENDENCY ;;
26159      pkgadd)
26160        pkgadd_help  $MISSING_DEPENDENCY ;;
26161    esac
26162
26163    if test "x$PKGHANDLER_COMMAND" != x; then
26164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26165    fi
26166  fi
26167
26168    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
26169$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
26170    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
26171$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26172    as_fn_error $? "Cannot continue" "$LINENO" 5
26173  fi
26174
26175
26176
26177  # Setup tools from the Boot JDK.
26178
26179  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26180
26181  # Publish this variable in the help.
26182
26183
26184  if test "x$JAVA" = x; then
26185    # The variable is not set by user, try to locate tool using the code snippet
26186
26187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26188$as_echo_n "checking for java in Boot JDK... " >&6; }
26189      JAVA=$BOOT_JDK/bin/java
26190      if test ! -x $JAVA; then
26191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26192$as_echo "not found" >&6; }
26193        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26194$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26195        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26196      fi
26197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26198$as_echo "ok" >&6; }
26199
26200
26201  else
26202    # The variable is set, but is it from the command line or the environment?
26203
26204    # Try to remove the string !JAVA! from our list.
26205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26207      # If it failed, the variable was not from the command line. Ignore it,
26208      # but warn the user (except for BASH, which is always set by the calling BASH).
26209      if test "xJAVA" != xBASH; then
26210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26211$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26212      fi
26213      # Try to locate tool using the code snippet
26214
26215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26216$as_echo_n "checking for java in Boot JDK... " >&6; }
26217      JAVA=$BOOT_JDK/bin/java
26218      if test ! -x $JAVA; then
26219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26220$as_echo "not found" >&6; }
26221        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26222$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26223        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26224      fi
26225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26226$as_echo "ok" >&6; }
26227
26228
26229    else
26230      # If it succeeded, then it was overridden by the user. We will use it
26231      # for the tool.
26232
26233      # First remove it from the list of overridden variables, so we can test
26234      # for unknown variables in the end.
26235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26236
26237      # Check if the provided tool contains a complete path.
26238      tool_specified="$JAVA"
26239      tool_basename="${tool_specified##*/}"
26240      if test "x$tool_basename" = "x$tool_specified"; then
26241        # A command without a complete path is provided, search $PATH.
26242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26243$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26244        # Extract the first word of "$tool_basename", so it can be a program name with args.
26245set dummy $tool_basename; ac_word=$2
26246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26247$as_echo_n "checking for $ac_word... " >&6; }
26248if ${ac_cv_path_JAVA+:} false; then :
26249  $as_echo_n "(cached) " >&6
26250else
26251  case $JAVA in
26252  [\\/]* | ?:[\\/]*)
26253  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26254  ;;
26255  *)
26256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26257for as_dir in $PATH
26258do
26259  IFS=$as_save_IFS
26260  test -z "$as_dir" && as_dir=.
26261    for ac_exec_ext in '' $ac_executable_extensions; do
26262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26263    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26265    break 2
26266  fi
26267done
26268  done
26269IFS=$as_save_IFS
26270
26271  ;;
26272esac
26273fi
26274JAVA=$ac_cv_path_JAVA
26275if test -n "$JAVA"; then
26276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26277$as_echo "$JAVA" >&6; }
26278else
26279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26280$as_echo "no" >&6; }
26281fi
26282
26283
26284        if test "x$JAVA" = x; then
26285          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26286        fi
26287      else
26288        # Otherwise we believe it is a complete path. Use it as it is.
26289        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26290$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26292$as_echo_n "checking for JAVA... " >&6; }
26293        if test ! -x "$tool_specified"; then
26294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26295$as_echo "not found" >&6; }
26296          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26297        fi
26298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26299$as_echo "$tool_specified" >&6; }
26300      fi
26301    fi
26302  fi
26303
26304
26305
26306  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26307
26308  # Publish this variable in the help.
26309
26310
26311  if test "x$JAVAC" = x; then
26312    # The variable is not set by user, try to locate tool using the code snippet
26313
26314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26315$as_echo_n "checking for javac in Boot JDK... " >&6; }
26316      JAVAC=$BOOT_JDK/bin/javac
26317      if test ! -x $JAVAC; then
26318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26319$as_echo "not found" >&6; }
26320        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26321$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26322        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26323      fi
26324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26325$as_echo "ok" >&6; }
26326
26327
26328  else
26329    # The variable is set, but is it from the command line or the environment?
26330
26331    # Try to remove the string !JAVAC! from our list.
26332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26334      # If it failed, the variable was not from the command line. Ignore it,
26335      # but warn the user (except for BASH, which is always set by the calling BASH).
26336      if test "xJAVAC" != xBASH; then
26337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26338$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26339      fi
26340      # Try to locate tool using the code snippet
26341
26342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26343$as_echo_n "checking for javac in Boot JDK... " >&6; }
26344      JAVAC=$BOOT_JDK/bin/javac
26345      if test ! -x $JAVAC; then
26346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26347$as_echo "not found" >&6; }
26348        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26349$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26350        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26351      fi
26352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26353$as_echo "ok" >&6; }
26354
26355
26356    else
26357      # If it succeeded, then it was overridden by the user. We will use it
26358      # for the tool.
26359
26360      # First remove it from the list of overridden variables, so we can test
26361      # for unknown variables in the end.
26362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26363
26364      # Check if the provided tool contains a complete path.
26365      tool_specified="$JAVAC"
26366      tool_basename="${tool_specified##*/}"
26367      if test "x$tool_basename" = "x$tool_specified"; then
26368        # A command without a complete path is provided, search $PATH.
26369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26370$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26371        # Extract the first word of "$tool_basename", so it can be a program name with args.
26372set dummy $tool_basename; ac_word=$2
26373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26374$as_echo_n "checking for $ac_word... " >&6; }
26375if ${ac_cv_path_JAVAC+:} false; then :
26376  $as_echo_n "(cached) " >&6
26377else
26378  case $JAVAC in
26379  [\\/]* | ?:[\\/]*)
26380  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26381  ;;
26382  *)
26383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26384for as_dir in $PATH
26385do
26386  IFS=$as_save_IFS
26387  test -z "$as_dir" && as_dir=.
26388    for ac_exec_ext in '' $ac_executable_extensions; do
26389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26390    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26392    break 2
26393  fi
26394done
26395  done
26396IFS=$as_save_IFS
26397
26398  ;;
26399esac
26400fi
26401JAVAC=$ac_cv_path_JAVAC
26402if test -n "$JAVAC"; then
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26404$as_echo "$JAVAC" >&6; }
26405else
26406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26407$as_echo "no" >&6; }
26408fi
26409
26410
26411        if test "x$JAVAC" = x; then
26412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26413        fi
26414      else
26415        # Otherwise we believe it is a complete path. Use it as it is.
26416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26417$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26419$as_echo_n "checking for JAVAC... " >&6; }
26420        if test ! -x "$tool_specified"; then
26421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26422$as_echo "not found" >&6; }
26423          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26424        fi
26425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26426$as_echo "$tool_specified" >&6; }
26427      fi
26428    fi
26429  fi
26430
26431
26432
26433  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26434
26435  # Publish this variable in the help.
26436
26437
26438  if test "x$JAVAH" = x; then
26439    # The variable is not set by user, try to locate tool using the code snippet
26440
26441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26442$as_echo_n "checking for javah in Boot JDK... " >&6; }
26443      JAVAH=$BOOT_JDK/bin/javah
26444      if test ! -x $JAVAH; then
26445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26446$as_echo "not found" >&6; }
26447        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26448$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26449        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26450      fi
26451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26452$as_echo "ok" >&6; }
26453
26454
26455  else
26456    # The variable is set, but is it from the command line or the environment?
26457
26458    # Try to remove the string !JAVAH! from our list.
26459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26461      # If it failed, the variable was not from the command line. Ignore it,
26462      # but warn the user (except for BASH, which is always set by the calling BASH).
26463      if test "xJAVAH" != xBASH; then
26464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26465$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26466      fi
26467      # Try to locate tool using the code snippet
26468
26469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26470$as_echo_n "checking for javah in Boot JDK... " >&6; }
26471      JAVAH=$BOOT_JDK/bin/javah
26472      if test ! -x $JAVAH; then
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26474$as_echo "not found" >&6; }
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26476$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26477        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26478      fi
26479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26480$as_echo "ok" >&6; }
26481
26482
26483    else
26484      # If it succeeded, then it was overridden by the user. We will use it
26485      # for the tool.
26486
26487      # First remove it from the list of overridden variables, so we can test
26488      # for unknown variables in the end.
26489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26490
26491      # Check if the provided tool contains a complete path.
26492      tool_specified="$JAVAH"
26493      tool_basename="${tool_specified##*/}"
26494      if test "x$tool_basename" = "x$tool_specified"; then
26495        # A command without a complete path is provided, search $PATH.
26496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26497$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26498        # Extract the first word of "$tool_basename", so it can be a program name with args.
26499set dummy $tool_basename; ac_word=$2
26500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26501$as_echo_n "checking for $ac_word... " >&6; }
26502if ${ac_cv_path_JAVAH+:} false; then :
26503  $as_echo_n "(cached) " >&6
26504else
26505  case $JAVAH in
26506  [\\/]* | ?:[\\/]*)
26507  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26508  ;;
26509  *)
26510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26511for as_dir in $PATH
26512do
26513  IFS=$as_save_IFS
26514  test -z "$as_dir" && as_dir=.
26515    for ac_exec_ext in '' $ac_executable_extensions; do
26516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26517    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26519    break 2
26520  fi
26521done
26522  done
26523IFS=$as_save_IFS
26524
26525  ;;
26526esac
26527fi
26528JAVAH=$ac_cv_path_JAVAH
26529if test -n "$JAVAH"; then
26530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26531$as_echo "$JAVAH" >&6; }
26532else
26533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26534$as_echo "no" >&6; }
26535fi
26536
26537
26538        if test "x$JAVAH" = x; then
26539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26540        fi
26541      else
26542        # Otherwise we believe it is a complete path. Use it as it is.
26543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26544$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26546$as_echo_n "checking for JAVAH... " >&6; }
26547        if test ! -x "$tool_specified"; then
26548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26549$as_echo "not found" >&6; }
26550          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26551        fi
26552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26553$as_echo "$tool_specified" >&6; }
26554      fi
26555    fi
26556  fi
26557
26558
26559
26560  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26561
26562  # Publish this variable in the help.
26563
26564
26565  if test "x$JAR" = x; then
26566    # The variable is not set by user, try to locate tool using the code snippet
26567
26568      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26569$as_echo_n "checking for jar in Boot JDK... " >&6; }
26570      JAR=$BOOT_JDK/bin/jar
26571      if test ! -x $JAR; then
26572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26573$as_echo "not found" >&6; }
26574        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26575$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26576        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26577      fi
26578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26579$as_echo "ok" >&6; }
26580
26581
26582  else
26583    # The variable is set, but is it from the command line or the environment?
26584
26585    # Try to remove the string !JAR! from our list.
26586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26588      # If it failed, the variable was not from the command line. Ignore it,
26589      # but warn the user (except for BASH, which is always set by the calling BASH).
26590      if test "xJAR" != xBASH; then
26591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26592$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26593      fi
26594      # Try to locate tool using the code snippet
26595
26596      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26597$as_echo_n "checking for jar in Boot JDK... " >&6; }
26598      JAR=$BOOT_JDK/bin/jar
26599      if test ! -x $JAR; then
26600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26601$as_echo "not found" >&6; }
26602        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26603$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26604        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26605      fi
26606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26607$as_echo "ok" >&6; }
26608
26609
26610    else
26611      # If it succeeded, then it was overridden by the user. We will use it
26612      # for the tool.
26613
26614      # First remove it from the list of overridden variables, so we can test
26615      # for unknown variables in the end.
26616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26617
26618      # Check if the provided tool contains a complete path.
26619      tool_specified="$JAR"
26620      tool_basename="${tool_specified##*/}"
26621      if test "x$tool_basename" = "x$tool_specified"; then
26622        # A command without a complete path is provided, search $PATH.
26623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26624$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26625        # Extract the first word of "$tool_basename", so it can be a program name with args.
26626set dummy $tool_basename; ac_word=$2
26627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26628$as_echo_n "checking for $ac_word... " >&6; }
26629if ${ac_cv_path_JAR+:} false; then :
26630  $as_echo_n "(cached) " >&6
26631else
26632  case $JAR in
26633  [\\/]* | ?:[\\/]*)
26634  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26635  ;;
26636  *)
26637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26638for as_dir in $PATH
26639do
26640  IFS=$as_save_IFS
26641  test -z "$as_dir" && as_dir=.
26642    for ac_exec_ext in '' $ac_executable_extensions; do
26643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26644    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26646    break 2
26647  fi
26648done
26649  done
26650IFS=$as_save_IFS
26651
26652  ;;
26653esac
26654fi
26655JAR=$ac_cv_path_JAR
26656if test -n "$JAR"; then
26657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26658$as_echo "$JAR" >&6; }
26659else
26660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26661$as_echo "no" >&6; }
26662fi
26663
26664
26665        if test "x$JAR" = x; then
26666          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26667        fi
26668      else
26669        # Otherwise we believe it is a complete path. Use it as it is.
26670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26671$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26673$as_echo_n "checking for JAR... " >&6; }
26674        if test ! -x "$tool_specified"; then
26675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26676$as_echo "not found" >&6; }
26677          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26678        fi
26679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26680$as_echo "$tool_specified" >&6; }
26681      fi
26682    fi
26683  fi
26684
26685
26686
26687  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26688
26689  # Publish this variable in the help.
26690
26691
26692  if test "x$JARSIGNER" = x; then
26693    # The variable is not set by user, try to locate tool using the code snippet
26694
26695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26696$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26697      JARSIGNER=$BOOT_JDK/bin/jarsigner
26698      if test ! -x $JARSIGNER; then
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26700$as_echo "not found" >&6; }
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26702$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26703        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26704      fi
26705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26706$as_echo "ok" >&6; }
26707
26708
26709  else
26710    # The variable is set, but is it from the command line or the environment?
26711
26712    # Try to remove the string !JARSIGNER! from our list.
26713    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26714    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26715      # If it failed, the variable was not from the command line. Ignore it,
26716      # but warn the user (except for BASH, which is always set by the calling BASH).
26717      if test "xJARSIGNER" != xBASH; then
26718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26719$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26720      fi
26721      # Try to locate tool using the code snippet
26722
26723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26724$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26725      JARSIGNER=$BOOT_JDK/bin/jarsigner
26726      if test ! -x $JARSIGNER; then
26727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26728$as_echo "not found" >&6; }
26729        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26730$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26731        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26732      fi
26733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26734$as_echo "ok" >&6; }
26735
26736
26737    else
26738      # If it succeeded, then it was overridden by the user. We will use it
26739      # for the tool.
26740
26741      # First remove it from the list of overridden variables, so we can test
26742      # for unknown variables in the end.
26743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26744
26745      # Check if the provided tool contains a complete path.
26746      tool_specified="$JARSIGNER"
26747      tool_basename="${tool_specified##*/}"
26748      if test "x$tool_basename" = "x$tool_specified"; then
26749        # A command without a complete path is provided, search $PATH.
26750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26751$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26752        # Extract the first word of "$tool_basename", so it can be a program name with args.
26753set dummy $tool_basename; ac_word=$2
26754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26755$as_echo_n "checking for $ac_word... " >&6; }
26756if ${ac_cv_path_JARSIGNER+:} false; then :
26757  $as_echo_n "(cached) " >&6
26758else
26759  case $JARSIGNER in
26760  [\\/]* | ?:[\\/]*)
26761  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26762  ;;
26763  *)
26764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26765for as_dir in $PATH
26766do
26767  IFS=$as_save_IFS
26768  test -z "$as_dir" && as_dir=.
26769    for ac_exec_ext in '' $ac_executable_extensions; do
26770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26771    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26773    break 2
26774  fi
26775done
26776  done
26777IFS=$as_save_IFS
26778
26779  ;;
26780esac
26781fi
26782JARSIGNER=$ac_cv_path_JARSIGNER
26783if test -n "$JARSIGNER"; then
26784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26785$as_echo "$JARSIGNER" >&6; }
26786else
26787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26788$as_echo "no" >&6; }
26789fi
26790
26791
26792        if test "x$JARSIGNER" = x; then
26793          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26794        fi
26795      else
26796        # Otherwise we believe it is a complete path. Use it as it is.
26797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26798$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26800$as_echo_n "checking for JARSIGNER... " >&6; }
26801        if test ! -x "$tool_specified"; then
26802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26803$as_echo "not found" >&6; }
26804          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26805        fi
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26807$as_echo "$tool_specified" >&6; }
26808      fi
26809    fi
26810  fi
26811
26812
26813
26814  # Finally, set some other options...
26815
26816  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26817  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26818
26819
26820
26821
26822###############################################################################
26823#
26824# Configure the sources to use. We can add or override individual directories.
26825#
26826###############################################################################
26827
26828
26829  # Where are the sources. Any of these can be overridden
26830  # using --with-override-corba and the likes.
26831  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26832  CORBA_TOPDIR="$SRC_ROOT/corba"
26833  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26834  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26835  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26836  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26837  JDK_TOPDIR="$SRC_ROOT/jdk"
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848  ###############################################################################
26849  #
26850  # Pickup additional source for a component from outside of the source root
26851  # or override source for a component.
26852  #
26853
26854# Check whether --with-add-source-root was given.
26855if test "${with_add_source_root+set}" = set; then :
26856  withval=$with_add_source_root;
26857fi
26858
26859
26860
26861# Check whether --with-override-source-root was given.
26862if test "${with_override_source_root+set}" = set; then :
26863  withval=$with_override_source_root;
26864fi
26865
26866
26867
26868# Check whether --with-adds-and-overrides was given.
26869if test "${with_adds_and_overrides+set}" = set; then :
26870  withval=$with_adds_and_overrides;
26871fi
26872
26873
26874  if test "x$with_adds_and_overrides" != x; then
26875    with_add_source_root="$with_adds_and_overrides/adds"
26876    with_override_source_root="$with_adds_and_overrides/overrides"
26877  fi
26878
26879  if test "x$with_add_source_root" != x; then
26880    if ! test -d $with_add_source_root; then
26881      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26882    fi
26883    CURDIR="$PWD"
26884    cd "$with_add_source_root"
26885    ADD_SRC_ROOT="`pwd`"
26886    cd "$CURDIR"
26887    # Verify that the addon source root does not have any root makefiles.
26888    # If it does, then it is usually an error, prevent this.
26889    if test -f $with_add_source_root/langtools/make/Makefile; then
26890      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
26891    fi
26892    if test -f $with_add_source_root/corba/make/Makefile; then
26893      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
26894    fi
26895    if test -f $with_add_source_root/jaxp/make/Makefile; then
26896      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
26897    fi
26898    if test -f $with_add_source_root/jaxws/make/Makefile; then
26899      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
26900    fi
26901    if test -f $with_add_source_root/hotspot/make/Makefile; then
26902      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
26903    fi
26904    if test -f $with_add_source_root/nashorn/make/Makefile; then
26905      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
26906    fi
26907    if test -f $with_add_source_root/jdk/make/Makefile; then
26908      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
26909    fi
26910  fi
26911
26912
26913  if test "x$with_override_source_root" != x; then
26914    if ! test -d $with_override_source_root; then
26915      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26916    fi
26917    CURDIR="$PWD"
26918    cd "$with_override_source_root"
26919    OVERRIDE_SRC_ROOT="`pwd`"
26920    cd "$CURDIR"
26921    if test -f $with_override_source_root/langtools/make/Makefile; then
26922      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
26923    fi
26924    if test -f $with_override_source_root/corba/make/Makefile; then
26925      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
26926    fi
26927    if test -f $with_override_source_root/jaxp/make/Makefile; then
26928      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
26929    fi
26930    if test -f $with_override_source_root/jaxws/make/Makefile; then
26931      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
26932    fi
26933    if test -f $with_override_source_root/hotspot/make/Makefile; then
26934      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
26935    fi
26936    if test -f $with_override_source_root/nashorn/make/Makefile; then
26937      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
26938    fi
26939    if test -f $with_override_source_root/jdk/make/Makefile; then
26940      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
26941    fi
26942  fi
26943
26944
26945  ###############################################################################
26946  #
26947  # Override a repo completely, this is used for example when you have 3 small
26948  # development sandboxes of the langtools sources and want to avoid having 3 full
26949  # OpenJDK sources checked out on disk.
26950  #
26951  # Assuming that the 3 langtools sandboxes are located here:
26952  # /home/fredrik/sandbox1/langtools
26953  # /home/fredrik/sandbox2/langtools
26954  # /home/fredrik/sandbox3/langtools
26955  #
26956  # From the source root you create build subdirs manually:
26957  #     mkdir -p build1 build2 build3
26958  # in each build directory run:
26959  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26960  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26961  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26962  #
26963
26964
26965# Check whether --with-override-langtools was given.
26966if test "${with_override_langtools+set}" = set; then :
26967  withval=$with_override_langtools;
26968fi
26969
26970
26971
26972# Check whether --with-override-corba was given.
26973if test "${with_override_corba+set}" = set; then :
26974  withval=$with_override_corba;
26975fi
26976
26977
26978
26979# Check whether --with-override-jaxp was given.
26980if test "${with_override_jaxp+set}" = set; then :
26981  withval=$with_override_jaxp;
26982fi
26983
26984
26985
26986# Check whether --with-override-jaxws was given.
26987if test "${with_override_jaxws+set}" = set; then :
26988  withval=$with_override_jaxws;
26989fi
26990
26991
26992
26993# Check whether --with-override-hotspot was given.
26994if test "${with_override_hotspot+set}" = set; then :
26995  withval=$with_override_hotspot;
26996fi
26997
26998
26999
27000# Check whether --with-override-nashorn was given.
27001if test "${with_override_nashorn+set}" = set; then :
27002  withval=$with_override_nashorn;
27003fi
27004
27005
27006
27007# Check whether --with-override-jdk was given.
27008if test "${with_override_jdk+set}" = set; then :
27009  withval=$with_override_jdk;
27010fi
27011
27012
27013  if test "x$with_override_langtools" != x; then
27014    CURDIR="$PWD"
27015    cd "$with_override_langtools"
27016    LANGTOOLS_TOPDIR="`pwd`"
27017    cd "$CURDIR"
27018    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
27019      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
27020    fi
27021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
27022$as_echo_n "checking if langtools should be overridden... " >&6; }
27023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
27024$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
27025  fi
27026  if test "x$with_override_corba" != x; then
27027    CURDIR="$PWD"
27028    cd "$with_override_corba"
27029    CORBA_TOPDIR="`pwd`"
27030    cd "$CURDIR"
27031    if ! test -f $CORBA_TOPDIR/make/Makefile; then
27032      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
27033    fi
27034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
27035$as_echo_n "checking if corba should be overridden... " >&6; }
27036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
27037$as_echo "yes with $CORBA_TOPDIR" >&6; }
27038  fi
27039  if test "x$with_override_jaxp" != x; then
27040    CURDIR="$PWD"
27041    cd "$with_override_jaxp"
27042    JAXP_TOPDIR="`pwd`"
27043    cd "$CURDIR"
27044    if ! test -f $JAXP_TOPDIR/make/Makefile; then
27045      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
27046    fi
27047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
27048$as_echo_n "checking if jaxp should be overridden... " >&6; }
27049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
27050$as_echo "yes with $JAXP_TOPDIR" >&6; }
27051  fi
27052  if test "x$with_override_jaxws" != x; then
27053    CURDIR="$PWD"
27054    cd "$with_override_jaxws"
27055    JAXWS_TOPDIR="`pwd`"
27056    cd "$CURDIR"
27057    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
27058      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
27059    fi
27060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
27061$as_echo_n "checking if jaxws should be overridden... " >&6; }
27062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
27063$as_echo "yes with $JAXWS_TOPDIR" >&6; }
27064  fi
27065  if test "x$with_override_hotspot" != x; then
27066    CURDIR="$PWD"
27067    cd "$with_override_hotspot"
27068    HOTSPOT_TOPDIR="`pwd`"
27069    cd "$CURDIR"
27070    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
27071      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
27072    fi
27073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
27074$as_echo_n "checking if hotspot should be overridden... " >&6; }
27075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
27076$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
27077  fi
27078  if test "x$with_override_nashorn" != x; then
27079    CURDIR="$PWD"
27080    cd "$with_override_nashorn"
27081    NASHORN_TOPDIR="`pwd`"
27082    cd "$CURDIR"
27083    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
27084      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
27085    fi
27086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
27087$as_echo_n "checking if nashorn should be overridden... " >&6; }
27088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
27089$as_echo "yes with $NASHORN_TOPDIR" >&6; }
27090  fi
27091  if test "x$with_override_jdk" != x; then
27092    CURDIR="$PWD"
27093    cd "$with_override_jdk"
27094    JDK_TOPDIR="`pwd`"
27095    cd "$CURDIR"
27096    if ! test -f $JDK_TOPDIR/make/Makefile; then
27097      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
27098    fi
27099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
27100$as_echo_n "checking if JDK should be overridden... " >&6; }
27101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
27102$as_echo "yes with $JDK_TOPDIR" >&6; }
27103  fi
27104
27105
27106  BUILD_OUTPUT="$OUTPUT_ROOT"
27107
27108
27109  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
27110  BUILD_HOTSPOT=true
27111
27112
27113
27114# Check whether --with-import-hotspot was given.
27115if test "${with_import_hotspot+set}" = set; then :
27116  withval=$with_import_hotspot;
27117fi
27118
27119  if test "x$with_import_hotspot" != x; then
27120    CURDIR="$PWD"
27121    cd "$with_import_hotspot"
27122    HOTSPOT_DIST="`pwd`"
27123    cd "$CURDIR"
27124    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27125      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27126    fi
27127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27128$as_echo_n "checking if hotspot should be imported... " >&6; }
27129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27130$as_echo "yes from $HOTSPOT_DIST" >&6; }
27131    BUILD_HOTSPOT=false
27132  fi
27133
27134  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27135
27136
27137###############################################################################
27138#
27139# Setup the toolchain (compilers etc), i.e. tools used to compile and process
27140# native code.
27141#
27142###############################################################################
27143
27144# First determine the toolchain type (compiler family)
27145
27146
27147# Check whether --with-toolchain-type was given.
27148if test "${with_toolchain_type+set}" = set; then :
27149  withval=$with_toolchain_type;
27150fi
27151
27152
27153  # Use indirect variable referencing
27154  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27155  VALID_TOOLCHAINS=${!toolchain_var_name}
27156
27157  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27158    if test -n "$XCODEBUILD"; then
27159      # On Mac OS X, default toolchain to clang after Xcode 5
27160      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27161      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27162      if test $? -ne 0; then
27163        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27164      fi
27165      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
27166          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
27167          $CUT -f 1 -d .`
27168      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
27169$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
27170      if test $XCODE_MAJOR_VERSION -ge 5; then
27171          DEFAULT_TOOLCHAIN="clang"
27172      else
27173          DEFAULT_TOOLCHAIN="gcc"
27174      fi
27175    else
27176      # If Xcode is not installed, but the command line tools are
27177      # then we can't run xcodebuild. On these systems we should
27178      # default to clang
27179      DEFAULT_TOOLCHAIN="clang"
27180    fi
27181  else
27182    # First toolchain type in the list is the default
27183    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27184  fi
27185
27186  if test "x$with_toolchain_type" = xlist; then
27187    # List all toolchains
27188    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27189$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27190    for toolchain in $VALID_TOOLCHAINS; do
27191      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27192      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27193      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27194    done
27195
27196    exit 0
27197  elif test "x$with_toolchain_type" != x; then
27198    # User override; check that it is valid
27199    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27200      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27201$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27202      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27203$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27204      as_fn_error $? "Cannot continue." "$LINENO" 5
27205    fi
27206    TOOLCHAIN_TYPE=$with_toolchain_type
27207  else
27208    # No flag given, use default
27209    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27210  fi
27211
27212
27213  TOOLCHAIN_CC_BINARY_clang="clang"
27214  TOOLCHAIN_CC_BINARY_gcc="gcc"
27215  TOOLCHAIN_CC_BINARY_microsoft="cl"
27216  TOOLCHAIN_CC_BINARY_solstudio="cc"
27217  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27218
27219  TOOLCHAIN_CXX_BINARY_clang="clang++"
27220  TOOLCHAIN_CXX_BINARY_gcc="g++"
27221  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27222  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27223  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27224
27225  # Use indirect variable referencing
27226  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27227  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27228  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27229  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27230  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27231  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27232
27233
27234  # Define filename patterns
27235  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27236    LIBRARY_PREFIX=
27237    SHARED_LIBRARY_SUFFIX='.dll'
27238    STATIC_LIBRARY_SUFFIX='.lib'
27239    SHARED_LIBRARY='$1.dll'
27240    STATIC_LIBRARY='$1.lib'
27241    OBJ_SUFFIX='.obj'
27242    EXE_SUFFIX='.exe'
27243  else
27244    LIBRARY_PREFIX=lib
27245    SHARED_LIBRARY_SUFFIX='.so'
27246    STATIC_LIBRARY_SUFFIX='.a'
27247    SHARED_LIBRARY='lib$1.so'
27248    STATIC_LIBRARY='lib$1.a'
27249    OBJ_SUFFIX='.o'
27250    EXE_SUFFIX=''
27251    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27252      SHARED_LIBRARY='lib$1.dylib'
27253      SHARED_LIBRARY_SUFFIX='.dylib'
27254    fi
27255  fi
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27267    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27268$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27269  else
27270    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27271$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27272  fi
27273
27274
27275# Then detect the actual binaries needed
27276
27277  # FIXME: Is this needed?
27278  ac_ext=cpp
27279ac_cpp='$CXXCPP $CPPFLAGS'
27280ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27281ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27282ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27283
27284
27285  # Store the CFLAGS etc passed to the configure script.
27286  ORG_CFLAGS="$CFLAGS"
27287  ORG_CXXFLAGS="$CXXFLAGS"
27288
27289  # autoconf magic only relies on PATH, so update it if tools dir is specified
27290  OLD_PATH="$PATH"
27291
27292  # On Windows, we need to detect the visual studio installation first.
27293  # This will change the PATH, but we need to keep that new PATH even
27294  # after toolchain detection is done, since the compiler (on x86) uses
27295  # it for DLL resolution in runtime.
27296  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27297      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27298
27299  # Store path to cygwin link.exe to help excluding it when searching for
27300  # VS linker. This must be done before changing the PATH when looking for VS.
27301  # Extract the first word of "link", so it can be a program name with args.
27302set dummy link; ac_word=$2
27303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27304$as_echo_n "checking for $ac_word... " >&6; }
27305if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27306  $as_echo_n "(cached) " >&6
27307else
27308  case $CYGWIN_LINK in
27309  [\\/]* | ?:[\\/]*)
27310  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27311  ;;
27312  *)
27313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27314for as_dir in $PATH
27315do
27316  IFS=$as_save_IFS
27317  test -z "$as_dir" && as_dir=.
27318    for ac_exec_ext in '' $ac_executable_extensions; do
27319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27320    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27322    break 2
27323  fi
27324done
27325  done
27326IFS=$as_save_IFS
27327
27328  ;;
27329esac
27330fi
27331CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27332if test -n "$CYGWIN_LINK"; then
27333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27334$as_echo "$CYGWIN_LINK" >&6; }
27335else
27336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27337$as_echo "no" >&6; }
27338fi
27339
27340
27341  if test "x$CYGWIN_LINK" != x; then
27342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27343$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27344    "$CYGWIN_LINK" --version > /dev/null
27345    if test $? -eq 0 ; then
27346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27347$as_echo "yes" >&6; }
27348    else
27349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27350$as_echo "no" >&6; }
27351      # This might be the VS linker. Don't exclude it later on.
27352      CYGWIN_LINK=""
27353    fi
27354  fi
27355
27356  # First-hand choice is to locate and run the vsvars bat file.
27357
27358
27359# Check whether --with-toolchain-version was given.
27360if test "${with_toolchain_version+set}" = set; then :
27361  withval=$with_toolchain_version;
27362fi
27363
27364
27365  if test "x$with_toolchain_version" = xlist; then
27366    # List all toolchains
27367    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27368$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27369    for version in $VALID_VS_VERSIONS; do
27370      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27371      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27372    done
27373
27374    exit 0
27375  elif test "x$DEVKIT_VS_VERSION" != x; then
27376    VS_VERSION=$DEVKIT_VS_VERSION
27377    TOOLCHAIN_VERSION=$VS_VERSION
27378    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27379    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27380    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27381    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27382    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27383    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27384
27385    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27386    # can still be exported as INCLUDE for compiler invocations without
27387    # SYSROOT_CFLAGS
27388    OLDIFS="$IFS"
27389    IFS=";"
27390    for i in $DEVKIT_VS_INCLUDE; do
27391      ipath=$i
27392
27393  unix_path="$ipath"
27394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27395    windows_path=`$CYGPATH -m "$unix_path"`
27396    ipath="$windows_path"
27397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27398    windows_path=`cmd //c echo $unix_path`
27399    ipath="$windows_path"
27400  fi
27401
27402      VS_INCLUDE="$VS_INCLUDE;$ipath"
27403    done
27404    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27405    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27406    for i in $DEVKIT_VS_LIB; do
27407      libpath=$i
27408
27409  unix_path="$libpath"
27410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27411    windows_path=`$CYGPATH -m "$unix_path"`
27412    libpath="$windows_path"
27413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27414    windows_path=`cmd //c echo $unix_path`
27415    libpath="$windows_path"
27416  fi
27417
27418      VS_LIB="$VS_LIB;$libpath"
27419    done
27420    IFS="$OLDIFS"
27421
27422    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27423$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27424
27425  elif test "x$with_toolchain_version" != x; then
27426    # User override; check that it is valid
27427    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27428      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27429$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27430      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27431$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27432      as_fn_error $? "Cannot continue." "$LINENO" 5
27433    fi
27434    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27435  else
27436    # No flag given, use default
27437    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27438  fi
27439
27440  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27441
27442  VS_VERSION="$VS_VERSION"
27443  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27444  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27445  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27446  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27447
27448  # When using --with-tools-dir, assume it points to the correct and default
27449  # version of Visual Studio or that --with-toolchain-version was also set.
27450  if test "x$with_tools_dir" != x; then
27451
27452  if test "x$VS_ENV_CMD" = x; then
27453    VS_VERSION="${VS_VERSION}"
27454    VS_BASE="$with_tools_dir/../.."
27455    METHOD="--with-tools-dir"
27456
27457    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27458      VCVARSFILE="vc/bin/vcvars32.bat"
27459    else
27460      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27461    fi
27462
27463
27464  windows_path="$VS_BASE"
27465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27466    unix_path=`$CYGPATH -u "$windows_path"`
27467    VS_BASE="$unix_path"
27468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27470    VS_BASE="$unix_path"
27471  fi
27472
27473    if test -d "$VS_BASE"; then
27474      if test -f "$VS_BASE/$VCVARSFILE"; then
27475        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27476$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27477        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27478        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27479        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27480        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27481      else
27482        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27483$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27484        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27485$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27486      fi
27487    fi
27488  fi
27489
27490
27491  if test "x$VS_ENV_CMD" = x; then
27492    VS_VERSION="${VS_VERSION}"
27493    VS_BASE="$with_tools_dir/../../.."
27494    METHOD="--with-tools-dir"
27495
27496    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27497      VCVARSFILE="vc/bin/vcvars32.bat"
27498    else
27499      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27500    fi
27501
27502
27503  windows_path="$VS_BASE"
27504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27505    unix_path=`$CYGPATH -u "$windows_path"`
27506    VS_BASE="$unix_path"
27507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27509    VS_BASE="$unix_path"
27510  fi
27511
27512    if test -d "$VS_BASE"; then
27513      if test -f "$VS_BASE/$VCVARSFILE"; then
27514        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27515$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27516        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27517        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27518        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27519        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27520      else
27521        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27522$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27523        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27524$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27525      fi
27526    fi
27527  fi
27528
27529    if test "x$VS_ENV_CMD" = x; then
27530      # Having specified an argument which is incorrect will produce an instant failure;
27531      # we should not go on looking
27532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27533$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27534      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27535$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27536      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27537$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27538      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27539    fi
27540  fi
27541
27542  VS_ENV_CMD=""
27543  VS_ENV_ARGS=""
27544
27545  if test "x$VS_COMNTOOLS" != x; then
27546
27547  if test "x$VS_ENV_CMD" = x; then
27548    VS_VERSION="${VS_VERSION}"
27549    VS_BASE="$VS_COMNTOOLS/../.."
27550    METHOD="$VS_COMNTOOLS_VAR variable"
27551
27552    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27553      VCVARSFILE="vc/bin/vcvars32.bat"
27554    else
27555      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27556    fi
27557
27558
27559  windows_path="$VS_BASE"
27560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27561    unix_path=`$CYGPATH -u "$windows_path"`
27562    VS_BASE="$unix_path"
27563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27565    VS_BASE="$unix_path"
27566  fi
27567
27568    if test -d "$VS_BASE"; then
27569      if test -f "$VS_BASE/$VCVARSFILE"; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27571$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27572        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27573        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27574        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27575        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27576      else
27577        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27578$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27579        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27580$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27581      fi
27582    fi
27583  fi
27584
27585  fi
27586  if test "x$PROGRAMFILES" != x; then
27587
27588  if test "x$VS_ENV_CMD" = x; then
27589    VS_VERSION="${VS_VERSION}"
27590    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27591    METHOD="well-known name"
27592
27593    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27594      VCVARSFILE="vc/bin/vcvars32.bat"
27595    else
27596      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27597    fi
27598
27599
27600  windows_path="$VS_BASE"
27601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27602    unix_path=`$CYGPATH -u "$windows_path"`
27603    VS_BASE="$unix_path"
27604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27606    VS_BASE="$unix_path"
27607  fi
27608
27609    if test -d "$VS_BASE"; then
27610      if test -f "$VS_BASE/$VCVARSFILE"; then
27611        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27612$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27613        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27614        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27615        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27616        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27617      else
27618        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27619$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27620        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27621$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27622      fi
27623    fi
27624  fi
27625
27626  fi
27627  # Work around the insanely named ProgramFiles(x86) env variable
27628  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27629  if test "x$PROGRAMFILES_X86" != x; then
27630
27631  if test "x$VS_ENV_CMD" = x; then
27632    VS_VERSION="${VS_VERSION}"
27633    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27634    METHOD="well-known name"
27635
27636    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27637      VCVARSFILE="vc/bin/vcvars32.bat"
27638    else
27639      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27640    fi
27641
27642
27643  windows_path="$VS_BASE"
27644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27645    unix_path=`$CYGPATH -u "$windows_path"`
27646    VS_BASE="$unix_path"
27647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27649    VS_BASE="$unix_path"
27650  fi
27651
27652    if test -d "$VS_BASE"; then
27653      if test -f "$VS_BASE/$VCVARSFILE"; then
27654        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27655$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27656        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27657        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27658        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27659        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27660      else
27661        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27662$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27663        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27664$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27665      fi
27666    fi
27667  fi
27668
27669  fi
27670
27671  if test "x$VS_ENV_CMD" = x; then
27672    VS_VERSION="${VS_VERSION}"
27673    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27674    METHOD="well-known name"
27675
27676    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27677      VCVARSFILE="vc/bin/vcvars32.bat"
27678    else
27679      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27680    fi
27681
27682
27683  windows_path="$VS_BASE"
27684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27685    unix_path=`$CYGPATH -u "$windows_path"`
27686    VS_BASE="$unix_path"
27687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27689    VS_BASE="$unix_path"
27690  fi
27691
27692    if test -d "$VS_BASE"; then
27693      if test -f "$VS_BASE/$VCVARSFILE"; then
27694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27695$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27696        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27697        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27698        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27699        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27700      else
27701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27702$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27705      fi
27706    fi
27707  fi
27708
27709
27710  if test "x$VS_ENV_CMD" = x; then
27711    VS_VERSION="${VS_VERSION}"
27712    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27713    METHOD="well-known name"
27714
27715    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27716      VCVARSFILE="vc/bin/vcvars32.bat"
27717    else
27718      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27719    fi
27720
27721
27722  windows_path="$VS_BASE"
27723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27724    unix_path=`$CYGPATH -u "$windows_path"`
27725    VS_BASE="$unix_path"
27726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27728    VS_BASE="$unix_path"
27729  fi
27730
27731    if test -d "$VS_BASE"; then
27732      if test -f "$VS_BASE/$VCVARSFILE"; then
27733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27734$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27735        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27736        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27737        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27738        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27739      else
27740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27741$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27742        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27743$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27744      fi
27745    fi
27746  fi
27747
27748
27749  if test "x$SDK_INSTALL_DIR" != x; then
27750    if test "x$ProgramW6432" != x; then
27751
27752  if test "x$VS_ENV_CMD" = x; then
27753    VS_VERSION="${VS_VERSION}"
27754    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27755    METHOD="well-known name"
27756
27757  windows_path="$WIN_SDK_BASE"
27758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27759    unix_path=`$CYGPATH -u "$windows_path"`
27760    WIN_SDK_BASE="$unix_path"
27761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27763    WIN_SDK_BASE="$unix_path"
27764  fi
27765
27766    if test -d "$WIN_SDK_BASE"; then
27767      # There have been cases of partial or broken SDK installations. A missing
27768      # lib dir is not going to work.
27769      if test ! -d "$WIN_SDK_BASE/lib"; then
27770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27771$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27772        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27773$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27774      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27776$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27777        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27778        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27779          VS_ENV_ARGS="/x86"
27780        else
27781          VS_ENV_ARGS="/x64"
27782        fi
27783        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27784        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27785        # TODO: improve detection for other versions of SDK
27786        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27787      else
27788        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27789$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27790        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27791$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27792      fi
27793    fi
27794  fi
27795
27796    fi
27797    if test "x$PROGRAMW6432" != x; then
27798
27799  if test "x$VS_ENV_CMD" = x; then
27800    VS_VERSION="${VS_VERSION}"
27801    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27802    METHOD="well-known name"
27803
27804  windows_path="$WIN_SDK_BASE"
27805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27806    unix_path=`$CYGPATH -u "$windows_path"`
27807    WIN_SDK_BASE="$unix_path"
27808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27810    WIN_SDK_BASE="$unix_path"
27811  fi
27812
27813    if test -d "$WIN_SDK_BASE"; then
27814      # There have been cases of partial or broken SDK installations. A missing
27815      # lib dir is not going to work.
27816      if test ! -d "$WIN_SDK_BASE/lib"; then
27817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27818$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27819        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27820$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27821      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27823$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27824        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27825        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27826          VS_ENV_ARGS="/x86"
27827        else
27828          VS_ENV_ARGS="/x64"
27829        fi
27830        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27831        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27832        # TODO: improve detection for other versions of SDK
27833        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27834      else
27835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27836$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27837        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27838$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27839      fi
27840    fi
27841  fi
27842
27843    fi
27844    if test "x$PROGRAMFILES" != x; then
27845
27846  if test "x$VS_ENV_CMD" = x; then
27847    VS_VERSION="${VS_VERSION}"
27848    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27849    METHOD="well-known name"
27850
27851  windows_path="$WIN_SDK_BASE"
27852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27853    unix_path=`$CYGPATH -u "$windows_path"`
27854    WIN_SDK_BASE="$unix_path"
27855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27857    WIN_SDK_BASE="$unix_path"
27858  fi
27859
27860    if test -d "$WIN_SDK_BASE"; then
27861      # There have been cases of partial or broken SDK installations. A missing
27862      # lib dir is not going to work.
27863      if test ! -d "$WIN_SDK_BASE/lib"; then
27864        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27865$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27866        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27867$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27868      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27870$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27871        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27872        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27873          VS_ENV_ARGS="/x86"
27874        else
27875          VS_ENV_ARGS="/x64"
27876        fi
27877        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27878        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27879        # TODO: improve detection for other versions of SDK
27880        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27881      else
27882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27883$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27885$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27886      fi
27887    fi
27888  fi
27889
27890    fi
27891
27892  if test "x$VS_ENV_CMD" = x; then
27893    VS_VERSION="${VS_VERSION}"
27894    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27895    METHOD="well-known name"
27896
27897  windows_path="$WIN_SDK_BASE"
27898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27899    unix_path=`$CYGPATH -u "$windows_path"`
27900    WIN_SDK_BASE="$unix_path"
27901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27903    WIN_SDK_BASE="$unix_path"
27904  fi
27905
27906    if test -d "$WIN_SDK_BASE"; then
27907      # There have been cases of partial or broken SDK installations. A missing
27908      # lib dir is not going to work.
27909      if test ! -d "$WIN_SDK_BASE/lib"; then
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27911$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27912        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27913$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27914      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27917        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27918        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27919          VS_ENV_ARGS="/x86"
27920        else
27921          VS_ENV_ARGS="/x64"
27922        fi
27923        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27924        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27925        # TODO: improve detection for other versions of SDK
27926        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27927      else
27928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27929$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27931$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27932      fi
27933    fi
27934  fi
27935
27936
27937  if test "x$VS_ENV_CMD" = x; then
27938    VS_VERSION="${VS_VERSION}"
27939    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27940    METHOD="well-known name"
27941
27942  windows_path="$WIN_SDK_BASE"
27943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27944    unix_path=`$CYGPATH -u "$windows_path"`
27945    WIN_SDK_BASE="$unix_path"
27946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27948    WIN_SDK_BASE="$unix_path"
27949  fi
27950
27951    if test -d "$WIN_SDK_BASE"; then
27952      # There have been cases of partial or broken SDK installations. A missing
27953      # lib dir is not going to work.
27954      if test ! -d "$WIN_SDK_BASE/lib"; then
27955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27956$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27957        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27958$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27959      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27961$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27962        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27963        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27964          VS_ENV_ARGS="/x86"
27965        else
27966          VS_ENV_ARGS="/x64"
27967        fi
27968        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27969        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27970        # TODO: improve detection for other versions of SDK
27971        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27972      else
27973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27974$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27976$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27977      fi
27978    fi
27979  fi
27980
27981  fi
27982
27983    if test "x$VS_ENV_CMD" != x; then
27984      TOOLCHAIN_VERSION=$VS_VERSION
27985      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27986      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27987      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27988      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27989      # The rest of the variables are already evaled while probing
27990      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27991$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27992      break
27993    fi
27994  done
27995
27996
27997  # If we have a devkit, skip all of the below.
27998  if test "x$DEVKIT_VS_VERSION" = x; then
27999    if test "x$VS_ENV_CMD" != x; then
28000      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
28001
28002  # Only process if variable expands to non-empty
28003
28004  if test "x$VS_ENV_CMD" != x; then
28005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28006
28007  # First separate the path from the arguments. This will split at the first
28008  # space.
28009  complete="$VS_ENV_CMD"
28010  path="${complete%% *}"
28011  tmp="$complete EOL"
28012  arguments="${tmp#* }"
28013
28014  # Input might be given as Windows format, start by converting to
28015  # unix format.
28016  new_path=`$CYGPATH -u "$path"`
28017
28018  # Now try to locate executable using which
28019  new_path=`$WHICH "$new_path" 2> /dev/null`
28020  # bat and cmd files are not always considered executable in cygwin causing which
28021  # to not find them
28022  if test "x$new_path" = x \
28023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28025    new_path=`$CYGPATH -u "$path"`
28026  fi
28027  if test "x$new_path" = x; then
28028    # Oops. Which didn't find the executable.
28029    # The splitting of arguments from the executable at a space might have been incorrect,
28030    # since paths with space are more likely in Windows. Give it another try with the whole
28031    # argument.
28032    path="$complete"
28033    arguments="EOL"
28034    new_path=`$CYGPATH -u "$path"`
28035    new_path=`$WHICH "$new_path" 2> /dev/null`
28036    # bat and cmd files are not always considered executable in cygwin causing which
28037    # to not find them
28038    if test "x$new_path" = x \
28039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28041      new_path=`$CYGPATH -u "$path"`
28042    fi
28043    if test "x$new_path" = x; then
28044      # It's still not found. Now this is an unrecoverable error.
28045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28046$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28047      has_space=`$ECHO "$complete" | $GREP " "`
28048      if test "x$has_space" != x; then
28049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28051      fi
28052      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28053    fi
28054  fi
28055
28056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28059  # "foo.exe" is OK but "foo" is an error.
28060  #
28061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28062  # It is also a way to make sure we got the proper file name for the real test later on.
28063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28064  if test "x$test_shortpath" = x; then
28065    # Short path failed, file does not exist as specified.
28066    # Try adding .exe or .cmd
28067    if test -f "${new_path}.exe"; then
28068      input_to_shortpath="${new_path}.exe"
28069    elif test -f "${new_path}.cmd"; then
28070      input_to_shortpath="${new_path}.cmd"
28071    else
28072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
28073$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
28074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28076      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28077    fi
28078  else
28079    input_to_shortpath="$new_path"
28080  fi
28081
28082  # Call helper function which possibly converts this using DOS-style short mode.
28083  # If so, the updated path is stored in $new_path.
28084  new_path="$input_to_shortpath"
28085
28086  input_path="$input_to_shortpath"
28087  # Check if we need to convert this using DOS-style short mode. If the path
28088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28089  # take no chances and rewrite it.
28090  # Note: m4 eats our [], so we need to use [ and ] instead.
28091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28092  if test "x$has_forbidden_chars" != x; then
28093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28097      # Going to short mode and back again did indeed matter. Since short mode is
28098      # case insensitive, let's make it lowercase to improve readability.
28099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28100      # Now convert it back to Unix-style (cygpath)
28101      input_path=`$CYGPATH -u "$shortmode_path"`
28102      new_path="$input_path"
28103    fi
28104  fi
28105
28106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28107  if test "x$test_cygdrive_prefix" = x; then
28108    # As a simple fix, exclude /usr/bin since it's not a real path.
28109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28111      # a path prefixed by /cygdrive for fixpath to work.
28112      new_path="$CYGWIN_ROOT_PATH$input_path"
28113    fi
28114  fi
28115
28116  # remove trailing .exe if any
28117  new_path="${new_path/%.exe/}"
28118
28119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28120
28121  # First separate the path from the arguments. This will split at the first
28122  # space.
28123  complete="$VS_ENV_CMD"
28124  path="${complete%% *}"
28125  tmp="$complete EOL"
28126  arguments="${tmp#* }"
28127
28128  # Input might be given as Windows format, start by converting to
28129  # unix format.
28130  new_path="$path"
28131
28132  windows_path="$new_path"
28133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28134    unix_path=`$CYGPATH -u "$windows_path"`
28135    new_path="$unix_path"
28136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28138    new_path="$unix_path"
28139  fi
28140
28141
28142  # Now try to locate executable using which
28143  new_path=`$WHICH "$new_path" 2> /dev/null`
28144
28145  if test "x$new_path" = x; then
28146    # Oops. Which didn't find the executable.
28147    # The splitting of arguments from the executable at a space might have been incorrect,
28148    # since paths with space are more likely in Windows. Give it another try with the whole
28149    # argument.
28150    path="$complete"
28151    arguments="EOL"
28152    new_path="$path"
28153
28154  windows_path="$new_path"
28155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28156    unix_path=`$CYGPATH -u "$windows_path"`
28157    new_path="$unix_path"
28158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28160    new_path="$unix_path"
28161  fi
28162
28163
28164    new_path=`$WHICH "$new_path" 2> /dev/null`
28165    # bat and cmd files are not always considered executable in MSYS causing which
28166    # to not find them
28167    if test "x$new_path" = x \
28168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28170      new_path="$path"
28171
28172  windows_path="$new_path"
28173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28174    unix_path=`$CYGPATH -u "$windows_path"`
28175    new_path="$unix_path"
28176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28178    new_path="$unix_path"
28179  fi
28180
28181    fi
28182
28183    if test "x$new_path" = x; then
28184      # It's still not found. Now this is an unrecoverable error.
28185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28186$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28187      has_space=`$ECHO "$complete" | $GREP " "`
28188      if test "x$has_space" != x; then
28189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28191      fi
28192      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28193    fi
28194  fi
28195
28196  # Now new_path has a complete unix path to the binary
28197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28198    # Keep paths in /bin as-is, but remove trailing .exe if any
28199    new_path="${new_path/%.exe/}"
28200    # Do not save /bin paths to all_fixpath_prefixes!
28201  else
28202    # Not in mixed or Windows style, start by that.
28203    new_path=`cmd //c echo $new_path`
28204
28205  input_path="$new_path"
28206  # Check if we need to convert this using DOS-style short mode. If the path
28207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28208  # take no chances and rewrite it.
28209  # Note: m4 eats our [], so we need to use [ and ] instead.
28210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28211  if test "x$has_forbidden_chars" != x; then
28212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28214  fi
28215
28216    # Output is in $new_path
28217
28218  windows_path="$new_path"
28219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220    unix_path=`$CYGPATH -u "$windows_path"`
28221    new_path="$unix_path"
28222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28224    new_path="$unix_path"
28225  fi
28226
28227    # remove trailing .exe if any
28228    new_path="${new_path/%.exe/}"
28229
28230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28232  fi
28233
28234    else
28235      # We're on a unix platform. Hooray! :)
28236      # First separate the path from the arguments. This will split at the first
28237      # space.
28238      complete="$VS_ENV_CMD"
28239      path="${complete%% *}"
28240      tmp="$complete EOL"
28241      arguments="${tmp#* }"
28242
28243      # Cannot rely on the command "which" here since it doesn't always work.
28244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28245      if test -z "$is_absolute_path"; then
28246        # Path to executable is not absolute. Find it.
28247        IFS_save="$IFS"
28248        IFS=:
28249        for p in $PATH; do
28250          if test -f "$p/$path" && test -x "$p/$path"; then
28251            new_path="$p/$path"
28252            break
28253          fi
28254        done
28255        IFS="$IFS_save"
28256      else
28257        # This is an absolute path, we can use it without further modifications.
28258        new_path="$path"
28259      fi
28260
28261      if test "x$new_path" = x; then
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28263$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28264        has_space=`$ECHO "$complete" | $GREP " "`
28265        if test "x$has_space" != x; then
28266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28268        fi
28269        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28270      fi
28271    fi
28272
28273    # Now join together the path and the arguments once again
28274    if test "x$arguments" != xEOL; then
28275      new_complete="$new_path ${arguments% *}"
28276    else
28277      new_complete="$new_path"
28278    fi
28279
28280    if test "x$complete" != "x$new_complete"; then
28281      VS_ENV_CMD="$new_complete"
28282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28283$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28284    fi
28285  fi
28286
28287
28288      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28289      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28290$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28291
28292      # We need to create a couple of temporary files.
28293      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28294      $MKDIR -p $VS_ENV_TMP_DIR
28295
28296      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28297      # Instead create a shell script which will set the relevant variables when run.
28298      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28299
28300  unix_path="$WINPATH_VS_ENV_CMD"
28301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28302    windows_path=`$CYGPATH -m "$unix_path"`
28303    WINPATH_VS_ENV_CMD="$windows_path"
28304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28305    windows_path=`cmd //c echo $unix_path`
28306    WINPATH_VS_ENV_CMD="$windows_path"
28307  fi
28308
28309      WINPATH_BASH="$BASH"
28310
28311  unix_path="$WINPATH_BASH"
28312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28313    windows_path=`$CYGPATH -m "$unix_path"`
28314    WINPATH_BASH="$windows_path"
28315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28316    windows_path=`cmd //c echo $unix_path`
28317    WINPATH_BASH="$windows_path"
28318  fi
28319
28320
28321      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28322      # script (executable by bash) that will setup the important variables.
28323      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28324      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28325      # This will end up something like:
28326      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28327      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28328      # These will end up something like:
28329      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28330      # The trailing space for everyone except PATH is no typo, but is needed due
28331      # to trailing \ in the Windows paths. These will be stripped later.
28332      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28333          >> $EXTRACT_VC_ENV_BAT_FILE
28334      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28335          >> $EXTRACT_VC_ENV_BAT_FILE
28336      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28337          >> $EXTRACT_VC_ENV_BAT_FILE
28338      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28339          >> $EXTRACT_VC_ENV_BAT_FILE
28340      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28341          >> $EXTRACT_VC_ENV_BAT_FILE
28342      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28343          >> $EXTRACT_VC_ENV_BAT_FILE
28344
28345      # Now execute the newly created bat file.
28346      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28347      # Change directory so we don't need to mess with Windows paths in redirects.
28348      cd $VS_ENV_TMP_DIR
28349      cmd /c extract-vs-env.bat | $CAT
28350      cd $CURDIR
28351
28352      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28354$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28355        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28356$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28357        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28358$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28359        as_fn_error $? "Cannot continue" "$LINENO" 5
28360      fi
28361
28362      # Now set all paths and other env variables. This will allow the rest of
28363      # the configure script to find and run the compiler in the proper way.
28364      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28365$as_echo "$as_me: Setting extracted environment variables" >&6;}
28366      . $VS_ENV_TMP_DIR/set-vs-env.sh
28367      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28368      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28369    else
28370      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28371      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28372$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28373    fi
28374  fi
28375
28376  # At this point, we should have correct variables in the environment, or we can't continue.
28377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28378$as_echo_n "checking for Visual Studio variables... " >&6; }
28379
28380  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28381      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28382    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28384$as_echo "present but broken" >&6; }
28385      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28386    else
28387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28388$as_echo "ok" >&6; }
28389      # Remove any trailing "\" ";" and " " from the variables.
28390      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28391      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28392      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28393      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28394      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28395      # Remove any paths containing # (typically F#) as that messes up make. This
28396      # is needed if visual studio was installed with F# support.
28397      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28398
28399
28400
28401
28402
28403      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28404      OLDIFS="$IFS"
28405      IFS=";"
28406      for i in $VS_INCLUDE; do
28407        ipath=$i
28408        # Only process non-empty elements
28409        if test "x$ipath" != x; then
28410          IFS="$OLDIFS"
28411          # Check that directory exists before calling fixup_path
28412          testpath=$ipath
28413
28414  windows_path="$testpath"
28415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28416    unix_path=`$CYGPATH -u "$windows_path"`
28417    testpath="$unix_path"
28418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28420    testpath="$unix_path"
28421  fi
28422
28423          if test -d "$testpath"; then
28424
28425  # Only process if variable expands to non-empty
28426
28427  if test "x$ipath" != x; then
28428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28429
28430  # Input might be given as Windows format, start by converting to
28431  # unix format.
28432  path="$ipath"
28433  new_path=`$CYGPATH -u "$path"`
28434
28435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28438  # "foo.exe" is OK but "foo" is an error.
28439  #
28440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28441  # It is also a way to make sure we got the proper file name for the real test later on.
28442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28443  if test "x$test_shortpath" = x; then
28444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28445$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28446    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28447  fi
28448
28449  # Call helper function which possibly converts this using DOS-style short mode.
28450  # If so, the updated path is stored in $new_path.
28451
28452  input_path="$new_path"
28453  # Check if we need to convert this using DOS-style short mode. If the path
28454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28455  # take no chances and rewrite it.
28456  # Note: m4 eats our [], so we need to use [ and ] instead.
28457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28458  if test "x$has_forbidden_chars" != x; then
28459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28463      # Going to short mode and back again did indeed matter. Since short mode is
28464      # case insensitive, let's make it lowercase to improve readability.
28465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28466      # Now convert it back to Unix-style (cygpath)
28467      input_path=`$CYGPATH -u "$shortmode_path"`
28468      new_path="$input_path"
28469    fi
28470  fi
28471
28472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28473  if test "x$test_cygdrive_prefix" = x; then
28474    # As a simple fix, exclude /usr/bin since it's not a real path.
28475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28477      # a path prefixed by /cygdrive for fixpath to work.
28478      new_path="$CYGWIN_ROOT_PATH$input_path"
28479    fi
28480  fi
28481
28482
28483  if test "x$path" != "x$new_path"; then
28484    ipath="$new_path"
28485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28486$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28487  fi
28488
28489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28490
28491  path="$ipath"
28492  has_colon=`$ECHO $path | $GREP ^.:`
28493  new_path="$path"
28494  if test "x$has_colon" = x; then
28495    # Not in mixed or Windows style, start by that.
28496    new_path=`cmd //c echo $path`
28497  fi
28498
28499
28500  input_path="$new_path"
28501  # Check if we need to convert this using DOS-style short mode. If the path
28502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28503  # take no chances and rewrite it.
28504  # Note: m4 eats our [], so we need to use [ and ] instead.
28505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28506  if test "x$has_forbidden_chars" != x; then
28507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28509  fi
28510
28511
28512  windows_path="$new_path"
28513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28514    unix_path=`$CYGPATH -u "$windows_path"`
28515    new_path="$unix_path"
28516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28518    new_path="$unix_path"
28519  fi
28520
28521  if test "x$path" != "x$new_path"; then
28522    ipath="$new_path"
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28524$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28525  fi
28526
28527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28529
28530    else
28531      # We're on a unix platform. Hooray! :)
28532      path="$ipath"
28533      has_space=`$ECHO "$path" | $GREP " "`
28534      if test "x$has_space" != x; then
28535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28536$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28537        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28538      fi
28539
28540      # Use eval to expand a potential ~
28541      eval path="$path"
28542      if test ! -f "$path" && test ! -d "$path"; then
28543        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28544      fi
28545
28546      ipath="`cd "$path"; $THEPWDCMD -L`"
28547    fi
28548  fi
28549
28550            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28551          fi
28552          IFS=";"
28553        fi
28554      done
28555      # Convert VS_LIB into SYSROOT_LDFLAGS
28556      for i in $VS_LIB; do
28557        libpath=$i
28558        # Only process non-empty elements
28559        if test "x$libpath" != x; then
28560          IFS="$OLDIFS"
28561          # Check that directory exists before calling fixup_path
28562          testpath=$libpath
28563
28564  windows_path="$testpath"
28565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28566    unix_path=`$CYGPATH -u "$windows_path"`
28567    testpath="$unix_path"
28568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28570    testpath="$unix_path"
28571  fi
28572
28573          if test -d "$testpath"; then
28574
28575  # Only process if variable expands to non-empty
28576
28577  if test "x$libpath" != x; then
28578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28579
28580  # Input might be given as Windows format, start by converting to
28581  # unix format.
28582  path="$libpath"
28583  new_path=`$CYGPATH -u "$path"`
28584
28585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28588  # "foo.exe" is OK but "foo" is an error.
28589  #
28590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28591  # It is also a way to make sure we got the proper file name for the real test later on.
28592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28593  if test "x$test_shortpath" = x; then
28594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28595$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28596    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28597  fi
28598
28599  # Call helper function which possibly converts this using DOS-style short mode.
28600  # If so, the updated path is stored in $new_path.
28601
28602  input_path="$new_path"
28603  # Check if we need to convert this using DOS-style short mode. If the path
28604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28605  # take no chances and rewrite it.
28606  # Note: m4 eats our [], so we need to use [ and ] instead.
28607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28608  if test "x$has_forbidden_chars" != x; then
28609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28613      # Going to short mode and back again did indeed matter. Since short mode is
28614      # case insensitive, let's make it lowercase to improve readability.
28615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28616      # Now convert it back to Unix-style (cygpath)
28617      input_path=`$CYGPATH -u "$shortmode_path"`
28618      new_path="$input_path"
28619    fi
28620  fi
28621
28622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28623  if test "x$test_cygdrive_prefix" = x; then
28624    # As a simple fix, exclude /usr/bin since it's not a real path.
28625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28627      # a path prefixed by /cygdrive for fixpath to work.
28628      new_path="$CYGWIN_ROOT_PATH$input_path"
28629    fi
28630  fi
28631
28632
28633  if test "x$path" != "x$new_path"; then
28634    libpath="$new_path"
28635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28636$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28637  fi
28638
28639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28640
28641  path="$libpath"
28642  has_colon=`$ECHO $path | $GREP ^.:`
28643  new_path="$path"
28644  if test "x$has_colon" = x; then
28645    # Not in mixed or Windows style, start by that.
28646    new_path=`cmd //c echo $path`
28647  fi
28648
28649
28650  input_path="$new_path"
28651  # Check if we need to convert this using DOS-style short mode. If the path
28652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28653  # take no chances and rewrite it.
28654  # Note: m4 eats our [], so we need to use [ and ] instead.
28655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28656  if test "x$has_forbidden_chars" != x; then
28657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28659  fi
28660
28661
28662  windows_path="$new_path"
28663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28664    unix_path=`$CYGPATH -u "$windows_path"`
28665    new_path="$unix_path"
28666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28668    new_path="$unix_path"
28669  fi
28670
28671  if test "x$path" != "x$new_path"; then
28672    libpath="$new_path"
28673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28674$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28675  fi
28676
28677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28679
28680    else
28681      # We're on a unix platform. Hooray! :)
28682      path="$libpath"
28683      has_space=`$ECHO "$path" | $GREP " "`
28684      if test "x$has_space" != x; then
28685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28686$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28687        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28688      fi
28689
28690      # Use eval to expand a potential ~
28691      eval path="$path"
28692      if test ! -f "$path" && test ! -d "$path"; then
28693        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28694      fi
28695
28696      libpath="`cd "$path"; $THEPWDCMD -L`"
28697    fi
28698  fi
28699
28700            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28701          fi
28702          IFS=";"
28703        fi
28704      done
28705      IFS="$OLDIFS"
28706    fi
28707  else
28708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28709$as_echo "not found" >&6; }
28710
28711    if test "x$VS_ENV_CMD" = x; then
28712      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28713$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28714      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28715$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28716    else
28717      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28718$as_echo "$as_me: Running the extraction script failed." >&6;}
28719    fi
28720    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28721$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28722    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28723$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28724    as_fn_error $? "Cannot continue" "$LINENO" 5
28725  fi
28726
28727    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28728    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28729    PATH="$VS_PATH"
28730    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28731    export INCLUDE="$VS_INCLUDE"
28732    export LIB="$VS_LIB"
28733  fi
28734
28735  # For solaris we really need solaris tools, and not the GNU equivalent.
28736  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28737  # so add that to path before starting to probe.
28738  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28739  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28740    PATH="/usr/ccs/bin:$PATH"
28741  fi
28742
28743  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28744  # override all other locations.
28745  if test "x$TOOLCHAIN_PATH" != x; then
28746    PATH=$TOOLCHAIN_PATH:$PATH
28747  fi
28748
28749
28750  #
28751  # Setup the compilers (CC and CXX)
28752  #
28753
28754  COMPILER_NAME=C
28755  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28756
28757  if test "x$CC" != x; then
28758    # User has supplied compiler name already, always let that override.
28759    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28760$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28761    if test "x`basename $CC`" = "x$CC"; then
28762      # A command without a complete path is provided, search $PATH.
28763
28764      for ac_prog in $CC
28765do
28766  # Extract the first word of "$ac_prog", so it can be a program name with args.
28767set dummy $ac_prog; ac_word=$2
28768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28769$as_echo_n "checking for $ac_word... " >&6; }
28770if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28771  $as_echo_n "(cached) " >&6
28772else
28773  case $POTENTIAL_CC in
28774  [\\/]* | ?:[\\/]*)
28775  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28776  ;;
28777  *)
28778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28779for as_dir in $PATH
28780do
28781  IFS=$as_save_IFS
28782  test -z "$as_dir" && as_dir=.
28783    for ac_exec_ext in '' $ac_executable_extensions; do
28784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28785    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28787    break 2
28788  fi
28789done
28790  done
28791IFS=$as_save_IFS
28792
28793  ;;
28794esac
28795fi
28796POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28797if test -n "$POTENTIAL_CC"; then
28798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28799$as_echo "$POTENTIAL_CC" >&6; }
28800else
28801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28802$as_echo "no" >&6; }
28803fi
28804
28805
28806  test -n "$POTENTIAL_CC" && break
28807done
28808
28809      if test "x$POTENTIAL_CC" != x; then
28810        CC=$POTENTIAL_CC
28811      else
28812        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28813      fi
28814    else
28815      # Otherwise it might already be a complete path
28816      if test ! -x "$CC"; then
28817        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28818      fi
28819    fi
28820  else
28821    # No user supplied value. Locate compiler ourselves.
28822
28823    # If we are cross compiling, assume cross compilation tools follows the
28824    # cross compilation standard where they are prefixed with the autoconf
28825    # standard name for the target. For example the binary
28826    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28827    # If we are not cross compiling, then the default compiler name will be
28828    # used.
28829
28830    CC=
28831    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28832    # before checking the rest of the PATH.
28833    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28834    # step, this should not be necessary.
28835    if test -n "$TOOLCHAIN_PATH"; then
28836      PATH_save="$PATH"
28837      PATH="$TOOLCHAIN_PATH"
28838      for ac_prog in $SEARCH_LIST
28839do
28840  # Extract the first word of "$ac_prog", so it can be a program name with args.
28841set dummy $ac_prog; ac_word=$2
28842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28843$as_echo_n "checking for $ac_word... " >&6; }
28844if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28845  $as_echo_n "(cached) " >&6
28846else
28847  case $TOOLCHAIN_PATH_CC in
28848  [\\/]* | ?:[\\/]*)
28849  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28850  ;;
28851  *)
28852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28853for as_dir in $PATH
28854do
28855  IFS=$as_save_IFS
28856  test -z "$as_dir" && as_dir=.
28857    for ac_exec_ext in '' $ac_executable_extensions; do
28858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28859    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28861    break 2
28862  fi
28863done
28864  done
28865IFS=$as_save_IFS
28866
28867  ;;
28868esac
28869fi
28870TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28871if test -n "$TOOLCHAIN_PATH_CC"; then
28872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28873$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28874else
28875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28876$as_echo "no" >&6; }
28877fi
28878
28879
28880  test -n "$TOOLCHAIN_PATH_CC" && break
28881done
28882
28883      CC=$TOOLCHAIN_PATH_CC
28884      PATH="$PATH_save"
28885    fi
28886
28887    # AC_PATH_PROGS can't be run multiple times with the same variable,
28888    # so create a new name for this run.
28889    if test "x$CC" = x; then
28890      for ac_prog in $SEARCH_LIST
28891do
28892  # Extract the first word of "$ac_prog", so it can be a program name with args.
28893set dummy $ac_prog; ac_word=$2
28894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28895$as_echo_n "checking for $ac_word... " >&6; }
28896if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28897  $as_echo_n "(cached) " >&6
28898else
28899  case $POTENTIAL_CC in
28900  [\\/]* | ?:[\\/]*)
28901  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28902  ;;
28903  *)
28904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28905for as_dir in $PATH
28906do
28907  IFS=$as_save_IFS
28908  test -z "$as_dir" && as_dir=.
28909    for ac_exec_ext in '' $ac_executable_extensions; do
28910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28911    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28913    break 2
28914  fi
28915done
28916  done
28917IFS=$as_save_IFS
28918
28919  ;;
28920esac
28921fi
28922POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28923if test -n "$POTENTIAL_CC"; then
28924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28925$as_echo "$POTENTIAL_CC" >&6; }
28926else
28927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28928$as_echo "no" >&6; }
28929fi
28930
28931
28932  test -n "$POTENTIAL_CC" && break
28933done
28934
28935      CC=$POTENTIAL_CC
28936    fi
28937
28938    if test "x$CC" = x; then
28939
28940  # Print a helpful message on how to acquire the necessary build dependency.
28941  # devkit is the help tag: freetype, cups, pulse, alsa etc
28942  MISSING_DEPENDENCY=devkit
28943
28944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28945    cygwin_help $MISSING_DEPENDENCY
28946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28947    msys_help $MISSING_DEPENDENCY
28948  else
28949    PKGHANDLER_COMMAND=
28950
28951    case $PKGHANDLER in
28952      apt-get)
28953        apt_help     $MISSING_DEPENDENCY ;;
28954      yum)
28955        yum_help     $MISSING_DEPENDENCY ;;
28956      port)
28957        port_help    $MISSING_DEPENDENCY ;;
28958      pkgutil)
28959        pkgutil_help $MISSING_DEPENDENCY ;;
28960      pkgadd)
28961        pkgadd_help  $MISSING_DEPENDENCY ;;
28962    esac
28963
28964    if test "x$PKGHANDLER_COMMAND" != x; then
28965      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28966    fi
28967  fi
28968
28969      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28970    fi
28971  fi
28972
28973  # Now we have a compiler binary in CC. Make sure it's okay.
28974
28975  # Only process if variable expands to non-empty
28976
28977  if test "x$CC" != x; then
28978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28979
28980  # First separate the path from the arguments. This will split at the first
28981  # space.
28982  complete="$CC"
28983  path="${complete%% *}"
28984  tmp="$complete EOL"
28985  arguments="${tmp#* }"
28986
28987  # Input might be given as Windows format, start by converting to
28988  # unix format.
28989  new_path=`$CYGPATH -u "$path"`
28990
28991  # Now try to locate executable using which
28992  new_path=`$WHICH "$new_path" 2> /dev/null`
28993  # bat and cmd files are not always considered executable in cygwin causing which
28994  # to not find them
28995  if test "x$new_path" = x \
28996      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28997      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28998    new_path=`$CYGPATH -u "$path"`
28999  fi
29000  if test "x$new_path" = x; then
29001    # Oops. Which didn't find the executable.
29002    # The splitting of arguments from the executable at a space might have been incorrect,
29003    # since paths with space are more likely in Windows. Give it another try with the whole
29004    # argument.
29005    path="$complete"
29006    arguments="EOL"
29007    new_path=`$CYGPATH -u "$path"`
29008    new_path=`$WHICH "$new_path" 2> /dev/null`
29009    # bat and cmd files are not always considered executable in cygwin causing which
29010    # to not find them
29011    if test "x$new_path" = x \
29012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29014      new_path=`$CYGPATH -u "$path"`
29015    fi
29016    if test "x$new_path" = x; then
29017      # It's still not found. Now this is an unrecoverable error.
29018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29019$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29020      has_space=`$ECHO "$complete" | $GREP " "`
29021      if test "x$has_space" != x; then
29022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29024      fi
29025      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29026    fi
29027  fi
29028
29029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29032  # "foo.exe" is OK but "foo" is an error.
29033  #
29034  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29035  # It is also a way to make sure we got the proper file name for the real test later on.
29036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29037  if test "x$test_shortpath" = x; then
29038    # Short path failed, file does not exist as specified.
29039    # Try adding .exe or .cmd
29040    if test -f "${new_path}.exe"; then
29041      input_to_shortpath="${new_path}.exe"
29042    elif test -f "${new_path}.cmd"; then
29043      input_to_shortpath="${new_path}.cmd"
29044    else
29045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29046$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29047      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29048$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29049      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29050    fi
29051  else
29052    input_to_shortpath="$new_path"
29053  fi
29054
29055  # Call helper function which possibly converts this using DOS-style short mode.
29056  # If so, the updated path is stored in $new_path.
29057  new_path="$input_to_shortpath"
29058
29059  input_path="$input_to_shortpath"
29060  # Check if we need to convert this using DOS-style short mode. If the path
29061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29062  # take no chances and rewrite it.
29063  # Note: m4 eats our [], so we need to use [ and ] instead.
29064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29065  if test "x$has_forbidden_chars" != x; then
29066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29070      # Going to short mode and back again did indeed matter. Since short mode is
29071      # case insensitive, let's make it lowercase to improve readability.
29072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29073      # Now convert it back to Unix-style (cygpath)
29074      input_path=`$CYGPATH -u "$shortmode_path"`
29075      new_path="$input_path"
29076    fi
29077  fi
29078
29079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29080  if test "x$test_cygdrive_prefix" = x; then
29081    # As a simple fix, exclude /usr/bin since it's not a real path.
29082    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29084      # a path prefixed by /cygdrive for fixpath to work.
29085      new_path="$CYGWIN_ROOT_PATH$input_path"
29086    fi
29087  fi
29088
29089  # remove trailing .exe if any
29090  new_path="${new_path/%.exe/}"
29091
29092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29093
29094  # First separate the path from the arguments. This will split at the first
29095  # space.
29096  complete="$CC"
29097  path="${complete%% *}"
29098  tmp="$complete EOL"
29099  arguments="${tmp#* }"
29100
29101  # Input might be given as Windows format, start by converting to
29102  # unix format.
29103  new_path="$path"
29104
29105  windows_path="$new_path"
29106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29107    unix_path=`$CYGPATH -u "$windows_path"`
29108    new_path="$unix_path"
29109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29111    new_path="$unix_path"
29112  fi
29113
29114
29115  # Now try to locate executable using which
29116  new_path=`$WHICH "$new_path" 2> /dev/null`
29117
29118  if test "x$new_path" = x; then
29119    # Oops. Which didn't find the executable.
29120    # The splitting of arguments from the executable at a space might have been incorrect,
29121    # since paths with space are more likely in Windows. Give it another try with the whole
29122    # argument.
29123    path="$complete"
29124    arguments="EOL"
29125    new_path="$path"
29126
29127  windows_path="$new_path"
29128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29129    unix_path=`$CYGPATH -u "$windows_path"`
29130    new_path="$unix_path"
29131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29133    new_path="$unix_path"
29134  fi
29135
29136
29137    new_path=`$WHICH "$new_path" 2> /dev/null`
29138    # bat and cmd files are not always considered executable in MSYS causing which
29139    # to not find them
29140    if test "x$new_path" = x \
29141        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29142        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29143      new_path="$path"
29144
29145  windows_path="$new_path"
29146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29147    unix_path=`$CYGPATH -u "$windows_path"`
29148    new_path="$unix_path"
29149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29151    new_path="$unix_path"
29152  fi
29153
29154    fi
29155
29156    if test "x$new_path" = x; then
29157      # It's still not found. Now this is an unrecoverable error.
29158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29159$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29160      has_space=`$ECHO "$complete" | $GREP " "`
29161      if test "x$has_space" != x; then
29162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29164      fi
29165      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29166    fi
29167  fi
29168
29169  # Now new_path has a complete unix path to the binary
29170  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29171    # Keep paths in /bin as-is, but remove trailing .exe if any
29172    new_path="${new_path/%.exe/}"
29173    # Do not save /bin paths to all_fixpath_prefixes!
29174  else
29175    # Not in mixed or Windows style, start by that.
29176    new_path=`cmd //c echo $new_path`
29177
29178  input_path="$new_path"
29179  # Check if we need to convert this using DOS-style short mode. If the path
29180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29181  # take no chances and rewrite it.
29182  # Note: m4 eats our [], so we need to use [ and ] instead.
29183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29184  if test "x$has_forbidden_chars" != x; then
29185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29187  fi
29188
29189    # Output is in $new_path
29190
29191  windows_path="$new_path"
29192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29193    unix_path=`$CYGPATH -u "$windows_path"`
29194    new_path="$unix_path"
29195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29197    new_path="$unix_path"
29198  fi
29199
29200    # remove trailing .exe if any
29201    new_path="${new_path/%.exe/}"
29202
29203    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29204    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29205  fi
29206
29207    else
29208      # We're on a unix platform. Hooray! :)
29209      # First separate the path from the arguments. This will split at the first
29210      # space.
29211      complete="$CC"
29212      path="${complete%% *}"
29213      tmp="$complete EOL"
29214      arguments="${tmp#* }"
29215
29216      # Cannot rely on the command "which" here since it doesn't always work.
29217      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29218      if test -z "$is_absolute_path"; then
29219        # Path to executable is not absolute. Find it.
29220        IFS_save="$IFS"
29221        IFS=:
29222        for p in $PATH; do
29223          if test -f "$p/$path" && test -x "$p/$path"; then
29224            new_path="$p/$path"
29225            break
29226          fi
29227        done
29228        IFS="$IFS_save"
29229      else
29230        # This is an absolute path, we can use it without further modifications.
29231        new_path="$path"
29232      fi
29233
29234      if test "x$new_path" = x; then
29235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29236$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29237        has_space=`$ECHO "$complete" | $GREP " "`
29238        if test "x$has_space" != x; then
29239          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29240$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29241        fi
29242        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29243      fi
29244    fi
29245
29246    # Now join together the path and the arguments once again
29247    if test "x$arguments" != xEOL; then
29248      new_complete="$new_path ${arguments% *}"
29249    else
29250      new_complete="$new_path"
29251    fi
29252
29253    if test "x$complete" != "x$new_complete"; then
29254      CC="$new_complete"
29255      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29256$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29257    fi
29258  fi
29259
29260  TEST_COMPILER="$CC"
29261  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29262  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29263  if test "x$OPENJDK_BUILD_OS" != xaix; then
29264    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29266$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29267
29268  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29269    # Follow a chain of symbolic links. Use readlink
29270    # where it exists, else fall back to horribly
29271    # complicated shell code.
29272    if test "x$READLINK_TESTED" != yes; then
29273      # On MacOSX there is a readlink tool with a different
29274      # purpose than the GNU readlink tool. Check the found readlink.
29275      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29276      if test "x$ISGNU" = x; then
29277        # A readlink that we do not know how to use.
29278        # Are there other non-GNU readlinks out there?
29279        READLINK_TESTED=yes
29280        READLINK=
29281      fi
29282    fi
29283
29284    if test "x$READLINK" != x; then
29285      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29286    else
29287      # Save the current directory for restoring afterwards
29288      STARTDIR=$PWD
29289      COUNTER=0
29290      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29291      sym_link_file=`$BASENAME $TEST_COMPILER`
29292      cd $sym_link_dir
29293      # Use -P flag to resolve symlinks in directories.
29294      cd `$THEPWDCMD -P`
29295      sym_link_dir=`$THEPWDCMD -P`
29296      # Resolve file symlinks
29297      while test $COUNTER -lt 20; do
29298        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29299        if test "x$ISLINK" == x; then
29300          # This is not a symbolic link! We are done!
29301          break
29302        fi
29303        # Again resolve directory symlinks since the target of the just found
29304        # link could be in a different directory
29305        cd `$DIRNAME $ISLINK`
29306        sym_link_dir=`$THEPWDCMD -P`
29307        sym_link_file=`$BASENAME $ISLINK`
29308        let COUNTER=COUNTER+1
29309      done
29310      cd $STARTDIR
29311      TEST_COMPILER=$sym_link_dir/$sym_link_file
29312    fi
29313  fi
29314
29315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29316$as_echo "$TEST_COMPILER" >&6; }
29317  fi
29318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29319$as_echo_n "checking if CC is disguised ccache... " >&6; }
29320
29321  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29322  if test "x$COMPILER_BASENAME" = "xccache"; then
29323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29324$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29325    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29326    # We want to control ccache invocation ourselves, so ignore this cc and try
29327    # searching again.
29328
29329    # Remove the path to the fake ccache cc from the PATH
29330    RETRY_COMPILER_SAVED_PATH="$PATH"
29331    COMPILER_DIRNAME=`$DIRNAME $CC`
29332    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29333
29334    # Try again looking for our compiler
29335    if test -n "$ac_tool_prefix"; then
29336  for ac_prog in $TOOLCHAIN_CC_BINARY
29337  do
29338    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29339set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29341$as_echo_n "checking for $ac_word... " >&6; }
29342if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29343  $as_echo_n "(cached) " >&6
29344else
29345  if test -n "$PROPER_COMPILER_CC"; then
29346  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29347else
29348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29349for as_dir in $PATH
29350do
29351  IFS=$as_save_IFS
29352  test -z "$as_dir" && as_dir=.
29353    for ac_exec_ext in '' $ac_executable_extensions; do
29354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29355    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29357    break 2
29358  fi
29359done
29360  done
29361IFS=$as_save_IFS
29362
29363fi
29364fi
29365PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29366if test -n "$PROPER_COMPILER_CC"; then
29367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29368$as_echo "$PROPER_COMPILER_CC" >&6; }
29369else
29370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29371$as_echo "no" >&6; }
29372fi
29373
29374
29375    test -n "$PROPER_COMPILER_CC" && break
29376  done
29377fi
29378if test -z "$PROPER_COMPILER_CC"; then
29379  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29380  for ac_prog in $TOOLCHAIN_CC_BINARY
29381do
29382  # Extract the first word of "$ac_prog", so it can be a program name with args.
29383set dummy $ac_prog; ac_word=$2
29384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29385$as_echo_n "checking for $ac_word... " >&6; }
29386if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29387  $as_echo_n "(cached) " >&6
29388else
29389  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29390  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29391else
29392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29393for as_dir in $PATH
29394do
29395  IFS=$as_save_IFS
29396  test -z "$as_dir" && as_dir=.
29397    for ac_exec_ext in '' $ac_executable_extensions; do
29398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29399    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29401    break 2
29402  fi
29403done
29404  done
29405IFS=$as_save_IFS
29406
29407fi
29408fi
29409ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29410if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29412$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29413else
29414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29415$as_echo "no" >&6; }
29416fi
29417
29418
29419  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29420done
29421
29422  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29423    PROPER_COMPILER_CC=""
29424  else
29425    case $cross_compiling:$ac_tool_warned in
29426yes:)
29427{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29428$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29429ac_tool_warned=yes ;;
29430esac
29431    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29432  fi
29433fi
29434
29435
29436  # Only process if variable expands to non-empty
29437
29438  if test "x$PROPER_COMPILER_CC" != x; then
29439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29440
29441  # First separate the path from the arguments. This will split at the first
29442  # space.
29443  complete="$PROPER_COMPILER_CC"
29444  path="${complete%% *}"
29445  tmp="$complete EOL"
29446  arguments="${tmp#* }"
29447
29448  # Input might be given as Windows format, start by converting to
29449  # unix format.
29450  new_path=`$CYGPATH -u "$path"`
29451
29452  # Now try to locate executable using which
29453  new_path=`$WHICH "$new_path" 2> /dev/null`
29454  # bat and cmd files are not always considered executable in cygwin causing which
29455  # to not find them
29456  if test "x$new_path" = x \
29457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29459    new_path=`$CYGPATH -u "$path"`
29460  fi
29461  if test "x$new_path" = x; then
29462    # Oops. Which didn't find the executable.
29463    # The splitting of arguments from the executable at a space might have been incorrect,
29464    # since paths with space are more likely in Windows. Give it another try with the whole
29465    # argument.
29466    path="$complete"
29467    arguments="EOL"
29468    new_path=`$CYGPATH -u "$path"`
29469    new_path=`$WHICH "$new_path" 2> /dev/null`
29470    # bat and cmd files are not always considered executable in cygwin causing which
29471    # to not find them
29472    if test "x$new_path" = x \
29473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29475      new_path=`$CYGPATH -u "$path"`
29476    fi
29477    if test "x$new_path" = x; then
29478      # It's still not found. Now this is an unrecoverable error.
29479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29480$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29481      has_space=`$ECHO "$complete" | $GREP " "`
29482      if test "x$has_space" != x; then
29483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29485      fi
29486      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29487    fi
29488  fi
29489
29490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29493  # "foo.exe" is OK but "foo" is an error.
29494  #
29495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29496  # It is also a way to make sure we got the proper file name for the real test later on.
29497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29498  if test "x$test_shortpath" = x; then
29499    # Short path failed, file does not exist as specified.
29500    # Try adding .exe or .cmd
29501    if test -f "${new_path}.exe"; then
29502      input_to_shortpath="${new_path}.exe"
29503    elif test -f "${new_path}.cmd"; then
29504      input_to_shortpath="${new_path}.cmd"
29505    else
29506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29507$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29510      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29511    fi
29512  else
29513    input_to_shortpath="$new_path"
29514  fi
29515
29516  # Call helper function which possibly converts this using DOS-style short mode.
29517  # If so, the updated path is stored in $new_path.
29518  new_path="$input_to_shortpath"
29519
29520  input_path="$input_to_shortpath"
29521  # Check if we need to convert this using DOS-style short mode. If the path
29522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29523  # take no chances and rewrite it.
29524  # Note: m4 eats our [], so we need to use [ and ] instead.
29525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29526  if test "x$has_forbidden_chars" != x; then
29527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29531      # Going to short mode and back again did indeed matter. Since short mode is
29532      # case insensitive, let's make it lowercase to improve readability.
29533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29534      # Now convert it back to Unix-style (cygpath)
29535      input_path=`$CYGPATH -u "$shortmode_path"`
29536      new_path="$input_path"
29537    fi
29538  fi
29539
29540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29541  if test "x$test_cygdrive_prefix" = x; then
29542    # As a simple fix, exclude /usr/bin since it's not a real path.
29543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29545      # a path prefixed by /cygdrive for fixpath to work.
29546      new_path="$CYGWIN_ROOT_PATH$input_path"
29547    fi
29548  fi
29549
29550  # remove trailing .exe if any
29551  new_path="${new_path/%.exe/}"
29552
29553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29554
29555  # First separate the path from the arguments. This will split at the first
29556  # space.
29557  complete="$PROPER_COMPILER_CC"
29558  path="${complete%% *}"
29559  tmp="$complete EOL"
29560  arguments="${tmp#* }"
29561
29562  # Input might be given as Windows format, start by converting to
29563  # unix format.
29564  new_path="$path"
29565
29566  windows_path="$new_path"
29567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29568    unix_path=`$CYGPATH -u "$windows_path"`
29569    new_path="$unix_path"
29570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29572    new_path="$unix_path"
29573  fi
29574
29575
29576  # Now try to locate executable using which
29577  new_path=`$WHICH "$new_path" 2> /dev/null`
29578
29579  if test "x$new_path" = x; then
29580    # Oops. Which didn't find the executable.
29581    # The splitting of arguments from the executable at a space might have been incorrect,
29582    # since paths with space are more likely in Windows. Give it another try with the whole
29583    # argument.
29584    path="$complete"
29585    arguments="EOL"
29586    new_path="$path"
29587
29588  windows_path="$new_path"
29589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29590    unix_path=`$CYGPATH -u "$windows_path"`
29591    new_path="$unix_path"
29592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29594    new_path="$unix_path"
29595  fi
29596
29597
29598    new_path=`$WHICH "$new_path" 2> /dev/null`
29599    # bat and cmd files are not always considered executable in MSYS causing which
29600    # to not find them
29601    if test "x$new_path" = x \
29602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29604      new_path="$path"
29605
29606  windows_path="$new_path"
29607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29608    unix_path=`$CYGPATH -u "$windows_path"`
29609    new_path="$unix_path"
29610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29612    new_path="$unix_path"
29613  fi
29614
29615    fi
29616
29617    if test "x$new_path" = x; then
29618      # It's still not found. Now this is an unrecoverable error.
29619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29620$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29621      has_space=`$ECHO "$complete" | $GREP " "`
29622      if test "x$has_space" != x; then
29623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29625      fi
29626      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29627    fi
29628  fi
29629
29630  # Now new_path has a complete unix path to the binary
29631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29632    # Keep paths in /bin as-is, but remove trailing .exe if any
29633    new_path="${new_path/%.exe/}"
29634    # Do not save /bin paths to all_fixpath_prefixes!
29635  else
29636    # Not in mixed or Windows style, start by that.
29637    new_path=`cmd //c echo $new_path`
29638
29639  input_path="$new_path"
29640  # Check if we need to convert this using DOS-style short mode. If the path
29641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29642  # take no chances and rewrite it.
29643  # Note: m4 eats our [], so we need to use [ and ] instead.
29644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29645  if test "x$has_forbidden_chars" != x; then
29646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29648  fi
29649
29650    # Output is in $new_path
29651
29652  windows_path="$new_path"
29653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29654    unix_path=`$CYGPATH -u "$windows_path"`
29655    new_path="$unix_path"
29656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29658    new_path="$unix_path"
29659  fi
29660
29661    # remove trailing .exe if any
29662    new_path="${new_path/%.exe/}"
29663
29664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29666  fi
29667
29668    else
29669      # We're on a unix platform. Hooray! :)
29670      # First separate the path from the arguments. This will split at the first
29671      # space.
29672      complete="$PROPER_COMPILER_CC"
29673      path="${complete%% *}"
29674      tmp="$complete EOL"
29675      arguments="${tmp#* }"
29676
29677      # Cannot rely on the command "which" here since it doesn't always work.
29678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29679      if test -z "$is_absolute_path"; then
29680        # Path to executable is not absolute. Find it.
29681        IFS_save="$IFS"
29682        IFS=:
29683        for p in $PATH; do
29684          if test -f "$p/$path" && test -x "$p/$path"; then
29685            new_path="$p/$path"
29686            break
29687          fi
29688        done
29689        IFS="$IFS_save"
29690      else
29691        # This is an absolute path, we can use it without further modifications.
29692        new_path="$path"
29693      fi
29694
29695      if test "x$new_path" = x; then
29696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29697$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29698        has_space=`$ECHO "$complete" | $GREP " "`
29699        if test "x$has_space" != x; then
29700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29702        fi
29703        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29704      fi
29705    fi
29706
29707    # Now join together the path and the arguments once again
29708    if test "x$arguments" != xEOL; then
29709      new_complete="$new_path ${arguments% *}"
29710    else
29711      new_complete="$new_path"
29712    fi
29713
29714    if test "x$complete" != "x$new_complete"; then
29715      PROPER_COMPILER_CC="$new_complete"
29716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29717$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29718    fi
29719  fi
29720
29721    PATH="$RETRY_COMPILER_SAVED_PATH"
29722
29723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29724$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29725
29726  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29727    # Follow a chain of symbolic links. Use readlink
29728    # where it exists, else fall back to horribly
29729    # complicated shell code.
29730    if test "x$READLINK_TESTED" != yes; then
29731      # On MacOSX there is a readlink tool with a different
29732      # purpose than the GNU readlink tool. Check the found readlink.
29733      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29734      if test "x$ISGNU" = x; then
29735        # A readlink that we do not know how to use.
29736        # Are there other non-GNU readlinks out there?
29737        READLINK_TESTED=yes
29738        READLINK=
29739      fi
29740    fi
29741
29742    if test "x$READLINK" != x; then
29743      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29744    else
29745      # Save the current directory for restoring afterwards
29746      STARTDIR=$PWD
29747      COUNTER=0
29748      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29749      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29750      cd $sym_link_dir
29751      # Use -P flag to resolve symlinks in directories.
29752      cd `$THEPWDCMD -P`
29753      sym_link_dir=`$THEPWDCMD -P`
29754      # Resolve file symlinks
29755      while test $COUNTER -lt 20; do
29756        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29757        if test "x$ISLINK" == x; then
29758          # This is not a symbolic link! We are done!
29759          break
29760        fi
29761        # Again resolve directory symlinks since the target of the just found
29762        # link could be in a different directory
29763        cd `$DIRNAME $ISLINK`
29764        sym_link_dir=`$THEPWDCMD -P`
29765        sym_link_file=`$BASENAME $ISLINK`
29766        let COUNTER=COUNTER+1
29767      done
29768      cd $STARTDIR
29769      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29770    fi
29771  fi
29772
29773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29774$as_echo "$PROPER_COMPILER_CC" >&6; }
29775    CC="$PROPER_COMPILER_CC"
29776  else
29777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29778$as_echo "no, keeping CC" >&6; }
29779  fi
29780
29781
29782  COMPILER=$CC
29783  COMPILER_NAME=$COMPILER_NAME
29784
29785  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29786    # cc -V output typically looks like
29787    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29788    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29789    # Check that this is likely to be the Solaris Studio cc.
29790    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29791    if test $? -ne 0; then
29792      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29793      { $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
29794$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29795      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29796$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29797      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29798$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29799      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29800    fi
29801    # Remove usage instructions (if present), and
29802    # collapse compiler output into a single line
29803    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29804        $SED -e 's/ *[Uu]sage:.*//'`
29805    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29806        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29807  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29808    # xlc -qversion output typically looks like
29809    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29810    #     Version: 11.01.0000.0015
29811    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29812    # Check that this is likely to be the IBM XL C compiler.
29813    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29814    if test $? -ne 0; then
29815      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29816      { $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
29817$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29818      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29819$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29820      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29821$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29822      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29823    fi
29824    # Collapse compiler output into a single line
29825    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29826    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29827        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29828  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29829    # There is no specific version flag, but all output starts with a version string.
29830    # First line typically looks something like:
29831    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29832    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29833    # Check that this is likely to be Microsoft CL.EXE.
29834    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29835    if test $? -ne 0; then
29836      { $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
29837$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29838      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29839$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29840      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29841    fi
29842    # Collapse compiler output into a single line
29843    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29844    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29845        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29846  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29847    # gcc --version output typically looks like
29848    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29849    #     Copyright (C) 2013 Free Software Foundation, Inc.
29850    #     This is free software; see the source for copying conditions.  There is NO
29851    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29852    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29853    # Check that this is likely to be GCC.
29854    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29855    if test $? -ne 0; then
29856      { $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
29857$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29858      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29859$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29860      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29861    fi
29862    # Remove Copyright and legalese from version string, and
29863    # collapse into a single line
29864    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29865        $SED -e 's/ *Copyright .*//'`
29866    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29867        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29868  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29869    # clang --version output typically looks like
29870    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29871    #    clang version 3.3 (tags/RELEASE_33/final)
29872    # or
29873    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29874    #    Target: x86_64-pc-linux-gnu
29875    #    Thread model: posix
29876    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29877    # Check that this is likely to be clang
29878    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29879    if test $? -ne 0; then
29880      { $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
29881$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29882      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29883$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29884      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29885    fi
29886    # Collapse compiler output into a single line
29887    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29888    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29889        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29890  else
29891      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29892  fi
29893  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29894  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29895  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29896  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29897
29898  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29899$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29900
29901
29902  # Now that we have resolved CC ourself, let autoconf have its go at it
29903  ac_ext=c
29904ac_cpp='$CPP $CPPFLAGS'
29905ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29906ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29907ac_compiler_gnu=$ac_cv_c_compiler_gnu
29908if test -n "$ac_tool_prefix"; then
29909  for ac_prog in $CC
29910  do
29911    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29912set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29914$as_echo_n "checking for $ac_word... " >&6; }
29915if ${ac_cv_prog_CC+:} false; then :
29916  $as_echo_n "(cached) " >&6
29917else
29918  if test -n "$CC"; then
29919  ac_cv_prog_CC="$CC" # Let the user override the test.
29920else
29921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29922for as_dir in $PATH
29923do
29924  IFS=$as_save_IFS
29925  test -z "$as_dir" && as_dir=.
29926    for ac_exec_ext in '' $ac_executable_extensions; do
29927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29928    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29930    break 2
29931  fi
29932done
29933  done
29934IFS=$as_save_IFS
29935
29936fi
29937fi
29938CC=$ac_cv_prog_CC
29939if test -n "$CC"; then
29940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29941$as_echo "$CC" >&6; }
29942else
29943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29944$as_echo "no" >&6; }
29945fi
29946
29947
29948    test -n "$CC" && break
29949  done
29950fi
29951if test -z "$CC"; then
29952  ac_ct_CC=$CC
29953  for ac_prog in $CC
29954do
29955  # Extract the first word of "$ac_prog", so it can be a program name with args.
29956set dummy $ac_prog; ac_word=$2
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29958$as_echo_n "checking for $ac_word... " >&6; }
29959if ${ac_cv_prog_ac_ct_CC+:} false; then :
29960  $as_echo_n "(cached) " >&6
29961else
29962  if test -n "$ac_ct_CC"; then
29963  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29964else
29965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29966for as_dir in $PATH
29967do
29968  IFS=$as_save_IFS
29969  test -z "$as_dir" && as_dir=.
29970    for ac_exec_ext in '' $ac_executable_extensions; do
29971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29972    ac_cv_prog_ac_ct_CC="$ac_prog"
29973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29974    break 2
29975  fi
29976done
29977  done
29978IFS=$as_save_IFS
29979
29980fi
29981fi
29982ac_ct_CC=$ac_cv_prog_ac_ct_CC
29983if test -n "$ac_ct_CC"; then
29984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29985$as_echo "$ac_ct_CC" >&6; }
29986else
29987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29988$as_echo "no" >&6; }
29989fi
29990
29991
29992  test -n "$ac_ct_CC" && break
29993done
29994
29995  if test "x$ac_ct_CC" = x; then
29996    CC=""
29997  else
29998    case $cross_compiling:$ac_tool_warned in
29999yes:)
30000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30002ac_tool_warned=yes ;;
30003esac
30004    CC=$ac_ct_CC
30005  fi
30006fi
30007
30008
30009test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30011as_fn_error $? "no acceptable C compiler found in \$PATH
30012See \`config.log' for more details" "$LINENO" 5; }
30013
30014# Provide some information about the compiler.
30015$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30016set X $ac_compile
30017ac_compiler=$2
30018for ac_option in --version -v -V -qversion; do
30019  { { ac_try="$ac_compiler $ac_option >&5"
30020case "(($ac_try" in
30021  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30022  *) ac_try_echo=$ac_try;;
30023esac
30024eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30025$as_echo "$ac_try_echo"; } >&5
30026  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30027  ac_status=$?
30028  if test -s conftest.err; then
30029    sed '10a\
30030... rest of stderr output deleted ...
30031         10q' conftest.err >conftest.er1
30032    cat conftest.er1 >&5
30033  fi
30034  rm -f conftest.er1 conftest.err
30035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30036  test $ac_status = 0; }
30037done
30038
30039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30040/* end confdefs.h.  */
30041
30042int
30043main ()
30044{
30045
30046  ;
30047  return 0;
30048}
30049_ACEOF
30050ac_clean_files_save=$ac_clean_files
30051ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30052# Try to create an executable without -o first, disregard a.out.
30053# It will help us diagnose broken compilers, and finding out an intuition
30054# of exeext.
30055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30056$as_echo_n "checking whether the C compiler works... " >&6; }
30057ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30058
30059# The possible output files:
30060ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30061
30062ac_rmfiles=
30063for ac_file in $ac_files
30064do
30065  case $ac_file in
30066    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30067    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30068  esac
30069done
30070rm -f $ac_rmfiles
30071
30072if { { ac_try="$ac_link_default"
30073case "(($ac_try" in
30074  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30075  *) ac_try_echo=$ac_try;;
30076esac
30077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30078$as_echo "$ac_try_echo"; } >&5
30079  (eval "$ac_link_default") 2>&5
30080  ac_status=$?
30081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30082  test $ac_status = 0; }; then :
30083  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30084# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30085# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30086# so that the user can short-circuit this test for compilers unknown to
30087# Autoconf.
30088for ac_file in $ac_files ''
30089do
30090  test -f "$ac_file" || continue
30091  case $ac_file in
30092    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30093	;;
30094    [ab].out )
30095	# We found the default executable, but exeext='' is most
30096	# certainly right.
30097	break;;
30098    *.* )
30099	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30100	then :; else
30101	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30102	fi
30103	# We set ac_cv_exeext here because the later test for it is not
30104	# safe: cross compilers may not add the suffix if given an `-o'
30105	# argument, so we may need to know it at that point already.
30106	# Even if this section looks crufty: it has the advantage of
30107	# actually working.
30108	break;;
30109    * )
30110	break;;
30111  esac
30112done
30113test "$ac_cv_exeext" = no && ac_cv_exeext=
30114
30115else
30116  ac_file=''
30117fi
30118if test -z "$ac_file"; then :
30119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30120$as_echo "no" >&6; }
30121$as_echo "$as_me: failed program was:" >&5
30122sed 's/^/| /' conftest.$ac_ext >&5
30123
30124{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30126as_fn_error 77 "C compiler cannot create executables
30127See \`config.log' for more details" "$LINENO" 5; }
30128else
30129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30130$as_echo "yes" >&6; }
30131fi
30132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30133$as_echo_n "checking for C compiler default output file name... " >&6; }
30134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30135$as_echo "$ac_file" >&6; }
30136ac_exeext=$ac_cv_exeext
30137
30138rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30139ac_clean_files=$ac_clean_files_save
30140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30141$as_echo_n "checking for suffix of executables... " >&6; }
30142if { { ac_try="$ac_link"
30143case "(($ac_try" in
30144  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30145  *) ac_try_echo=$ac_try;;
30146esac
30147eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30148$as_echo "$ac_try_echo"; } >&5
30149  (eval "$ac_link") 2>&5
30150  ac_status=$?
30151  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30152  test $ac_status = 0; }; then :
30153  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30154# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30155# work properly (i.e., refer to `conftest.exe'), while it won't with
30156# `rm'.
30157for ac_file in conftest.exe conftest conftest.*; do
30158  test -f "$ac_file" || continue
30159  case $ac_file in
30160    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30161    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30162	  break;;
30163    * ) break;;
30164  esac
30165done
30166else
30167  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30169as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30170See \`config.log' for more details" "$LINENO" 5; }
30171fi
30172rm -f conftest conftest$ac_cv_exeext
30173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30174$as_echo "$ac_cv_exeext" >&6; }
30175
30176rm -f conftest.$ac_ext
30177EXEEXT=$ac_cv_exeext
30178ac_exeext=$EXEEXT
30179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30180/* end confdefs.h.  */
30181#include <stdio.h>
30182int
30183main ()
30184{
30185FILE *f = fopen ("conftest.out", "w");
30186 return ferror (f) || fclose (f) != 0;
30187
30188  ;
30189  return 0;
30190}
30191_ACEOF
30192ac_clean_files="$ac_clean_files conftest.out"
30193# Check that the compiler produces executables we can run.  If not, either
30194# the compiler is broken, or we cross compile.
30195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30196$as_echo_n "checking whether we are cross compiling... " >&6; }
30197if test "$cross_compiling" != yes; then
30198  { { ac_try="$ac_link"
30199case "(($ac_try" in
30200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30201  *) ac_try_echo=$ac_try;;
30202esac
30203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30204$as_echo "$ac_try_echo"; } >&5
30205  (eval "$ac_link") 2>&5
30206  ac_status=$?
30207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30208  test $ac_status = 0; }
30209  if { ac_try='./conftest$ac_cv_exeext'
30210  { { case "(($ac_try" in
30211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30212  *) ac_try_echo=$ac_try;;
30213esac
30214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30215$as_echo "$ac_try_echo"; } >&5
30216  (eval "$ac_try") 2>&5
30217  ac_status=$?
30218  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30219  test $ac_status = 0; }; }; then
30220    cross_compiling=no
30221  else
30222    if test "$cross_compiling" = maybe; then
30223	cross_compiling=yes
30224    else
30225	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30227as_fn_error $? "cannot run C compiled programs.
30228If you meant to cross compile, use \`--host'.
30229See \`config.log' for more details" "$LINENO" 5; }
30230    fi
30231  fi
30232fi
30233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30234$as_echo "$cross_compiling" >&6; }
30235
30236rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30237ac_clean_files=$ac_clean_files_save
30238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30239$as_echo_n "checking for suffix of object files... " >&6; }
30240if ${ac_cv_objext+:} false; then :
30241  $as_echo_n "(cached) " >&6
30242else
30243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30244/* end confdefs.h.  */
30245
30246int
30247main ()
30248{
30249
30250  ;
30251  return 0;
30252}
30253_ACEOF
30254rm -f conftest.o conftest.obj
30255if { { ac_try="$ac_compile"
30256case "(($ac_try" in
30257  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30258  *) ac_try_echo=$ac_try;;
30259esac
30260eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30261$as_echo "$ac_try_echo"; } >&5
30262  (eval "$ac_compile") 2>&5
30263  ac_status=$?
30264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30265  test $ac_status = 0; }; then :
30266  for ac_file in conftest.o conftest.obj conftest.*; do
30267  test -f "$ac_file" || continue;
30268  case $ac_file in
30269    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30270    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30271       break;;
30272  esac
30273done
30274else
30275  $as_echo "$as_me: failed program was:" >&5
30276sed 's/^/| /' conftest.$ac_ext >&5
30277
30278{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30280as_fn_error $? "cannot compute suffix of object files: cannot compile
30281See \`config.log' for more details" "$LINENO" 5; }
30282fi
30283rm -f conftest.$ac_cv_objext conftest.$ac_ext
30284fi
30285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30286$as_echo "$ac_cv_objext" >&6; }
30287OBJEXT=$ac_cv_objext
30288ac_objext=$OBJEXT
30289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30290$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30291if ${ac_cv_c_compiler_gnu+:} false; then :
30292  $as_echo_n "(cached) " >&6
30293else
30294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30295/* end confdefs.h.  */
30296
30297int
30298main ()
30299{
30300#ifndef __GNUC__
30301       choke me
30302#endif
30303
30304  ;
30305  return 0;
30306}
30307_ACEOF
30308if ac_fn_c_try_compile "$LINENO"; then :
30309  ac_compiler_gnu=yes
30310else
30311  ac_compiler_gnu=no
30312fi
30313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30314ac_cv_c_compiler_gnu=$ac_compiler_gnu
30315
30316fi
30317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30318$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30319if test $ac_compiler_gnu = yes; then
30320  GCC=yes
30321else
30322  GCC=
30323fi
30324ac_test_CFLAGS=${CFLAGS+set}
30325ac_save_CFLAGS=$CFLAGS
30326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30327$as_echo_n "checking whether $CC accepts -g... " >&6; }
30328if ${ac_cv_prog_cc_g+:} false; then :
30329  $as_echo_n "(cached) " >&6
30330else
30331  ac_save_c_werror_flag=$ac_c_werror_flag
30332   ac_c_werror_flag=yes
30333   ac_cv_prog_cc_g=no
30334   CFLAGS="-g"
30335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30336/* end confdefs.h.  */
30337
30338int
30339main ()
30340{
30341
30342  ;
30343  return 0;
30344}
30345_ACEOF
30346if ac_fn_c_try_compile "$LINENO"; then :
30347  ac_cv_prog_cc_g=yes
30348else
30349  CFLAGS=""
30350      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30351/* end confdefs.h.  */
30352
30353int
30354main ()
30355{
30356
30357  ;
30358  return 0;
30359}
30360_ACEOF
30361if ac_fn_c_try_compile "$LINENO"; then :
30362
30363else
30364  ac_c_werror_flag=$ac_save_c_werror_flag
30365	 CFLAGS="-g"
30366	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30367/* end confdefs.h.  */
30368
30369int
30370main ()
30371{
30372
30373  ;
30374  return 0;
30375}
30376_ACEOF
30377if ac_fn_c_try_compile "$LINENO"; then :
30378  ac_cv_prog_cc_g=yes
30379fi
30380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30381fi
30382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30383fi
30384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30385   ac_c_werror_flag=$ac_save_c_werror_flag
30386fi
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30388$as_echo "$ac_cv_prog_cc_g" >&6; }
30389if test "$ac_test_CFLAGS" = set; then
30390  CFLAGS=$ac_save_CFLAGS
30391elif test $ac_cv_prog_cc_g = yes; then
30392  if test "$GCC" = yes; then
30393    CFLAGS="-g -O2"
30394  else
30395    CFLAGS="-g"
30396  fi
30397else
30398  if test "$GCC" = yes; then
30399    CFLAGS="-O2"
30400  else
30401    CFLAGS=
30402  fi
30403fi
30404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30405$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30406if ${ac_cv_prog_cc_c89+:} false; then :
30407  $as_echo_n "(cached) " >&6
30408else
30409  ac_cv_prog_cc_c89=no
30410ac_save_CC=$CC
30411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30412/* end confdefs.h.  */
30413#include <stdarg.h>
30414#include <stdio.h>
30415struct stat;
30416/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30417struct buf { int x; };
30418FILE * (*rcsopen) (struct buf *, struct stat *, int);
30419static char *e (p, i)
30420     char **p;
30421     int i;
30422{
30423  return p[i];
30424}
30425static char *f (char * (*g) (char **, int), char **p, ...)
30426{
30427  char *s;
30428  va_list v;
30429  va_start (v,p);
30430  s = g (p, va_arg (v,int));
30431  va_end (v);
30432  return s;
30433}
30434
30435/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30436   function prototypes and stuff, but not '\xHH' hex character constants.
30437   These don't provoke an error unfortunately, instead are silently treated
30438   as 'x'.  The following induces an error, until -std is added to get
30439   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30440   array size at least.  It's necessary to write '\x00'==0 to get something
30441   that's true only with -std.  */
30442int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30443
30444/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30445   inside strings and character constants.  */
30446#define FOO(x) 'x'
30447int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30448
30449int test (int i, double x);
30450struct s1 {int (*f) (int a);};
30451struct s2 {int (*f) (double a);};
30452int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30453int argc;
30454char **argv;
30455int
30456main ()
30457{
30458return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30459  ;
30460  return 0;
30461}
30462_ACEOF
30463for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30464	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30465do
30466  CC="$ac_save_CC $ac_arg"
30467  if ac_fn_c_try_compile "$LINENO"; then :
30468  ac_cv_prog_cc_c89=$ac_arg
30469fi
30470rm -f core conftest.err conftest.$ac_objext
30471  test "x$ac_cv_prog_cc_c89" != "xno" && break
30472done
30473rm -f conftest.$ac_ext
30474CC=$ac_save_CC
30475
30476fi
30477# AC_CACHE_VAL
30478case "x$ac_cv_prog_cc_c89" in
30479  x)
30480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30481$as_echo "none needed" >&6; } ;;
30482  xno)
30483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30484$as_echo "unsupported" >&6; } ;;
30485  *)
30486    CC="$CC $ac_cv_prog_cc_c89"
30487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30488$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30489esac
30490if test "x$ac_cv_prog_cc_c89" != xno; then :
30491
30492fi
30493
30494ac_ext=cpp
30495ac_cpp='$CXXCPP $CPPFLAGS'
30496ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30497ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30498ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30499
30500
30501
30502  COMPILER_NAME=C++
30503  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30504
30505  if test "x$CXX" != x; then
30506    # User has supplied compiler name already, always let that override.
30507    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30508$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30509    if test "x`basename $CXX`" = "x$CXX"; then
30510      # A command without a complete path is provided, search $PATH.
30511
30512      for ac_prog in $CXX
30513do
30514  # Extract the first word of "$ac_prog", so it can be a program name with args.
30515set dummy $ac_prog; ac_word=$2
30516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30517$as_echo_n "checking for $ac_word... " >&6; }
30518if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30519  $as_echo_n "(cached) " >&6
30520else
30521  case $POTENTIAL_CXX in
30522  [\\/]* | ?:[\\/]*)
30523  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30524  ;;
30525  *)
30526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30527for as_dir in $PATH
30528do
30529  IFS=$as_save_IFS
30530  test -z "$as_dir" && as_dir=.
30531    for ac_exec_ext in '' $ac_executable_extensions; do
30532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30533    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30535    break 2
30536  fi
30537done
30538  done
30539IFS=$as_save_IFS
30540
30541  ;;
30542esac
30543fi
30544POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30545if test -n "$POTENTIAL_CXX"; then
30546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30547$as_echo "$POTENTIAL_CXX" >&6; }
30548else
30549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30550$as_echo "no" >&6; }
30551fi
30552
30553
30554  test -n "$POTENTIAL_CXX" && break
30555done
30556
30557      if test "x$POTENTIAL_CXX" != x; then
30558        CXX=$POTENTIAL_CXX
30559      else
30560        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30561      fi
30562    else
30563      # Otherwise it might already be a complete path
30564      if test ! -x "$CXX"; then
30565        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30566      fi
30567    fi
30568  else
30569    # No user supplied value. Locate compiler ourselves.
30570
30571    # If we are cross compiling, assume cross compilation tools follows the
30572    # cross compilation standard where they are prefixed with the autoconf
30573    # standard name for the target. For example the binary
30574    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30575    # If we are not cross compiling, then the default compiler name will be
30576    # used.
30577
30578    CXX=
30579    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30580    # before checking the rest of the PATH.
30581    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30582    # step, this should not be necessary.
30583    if test -n "$TOOLCHAIN_PATH"; then
30584      PATH_save="$PATH"
30585      PATH="$TOOLCHAIN_PATH"
30586      for ac_prog in $SEARCH_LIST
30587do
30588  # Extract the first word of "$ac_prog", so it can be a program name with args.
30589set dummy $ac_prog; ac_word=$2
30590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30591$as_echo_n "checking for $ac_word... " >&6; }
30592if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30593  $as_echo_n "(cached) " >&6
30594else
30595  case $TOOLCHAIN_PATH_CXX in
30596  [\\/]* | ?:[\\/]*)
30597  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30598  ;;
30599  *)
30600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30601for as_dir in $PATH
30602do
30603  IFS=$as_save_IFS
30604  test -z "$as_dir" && as_dir=.
30605    for ac_exec_ext in '' $ac_executable_extensions; do
30606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30607    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30609    break 2
30610  fi
30611done
30612  done
30613IFS=$as_save_IFS
30614
30615  ;;
30616esac
30617fi
30618TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30619if test -n "$TOOLCHAIN_PATH_CXX"; then
30620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30621$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30622else
30623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30624$as_echo "no" >&6; }
30625fi
30626
30627
30628  test -n "$TOOLCHAIN_PATH_CXX" && break
30629done
30630
30631      CXX=$TOOLCHAIN_PATH_CXX
30632      PATH="$PATH_save"
30633    fi
30634
30635    # AC_PATH_PROGS can't be run multiple times with the same variable,
30636    # so create a new name for this run.
30637    if test "x$CXX" = x; then
30638      for ac_prog in $SEARCH_LIST
30639do
30640  # Extract the first word of "$ac_prog", so it can be a program name with args.
30641set dummy $ac_prog; ac_word=$2
30642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30643$as_echo_n "checking for $ac_word... " >&6; }
30644if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30645  $as_echo_n "(cached) " >&6
30646else
30647  case $POTENTIAL_CXX in
30648  [\\/]* | ?:[\\/]*)
30649  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30650  ;;
30651  *)
30652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30653for as_dir in $PATH
30654do
30655  IFS=$as_save_IFS
30656  test -z "$as_dir" && as_dir=.
30657    for ac_exec_ext in '' $ac_executable_extensions; do
30658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30659    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30661    break 2
30662  fi
30663done
30664  done
30665IFS=$as_save_IFS
30666
30667  ;;
30668esac
30669fi
30670POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30671if test -n "$POTENTIAL_CXX"; then
30672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30673$as_echo "$POTENTIAL_CXX" >&6; }
30674else
30675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30676$as_echo "no" >&6; }
30677fi
30678
30679
30680  test -n "$POTENTIAL_CXX" && break
30681done
30682
30683      CXX=$POTENTIAL_CXX
30684    fi
30685
30686    if test "x$CXX" = x; then
30687
30688  # Print a helpful message on how to acquire the necessary build dependency.
30689  # devkit is the help tag: freetype, cups, pulse, alsa etc
30690  MISSING_DEPENDENCY=devkit
30691
30692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30693    cygwin_help $MISSING_DEPENDENCY
30694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30695    msys_help $MISSING_DEPENDENCY
30696  else
30697    PKGHANDLER_COMMAND=
30698
30699    case $PKGHANDLER in
30700      apt-get)
30701        apt_help     $MISSING_DEPENDENCY ;;
30702      yum)
30703        yum_help     $MISSING_DEPENDENCY ;;
30704      port)
30705        port_help    $MISSING_DEPENDENCY ;;
30706      pkgutil)
30707        pkgutil_help $MISSING_DEPENDENCY ;;
30708      pkgadd)
30709        pkgadd_help  $MISSING_DEPENDENCY ;;
30710    esac
30711
30712    if test "x$PKGHANDLER_COMMAND" != x; then
30713      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30714    fi
30715  fi
30716
30717      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30718    fi
30719  fi
30720
30721  # Now we have a compiler binary in CXX. Make sure it's okay.
30722
30723  # Only process if variable expands to non-empty
30724
30725  if test "x$CXX" != x; then
30726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30727
30728  # First separate the path from the arguments. This will split at the first
30729  # space.
30730  complete="$CXX"
30731  path="${complete%% *}"
30732  tmp="$complete EOL"
30733  arguments="${tmp#* }"
30734
30735  # Input might be given as Windows format, start by converting to
30736  # unix format.
30737  new_path=`$CYGPATH -u "$path"`
30738
30739  # Now try to locate executable using which
30740  new_path=`$WHICH "$new_path" 2> /dev/null`
30741  # bat and cmd files are not always considered executable in cygwin causing which
30742  # to not find them
30743  if test "x$new_path" = x \
30744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30746    new_path=`$CYGPATH -u "$path"`
30747  fi
30748  if test "x$new_path" = x; then
30749    # Oops. Which didn't find the executable.
30750    # The splitting of arguments from the executable at a space might have been incorrect,
30751    # since paths with space are more likely in Windows. Give it another try with the whole
30752    # argument.
30753    path="$complete"
30754    arguments="EOL"
30755    new_path=`$CYGPATH -u "$path"`
30756    new_path=`$WHICH "$new_path" 2> /dev/null`
30757    # bat and cmd files are not always considered executable in cygwin causing which
30758    # to not find them
30759    if test "x$new_path" = x \
30760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30762      new_path=`$CYGPATH -u "$path"`
30763    fi
30764    if test "x$new_path" = x; then
30765      # It's still not found. Now this is an unrecoverable error.
30766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30767$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30768      has_space=`$ECHO "$complete" | $GREP " "`
30769      if test "x$has_space" != x; then
30770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30772      fi
30773      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30774    fi
30775  fi
30776
30777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30780  # "foo.exe" is OK but "foo" is an error.
30781  #
30782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30783  # It is also a way to make sure we got the proper file name for the real test later on.
30784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30785  if test "x$test_shortpath" = x; then
30786    # Short path failed, file does not exist as specified.
30787    # Try adding .exe or .cmd
30788    if test -f "${new_path}.exe"; then
30789      input_to_shortpath="${new_path}.exe"
30790    elif test -f "${new_path}.cmd"; then
30791      input_to_shortpath="${new_path}.cmd"
30792    else
30793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30794$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30797      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30798    fi
30799  else
30800    input_to_shortpath="$new_path"
30801  fi
30802
30803  # Call helper function which possibly converts this using DOS-style short mode.
30804  # If so, the updated path is stored in $new_path.
30805  new_path="$input_to_shortpath"
30806
30807  input_path="$input_to_shortpath"
30808  # Check if we need to convert this using DOS-style short mode. If the path
30809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30810  # take no chances and rewrite it.
30811  # Note: m4 eats our [], so we need to use [ and ] instead.
30812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30813  if test "x$has_forbidden_chars" != x; then
30814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30818      # Going to short mode and back again did indeed matter. Since short mode is
30819      # case insensitive, let's make it lowercase to improve readability.
30820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30821      # Now convert it back to Unix-style (cygpath)
30822      input_path=`$CYGPATH -u "$shortmode_path"`
30823      new_path="$input_path"
30824    fi
30825  fi
30826
30827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30828  if test "x$test_cygdrive_prefix" = x; then
30829    # As a simple fix, exclude /usr/bin since it's not a real path.
30830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30832      # a path prefixed by /cygdrive for fixpath to work.
30833      new_path="$CYGWIN_ROOT_PATH$input_path"
30834    fi
30835  fi
30836
30837  # remove trailing .exe if any
30838  new_path="${new_path/%.exe/}"
30839
30840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30841
30842  # First separate the path from the arguments. This will split at the first
30843  # space.
30844  complete="$CXX"
30845  path="${complete%% *}"
30846  tmp="$complete EOL"
30847  arguments="${tmp#* }"
30848
30849  # Input might be given as Windows format, start by converting to
30850  # unix format.
30851  new_path="$path"
30852
30853  windows_path="$new_path"
30854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30855    unix_path=`$CYGPATH -u "$windows_path"`
30856    new_path="$unix_path"
30857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30859    new_path="$unix_path"
30860  fi
30861
30862
30863  # Now try to locate executable using which
30864  new_path=`$WHICH "$new_path" 2> /dev/null`
30865
30866  if test "x$new_path" = x; then
30867    # Oops. Which didn't find the executable.
30868    # The splitting of arguments from the executable at a space might have been incorrect,
30869    # since paths with space are more likely in Windows. Give it another try with the whole
30870    # argument.
30871    path="$complete"
30872    arguments="EOL"
30873    new_path="$path"
30874
30875  windows_path="$new_path"
30876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30877    unix_path=`$CYGPATH -u "$windows_path"`
30878    new_path="$unix_path"
30879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30881    new_path="$unix_path"
30882  fi
30883
30884
30885    new_path=`$WHICH "$new_path" 2> /dev/null`
30886    # bat and cmd files are not always considered executable in MSYS causing which
30887    # to not find them
30888    if test "x$new_path" = x \
30889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30891      new_path="$path"
30892
30893  windows_path="$new_path"
30894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30895    unix_path=`$CYGPATH -u "$windows_path"`
30896    new_path="$unix_path"
30897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30899    new_path="$unix_path"
30900  fi
30901
30902    fi
30903
30904    if test "x$new_path" = x; then
30905      # It's still not found. Now this is an unrecoverable error.
30906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30907$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30908      has_space=`$ECHO "$complete" | $GREP " "`
30909      if test "x$has_space" != x; then
30910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30912      fi
30913      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30914    fi
30915  fi
30916
30917  # Now new_path has a complete unix path to the binary
30918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30919    # Keep paths in /bin as-is, but remove trailing .exe if any
30920    new_path="${new_path/%.exe/}"
30921    # Do not save /bin paths to all_fixpath_prefixes!
30922  else
30923    # Not in mixed or Windows style, start by that.
30924    new_path=`cmd //c echo $new_path`
30925
30926  input_path="$new_path"
30927  # Check if we need to convert this using DOS-style short mode. If the path
30928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30929  # take no chances and rewrite it.
30930  # Note: m4 eats our [], so we need to use [ and ] instead.
30931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30932  if test "x$has_forbidden_chars" != x; then
30933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30935  fi
30936
30937    # Output is in $new_path
30938
30939  windows_path="$new_path"
30940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30941    unix_path=`$CYGPATH -u "$windows_path"`
30942    new_path="$unix_path"
30943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30945    new_path="$unix_path"
30946  fi
30947
30948    # remove trailing .exe if any
30949    new_path="${new_path/%.exe/}"
30950
30951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30953  fi
30954
30955    else
30956      # We're on a unix platform. Hooray! :)
30957      # First separate the path from the arguments. This will split at the first
30958      # space.
30959      complete="$CXX"
30960      path="${complete%% *}"
30961      tmp="$complete EOL"
30962      arguments="${tmp#* }"
30963
30964      # Cannot rely on the command "which" here since it doesn't always work.
30965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30966      if test -z "$is_absolute_path"; then
30967        # Path to executable is not absolute. Find it.
30968        IFS_save="$IFS"
30969        IFS=:
30970        for p in $PATH; do
30971          if test -f "$p/$path" && test -x "$p/$path"; then
30972            new_path="$p/$path"
30973            break
30974          fi
30975        done
30976        IFS="$IFS_save"
30977      else
30978        # This is an absolute path, we can use it without further modifications.
30979        new_path="$path"
30980      fi
30981
30982      if test "x$new_path" = x; then
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30984$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30985        has_space=`$ECHO "$complete" | $GREP " "`
30986        if test "x$has_space" != x; then
30987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30989        fi
30990        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30991      fi
30992    fi
30993
30994    # Now join together the path and the arguments once again
30995    if test "x$arguments" != xEOL; then
30996      new_complete="$new_path ${arguments% *}"
30997    else
30998      new_complete="$new_path"
30999    fi
31000
31001    if test "x$complete" != "x$new_complete"; then
31002      CXX="$new_complete"
31003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31004$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31005    fi
31006  fi
31007
31008  TEST_COMPILER="$CXX"
31009  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31010  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31011  if test "x$OPENJDK_BUILD_OS" != xaix; then
31012    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31014$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31015
31016  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31017    # Follow a chain of symbolic links. Use readlink
31018    # where it exists, else fall back to horribly
31019    # complicated shell code.
31020    if test "x$READLINK_TESTED" != yes; then
31021      # On MacOSX there is a readlink tool with a different
31022      # purpose than the GNU readlink tool. Check the found readlink.
31023      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31024      if test "x$ISGNU" = x; then
31025        # A readlink that we do not know how to use.
31026        # Are there other non-GNU readlinks out there?
31027        READLINK_TESTED=yes
31028        READLINK=
31029      fi
31030    fi
31031
31032    if test "x$READLINK" != x; then
31033      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31034    else
31035      # Save the current directory for restoring afterwards
31036      STARTDIR=$PWD
31037      COUNTER=0
31038      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31039      sym_link_file=`$BASENAME $TEST_COMPILER`
31040      cd $sym_link_dir
31041      # Use -P flag to resolve symlinks in directories.
31042      cd `$THEPWDCMD -P`
31043      sym_link_dir=`$THEPWDCMD -P`
31044      # Resolve file symlinks
31045      while test $COUNTER -lt 20; do
31046        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31047        if test "x$ISLINK" == x; then
31048          # This is not a symbolic link! We are done!
31049          break
31050        fi
31051        # Again resolve directory symlinks since the target of the just found
31052        # link could be in a different directory
31053        cd `$DIRNAME $ISLINK`
31054        sym_link_dir=`$THEPWDCMD -P`
31055        sym_link_file=`$BASENAME $ISLINK`
31056        let COUNTER=COUNTER+1
31057      done
31058      cd $STARTDIR
31059      TEST_COMPILER=$sym_link_dir/$sym_link_file
31060    fi
31061  fi
31062
31063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31064$as_echo "$TEST_COMPILER" >&6; }
31065  fi
31066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31067$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31068
31069  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31070  if test "x$COMPILER_BASENAME" = "xccache"; then
31071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31072$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31073    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31074    # We want to control ccache invocation ourselves, so ignore this cc and try
31075    # searching again.
31076
31077    # Remove the path to the fake ccache cc from the PATH
31078    RETRY_COMPILER_SAVED_PATH="$PATH"
31079    COMPILER_DIRNAME=`$DIRNAME $CXX`
31080    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31081
31082    # Try again looking for our compiler
31083    if test -n "$ac_tool_prefix"; then
31084  for ac_prog in $TOOLCHAIN_CXX_BINARY
31085  do
31086    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31089$as_echo_n "checking for $ac_word... " >&6; }
31090if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31091  $as_echo_n "(cached) " >&6
31092else
31093  if test -n "$PROPER_COMPILER_CXX"; then
31094  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31095else
31096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31097for as_dir in $PATH
31098do
31099  IFS=$as_save_IFS
31100  test -z "$as_dir" && as_dir=.
31101    for ac_exec_ext in '' $ac_executable_extensions; do
31102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31103    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31105    break 2
31106  fi
31107done
31108  done
31109IFS=$as_save_IFS
31110
31111fi
31112fi
31113PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31114if test -n "$PROPER_COMPILER_CXX"; then
31115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31116$as_echo "$PROPER_COMPILER_CXX" >&6; }
31117else
31118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31119$as_echo "no" >&6; }
31120fi
31121
31122
31123    test -n "$PROPER_COMPILER_CXX" && break
31124  done
31125fi
31126if test -z "$PROPER_COMPILER_CXX"; then
31127  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31128  for ac_prog in $TOOLCHAIN_CXX_BINARY
31129do
31130  # Extract the first word of "$ac_prog", so it can be a program name with args.
31131set dummy $ac_prog; ac_word=$2
31132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31133$as_echo_n "checking for $ac_word... " >&6; }
31134if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31135  $as_echo_n "(cached) " >&6
31136else
31137  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31138  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31139else
31140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31141for as_dir in $PATH
31142do
31143  IFS=$as_save_IFS
31144  test -z "$as_dir" && as_dir=.
31145    for ac_exec_ext in '' $ac_executable_extensions; do
31146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31147    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31149    break 2
31150  fi
31151done
31152  done
31153IFS=$as_save_IFS
31154
31155fi
31156fi
31157ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31158if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31160$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31161else
31162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31163$as_echo "no" >&6; }
31164fi
31165
31166
31167  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31168done
31169
31170  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31171    PROPER_COMPILER_CXX=""
31172  else
31173    case $cross_compiling:$ac_tool_warned in
31174yes:)
31175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31177ac_tool_warned=yes ;;
31178esac
31179    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31180  fi
31181fi
31182
31183
31184  # Only process if variable expands to non-empty
31185
31186  if test "x$PROPER_COMPILER_CXX" != x; then
31187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31188
31189  # First separate the path from the arguments. This will split at the first
31190  # space.
31191  complete="$PROPER_COMPILER_CXX"
31192  path="${complete%% *}"
31193  tmp="$complete EOL"
31194  arguments="${tmp#* }"
31195
31196  # Input might be given as Windows format, start by converting to
31197  # unix format.
31198  new_path=`$CYGPATH -u "$path"`
31199
31200  # Now try to locate executable using which
31201  new_path=`$WHICH "$new_path" 2> /dev/null`
31202  # bat and cmd files are not always considered executable in cygwin causing which
31203  # to not find them
31204  if test "x$new_path" = x \
31205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31207    new_path=`$CYGPATH -u "$path"`
31208  fi
31209  if test "x$new_path" = x; then
31210    # Oops. Which didn't find the executable.
31211    # The splitting of arguments from the executable at a space might have been incorrect,
31212    # since paths with space are more likely in Windows. Give it another try with the whole
31213    # argument.
31214    path="$complete"
31215    arguments="EOL"
31216    new_path=`$CYGPATH -u "$path"`
31217    new_path=`$WHICH "$new_path" 2> /dev/null`
31218    # bat and cmd files are not always considered executable in cygwin causing which
31219    # to not find them
31220    if test "x$new_path" = x \
31221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31223      new_path=`$CYGPATH -u "$path"`
31224    fi
31225    if test "x$new_path" = x; then
31226      # It's still not found. Now this is an unrecoverable error.
31227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31228$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31229      has_space=`$ECHO "$complete" | $GREP " "`
31230      if test "x$has_space" != x; then
31231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31233      fi
31234      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31235    fi
31236  fi
31237
31238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31241  # "foo.exe" is OK but "foo" is an error.
31242  #
31243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31244  # It is also a way to make sure we got the proper file name for the real test later on.
31245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31246  if test "x$test_shortpath" = x; then
31247    # Short path failed, file does not exist as specified.
31248    # Try adding .exe or .cmd
31249    if test -f "${new_path}.exe"; then
31250      input_to_shortpath="${new_path}.exe"
31251    elif test -f "${new_path}.cmd"; then
31252      input_to_shortpath="${new_path}.cmd"
31253    else
31254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31255$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31258      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31259    fi
31260  else
31261    input_to_shortpath="$new_path"
31262  fi
31263
31264  # Call helper function which possibly converts this using DOS-style short mode.
31265  # If so, the updated path is stored in $new_path.
31266  new_path="$input_to_shortpath"
31267
31268  input_path="$input_to_shortpath"
31269  # Check if we need to convert this using DOS-style short mode. If the path
31270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31271  # take no chances and rewrite it.
31272  # Note: m4 eats our [], so we need to use [ and ] instead.
31273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31274  if test "x$has_forbidden_chars" != x; then
31275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31279      # Going to short mode and back again did indeed matter. Since short mode is
31280      # case insensitive, let's make it lowercase to improve readability.
31281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31282      # Now convert it back to Unix-style (cygpath)
31283      input_path=`$CYGPATH -u "$shortmode_path"`
31284      new_path="$input_path"
31285    fi
31286  fi
31287
31288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31289  if test "x$test_cygdrive_prefix" = x; then
31290    # As a simple fix, exclude /usr/bin since it's not a real path.
31291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31293      # a path prefixed by /cygdrive for fixpath to work.
31294      new_path="$CYGWIN_ROOT_PATH$input_path"
31295    fi
31296  fi
31297
31298  # remove trailing .exe if any
31299  new_path="${new_path/%.exe/}"
31300
31301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31302
31303  # First separate the path from the arguments. This will split at the first
31304  # space.
31305  complete="$PROPER_COMPILER_CXX"
31306  path="${complete%% *}"
31307  tmp="$complete EOL"
31308  arguments="${tmp#* }"
31309
31310  # Input might be given as Windows format, start by converting to
31311  # unix format.
31312  new_path="$path"
31313
31314  windows_path="$new_path"
31315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31316    unix_path=`$CYGPATH -u "$windows_path"`
31317    new_path="$unix_path"
31318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31320    new_path="$unix_path"
31321  fi
31322
31323
31324  # Now try to locate executable using which
31325  new_path=`$WHICH "$new_path" 2> /dev/null`
31326
31327  if test "x$new_path" = x; then
31328    # Oops. Which didn't find the executable.
31329    # The splitting of arguments from the executable at a space might have been incorrect,
31330    # since paths with space are more likely in Windows. Give it another try with the whole
31331    # argument.
31332    path="$complete"
31333    arguments="EOL"
31334    new_path="$path"
31335
31336  windows_path="$new_path"
31337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31338    unix_path=`$CYGPATH -u "$windows_path"`
31339    new_path="$unix_path"
31340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31342    new_path="$unix_path"
31343  fi
31344
31345
31346    new_path=`$WHICH "$new_path" 2> /dev/null`
31347    # bat and cmd files are not always considered executable in MSYS causing which
31348    # to not find them
31349    if test "x$new_path" = x \
31350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31352      new_path="$path"
31353
31354  windows_path="$new_path"
31355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31356    unix_path=`$CYGPATH -u "$windows_path"`
31357    new_path="$unix_path"
31358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31360    new_path="$unix_path"
31361  fi
31362
31363    fi
31364
31365    if test "x$new_path" = x; then
31366      # It's still not found. Now this is an unrecoverable error.
31367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31368$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31369      has_space=`$ECHO "$complete" | $GREP " "`
31370      if test "x$has_space" != x; then
31371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31373      fi
31374      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31375    fi
31376  fi
31377
31378  # Now new_path has a complete unix path to the binary
31379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31380    # Keep paths in /bin as-is, but remove trailing .exe if any
31381    new_path="${new_path/%.exe/}"
31382    # Do not save /bin paths to all_fixpath_prefixes!
31383  else
31384    # Not in mixed or Windows style, start by that.
31385    new_path=`cmd //c echo $new_path`
31386
31387  input_path="$new_path"
31388  # Check if we need to convert this using DOS-style short mode. If the path
31389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31390  # take no chances and rewrite it.
31391  # Note: m4 eats our [], so we need to use [ and ] instead.
31392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31393  if test "x$has_forbidden_chars" != x; then
31394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31396  fi
31397
31398    # Output is in $new_path
31399
31400  windows_path="$new_path"
31401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31402    unix_path=`$CYGPATH -u "$windows_path"`
31403    new_path="$unix_path"
31404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31406    new_path="$unix_path"
31407  fi
31408
31409    # remove trailing .exe if any
31410    new_path="${new_path/%.exe/}"
31411
31412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31414  fi
31415
31416    else
31417      # We're on a unix platform. Hooray! :)
31418      # First separate the path from the arguments. This will split at the first
31419      # space.
31420      complete="$PROPER_COMPILER_CXX"
31421      path="${complete%% *}"
31422      tmp="$complete EOL"
31423      arguments="${tmp#* }"
31424
31425      # Cannot rely on the command "which" here since it doesn't always work.
31426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31427      if test -z "$is_absolute_path"; then
31428        # Path to executable is not absolute. Find it.
31429        IFS_save="$IFS"
31430        IFS=:
31431        for p in $PATH; do
31432          if test -f "$p/$path" && test -x "$p/$path"; then
31433            new_path="$p/$path"
31434            break
31435          fi
31436        done
31437        IFS="$IFS_save"
31438      else
31439        # This is an absolute path, we can use it without further modifications.
31440        new_path="$path"
31441      fi
31442
31443      if test "x$new_path" = x; then
31444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31445$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31446        has_space=`$ECHO "$complete" | $GREP " "`
31447        if test "x$has_space" != x; then
31448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31450        fi
31451        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31452      fi
31453    fi
31454
31455    # Now join together the path and the arguments once again
31456    if test "x$arguments" != xEOL; then
31457      new_complete="$new_path ${arguments% *}"
31458    else
31459      new_complete="$new_path"
31460    fi
31461
31462    if test "x$complete" != "x$new_complete"; then
31463      PROPER_COMPILER_CXX="$new_complete"
31464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31465$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31466    fi
31467  fi
31468
31469    PATH="$RETRY_COMPILER_SAVED_PATH"
31470
31471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31472$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31473
31474  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31475    # Follow a chain of symbolic links. Use readlink
31476    # where it exists, else fall back to horribly
31477    # complicated shell code.
31478    if test "x$READLINK_TESTED" != yes; then
31479      # On MacOSX there is a readlink tool with a different
31480      # purpose than the GNU readlink tool. Check the found readlink.
31481      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31482      if test "x$ISGNU" = x; then
31483        # A readlink that we do not know how to use.
31484        # Are there other non-GNU readlinks out there?
31485        READLINK_TESTED=yes
31486        READLINK=
31487      fi
31488    fi
31489
31490    if test "x$READLINK" != x; then
31491      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31492    else
31493      # Save the current directory for restoring afterwards
31494      STARTDIR=$PWD
31495      COUNTER=0
31496      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31497      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31498      cd $sym_link_dir
31499      # Use -P flag to resolve symlinks in directories.
31500      cd `$THEPWDCMD -P`
31501      sym_link_dir=`$THEPWDCMD -P`
31502      # Resolve file symlinks
31503      while test $COUNTER -lt 20; do
31504        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31505        if test "x$ISLINK" == x; then
31506          # This is not a symbolic link! We are done!
31507          break
31508        fi
31509        # Again resolve directory symlinks since the target of the just found
31510        # link could be in a different directory
31511        cd `$DIRNAME $ISLINK`
31512        sym_link_dir=`$THEPWDCMD -P`
31513        sym_link_file=`$BASENAME $ISLINK`
31514        let COUNTER=COUNTER+1
31515      done
31516      cd $STARTDIR
31517      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31518    fi
31519  fi
31520
31521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31522$as_echo "$PROPER_COMPILER_CXX" >&6; }
31523    CXX="$PROPER_COMPILER_CXX"
31524  else
31525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31526$as_echo "no, keeping CXX" >&6; }
31527  fi
31528
31529
31530  COMPILER=$CXX
31531  COMPILER_NAME=$COMPILER_NAME
31532
31533  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31534    # cc -V output typically looks like
31535    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31536    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31537    # Check that this is likely to be the Solaris Studio cc.
31538    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31539    if test $? -ne 0; then
31540      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31541      { $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
31542$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31543      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31544$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31545      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31546$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31547      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31548    fi
31549    # Remove usage instructions (if present), and
31550    # collapse compiler output into a single line
31551    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31552        $SED -e 's/ *[Uu]sage:.*//'`
31553    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31554        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31555  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31556    # xlc -qversion output typically looks like
31557    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31558    #     Version: 11.01.0000.0015
31559    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31560    # Check that this is likely to be the IBM XL C compiler.
31561    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31562    if test $? -ne 0; then
31563      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31564      { $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
31565$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31566      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31567$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31568      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31569$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31570      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31571    fi
31572    # Collapse compiler output into a single line
31573    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31574    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31575        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31576  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31577    # There is no specific version flag, but all output starts with a version string.
31578    # First line typically looks something like:
31579    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31580    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31581    # Check that this is likely to be Microsoft CL.EXE.
31582    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31583    if test $? -ne 0; then
31584      { $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
31585$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31587$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31588      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31589    fi
31590    # Collapse compiler output into a single line
31591    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31592    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31593        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31594  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31595    # gcc --version output typically looks like
31596    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31597    #     Copyright (C) 2013 Free Software Foundation, Inc.
31598    #     This is free software; see the source for copying conditions.  There is NO
31599    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31600    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31601    # Check that this is likely to be GCC.
31602    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31603    if test $? -ne 0; then
31604      { $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
31605$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31606      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31607$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31608      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31609    fi
31610    # Remove Copyright and legalese from version string, and
31611    # collapse into a single line
31612    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31613        $SED -e 's/ *Copyright .*//'`
31614    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31615        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31616  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31617    # clang --version output typically looks like
31618    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31619    #    clang version 3.3 (tags/RELEASE_33/final)
31620    # or
31621    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31622    #    Target: x86_64-pc-linux-gnu
31623    #    Thread model: posix
31624    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31625    # Check that this is likely to be clang
31626    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31627    if test $? -ne 0; then
31628      { $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
31629$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31630      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31631$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31632      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31633    fi
31634    # Collapse compiler output into a single line
31635    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31636    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31637        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31638  else
31639      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31640  fi
31641  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31642  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31643  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31644  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31645
31646  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31647$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31648
31649
31650  # Now that we have resolved CXX ourself, let autoconf have its go at it
31651  ac_ext=cpp
31652ac_cpp='$CXXCPP $CPPFLAGS'
31653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31656if test -z "$CXX"; then
31657  if test -n "$CCC"; then
31658    CXX=$CCC
31659  else
31660    if test -n "$ac_tool_prefix"; then
31661  for ac_prog in $CXX
31662  do
31663    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31664set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31666$as_echo_n "checking for $ac_word... " >&6; }
31667if ${ac_cv_prog_CXX+:} false; then :
31668  $as_echo_n "(cached) " >&6
31669else
31670  if test -n "$CXX"; then
31671  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31672else
31673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31674for as_dir in $PATH
31675do
31676  IFS=$as_save_IFS
31677  test -z "$as_dir" && as_dir=.
31678    for ac_exec_ext in '' $ac_executable_extensions; do
31679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31680    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31682    break 2
31683  fi
31684done
31685  done
31686IFS=$as_save_IFS
31687
31688fi
31689fi
31690CXX=$ac_cv_prog_CXX
31691if test -n "$CXX"; then
31692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31693$as_echo "$CXX" >&6; }
31694else
31695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31696$as_echo "no" >&6; }
31697fi
31698
31699
31700    test -n "$CXX" && break
31701  done
31702fi
31703if test -z "$CXX"; then
31704  ac_ct_CXX=$CXX
31705  for ac_prog in $CXX
31706do
31707  # Extract the first word of "$ac_prog", so it can be a program name with args.
31708set dummy $ac_prog; ac_word=$2
31709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31710$as_echo_n "checking for $ac_word... " >&6; }
31711if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31712  $as_echo_n "(cached) " >&6
31713else
31714  if test -n "$ac_ct_CXX"; then
31715  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31716else
31717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31718for as_dir in $PATH
31719do
31720  IFS=$as_save_IFS
31721  test -z "$as_dir" && as_dir=.
31722    for ac_exec_ext in '' $ac_executable_extensions; do
31723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31724    ac_cv_prog_ac_ct_CXX="$ac_prog"
31725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31726    break 2
31727  fi
31728done
31729  done
31730IFS=$as_save_IFS
31731
31732fi
31733fi
31734ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31735if test -n "$ac_ct_CXX"; then
31736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31737$as_echo "$ac_ct_CXX" >&6; }
31738else
31739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31740$as_echo "no" >&6; }
31741fi
31742
31743
31744  test -n "$ac_ct_CXX" && break
31745done
31746
31747  if test "x$ac_ct_CXX" = x; then
31748    CXX="g++"
31749  else
31750    case $cross_compiling:$ac_tool_warned in
31751yes:)
31752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31754ac_tool_warned=yes ;;
31755esac
31756    CXX=$ac_ct_CXX
31757  fi
31758fi
31759
31760  fi
31761fi
31762# Provide some information about the compiler.
31763$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31764set X $ac_compile
31765ac_compiler=$2
31766for ac_option in --version -v -V -qversion; do
31767  { { ac_try="$ac_compiler $ac_option >&5"
31768case "(($ac_try" in
31769  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31770  *) ac_try_echo=$ac_try;;
31771esac
31772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31773$as_echo "$ac_try_echo"; } >&5
31774  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31775  ac_status=$?
31776  if test -s conftest.err; then
31777    sed '10a\
31778... rest of stderr output deleted ...
31779         10q' conftest.err >conftest.er1
31780    cat conftest.er1 >&5
31781  fi
31782  rm -f conftest.er1 conftest.err
31783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31784  test $ac_status = 0; }
31785done
31786
31787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31788$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31789if ${ac_cv_cxx_compiler_gnu+:} false; then :
31790  $as_echo_n "(cached) " >&6
31791else
31792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31793/* end confdefs.h.  */
31794
31795int
31796main ()
31797{
31798#ifndef __GNUC__
31799       choke me
31800#endif
31801
31802  ;
31803  return 0;
31804}
31805_ACEOF
31806if ac_fn_cxx_try_compile "$LINENO"; then :
31807  ac_compiler_gnu=yes
31808else
31809  ac_compiler_gnu=no
31810fi
31811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31812ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31813
31814fi
31815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31816$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31817if test $ac_compiler_gnu = yes; then
31818  GXX=yes
31819else
31820  GXX=
31821fi
31822ac_test_CXXFLAGS=${CXXFLAGS+set}
31823ac_save_CXXFLAGS=$CXXFLAGS
31824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31825$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31826if ${ac_cv_prog_cxx_g+:} false; then :
31827  $as_echo_n "(cached) " >&6
31828else
31829  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31830   ac_cxx_werror_flag=yes
31831   ac_cv_prog_cxx_g=no
31832   CXXFLAGS="-g"
31833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31834/* end confdefs.h.  */
31835
31836int
31837main ()
31838{
31839
31840  ;
31841  return 0;
31842}
31843_ACEOF
31844if ac_fn_cxx_try_compile "$LINENO"; then :
31845  ac_cv_prog_cxx_g=yes
31846else
31847  CXXFLAGS=""
31848      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31849/* end confdefs.h.  */
31850
31851int
31852main ()
31853{
31854
31855  ;
31856  return 0;
31857}
31858_ACEOF
31859if ac_fn_cxx_try_compile "$LINENO"; then :
31860
31861else
31862  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31863	 CXXFLAGS="-g"
31864	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31865/* end confdefs.h.  */
31866
31867int
31868main ()
31869{
31870
31871  ;
31872  return 0;
31873}
31874_ACEOF
31875if ac_fn_cxx_try_compile "$LINENO"; then :
31876  ac_cv_prog_cxx_g=yes
31877fi
31878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31879fi
31880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31881fi
31882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31883   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31884fi
31885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31886$as_echo "$ac_cv_prog_cxx_g" >&6; }
31887if test "$ac_test_CXXFLAGS" = set; then
31888  CXXFLAGS=$ac_save_CXXFLAGS
31889elif test $ac_cv_prog_cxx_g = yes; then
31890  if test "$GXX" = yes; then
31891    CXXFLAGS="-g -O2"
31892  else
31893    CXXFLAGS="-g"
31894  fi
31895else
31896  if test "$GXX" = yes; then
31897    CXXFLAGS="-O2"
31898  else
31899    CXXFLAGS=
31900  fi
31901fi
31902ac_ext=cpp
31903ac_cpp='$CXXCPP $CPPFLAGS'
31904ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31905ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31906ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31907
31908
31909  #
31910  # Setup the preprocessor (CPP and CXXCPP)
31911  #
31912  ac_ext=c
31913ac_cpp='$CPP $CPPFLAGS'
31914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31916ac_compiler_gnu=$ac_cv_c_compiler_gnu
31917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31918$as_echo_n "checking how to run the C preprocessor... " >&6; }
31919# On Suns, sometimes $CPP names a directory.
31920if test -n "$CPP" && test -d "$CPP"; then
31921  CPP=
31922fi
31923if test -z "$CPP"; then
31924  if ${ac_cv_prog_CPP+:} false; then :
31925  $as_echo_n "(cached) " >&6
31926else
31927      # Double quotes because CPP needs to be expanded
31928    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31929    do
31930      ac_preproc_ok=false
31931for ac_c_preproc_warn_flag in '' yes
31932do
31933  # Use a header file that comes with gcc, so configuring glibc
31934  # with a fresh cross-compiler works.
31935  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31936  # <limits.h> exists even on freestanding compilers.
31937  # On the NeXT, cc -E runs the code through the compiler's parser,
31938  # not just through cpp. "Syntax error" is here to catch this case.
31939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31940/* end confdefs.h.  */
31941#ifdef __STDC__
31942# include <limits.h>
31943#else
31944# include <assert.h>
31945#endif
31946		     Syntax error
31947_ACEOF
31948if ac_fn_c_try_cpp "$LINENO"; then :
31949
31950else
31951  # Broken: fails on valid input.
31952continue
31953fi
31954rm -f conftest.err conftest.i conftest.$ac_ext
31955
31956  # OK, works on sane cases.  Now check whether nonexistent headers
31957  # can be detected and how.
31958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31959/* end confdefs.h.  */
31960#include <ac_nonexistent.h>
31961_ACEOF
31962if ac_fn_c_try_cpp "$LINENO"; then :
31963  # Broken: success on invalid input.
31964continue
31965else
31966  # Passes both tests.
31967ac_preproc_ok=:
31968break
31969fi
31970rm -f conftest.err conftest.i conftest.$ac_ext
31971
31972done
31973# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31974rm -f conftest.i conftest.err conftest.$ac_ext
31975if $ac_preproc_ok; then :
31976  break
31977fi
31978
31979    done
31980    ac_cv_prog_CPP=$CPP
31981
31982fi
31983  CPP=$ac_cv_prog_CPP
31984else
31985  ac_cv_prog_CPP=$CPP
31986fi
31987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31988$as_echo "$CPP" >&6; }
31989ac_preproc_ok=false
31990for ac_c_preproc_warn_flag in '' yes
31991do
31992  # Use a header file that comes with gcc, so configuring glibc
31993  # with a fresh cross-compiler works.
31994  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31995  # <limits.h> exists even on freestanding compilers.
31996  # On the NeXT, cc -E runs the code through the compiler's parser,
31997  # not just through cpp. "Syntax error" is here to catch this case.
31998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31999/* end confdefs.h.  */
32000#ifdef __STDC__
32001# include <limits.h>
32002#else
32003# include <assert.h>
32004#endif
32005		     Syntax error
32006_ACEOF
32007if ac_fn_c_try_cpp "$LINENO"; then :
32008
32009else
32010  # Broken: fails on valid input.
32011continue
32012fi
32013rm -f conftest.err conftest.i conftest.$ac_ext
32014
32015  # OK, works on sane cases.  Now check whether nonexistent headers
32016  # can be detected and how.
32017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32018/* end confdefs.h.  */
32019#include <ac_nonexistent.h>
32020_ACEOF
32021if ac_fn_c_try_cpp "$LINENO"; then :
32022  # Broken: success on invalid input.
32023continue
32024else
32025  # Passes both tests.
32026ac_preproc_ok=:
32027break
32028fi
32029rm -f conftest.err conftest.i conftest.$ac_ext
32030
32031done
32032# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32033rm -f conftest.i conftest.err conftest.$ac_ext
32034if $ac_preproc_ok; then :
32035
32036else
32037  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32039as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
32040See \`config.log' for more details" "$LINENO" 5; }
32041fi
32042
32043ac_ext=cpp
32044ac_cpp='$CXXCPP $CPPFLAGS'
32045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32048
32049
32050  # Only process if variable expands to non-empty
32051
32052  if test "x$CPP" != x; then
32053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32054
32055  # First separate the path from the arguments. This will split at the first
32056  # space.
32057  complete="$CPP"
32058  path="${complete%% *}"
32059  tmp="$complete EOL"
32060  arguments="${tmp#* }"
32061
32062  # Input might be given as Windows format, start by converting to
32063  # unix format.
32064  new_path=`$CYGPATH -u "$path"`
32065
32066  # Now try to locate executable using which
32067  new_path=`$WHICH "$new_path" 2> /dev/null`
32068  # bat and cmd files are not always considered executable in cygwin causing which
32069  # to not find them
32070  if test "x$new_path" = x \
32071      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32072      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32073    new_path=`$CYGPATH -u "$path"`
32074  fi
32075  if test "x$new_path" = x; then
32076    # Oops. Which didn't find the executable.
32077    # The splitting of arguments from the executable at a space might have been incorrect,
32078    # since paths with space are more likely in Windows. Give it another try with the whole
32079    # argument.
32080    path="$complete"
32081    arguments="EOL"
32082    new_path=`$CYGPATH -u "$path"`
32083    new_path=`$WHICH "$new_path" 2> /dev/null`
32084    # bat and cmd files are not always considered executable in cygwin causing which
32085    # to not find them
32086    if test "x$new_path" = x \
32087        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32088        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32089      new_path=`$CYGPATH -u "$path"`
32090    fi
32091    if test "x$new_path" = x; then
32092      # It's still not found. Now this is an unrecoverable error.
32093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32094$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32095      has_space=`$ECHO "$complete" | $GREP " "`
32096      if test "x$has_space" != x; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32099      fi
32100      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32101    fi
32102  fi
32103
32104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32107  # "foo.exe" is OK but "foo" is an error.
32108  #
32109  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32110  # It is also a way to make sure we got the proper file name for the real test later on.
32111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32112  if test "x$test_shortpath" = x; then
32113    # Short path failed, file does not exist as specified.
32114    # Try adding .exe or .cmd
32115    if test -f "${new_path}.exe"; then
32116      input_to_shortpath="${new_path}.exe"
32117    elif test -f "${new_path}.cmd"; then
32118      input_to_shortpath="${new_path}.cmd"
32119    else
32120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
32121$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
32122      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32123$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32124      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32125    fi
32126  else
32127    input_to_shortpath="$new_path"
32128  fi
32129
32130  # Call helper function which possibly converts this using DOS-style short mode.
32131  # If so, the updated path is stored in $new_path.
32132  new_path="$input_to_shortpath"
32133
32134  input_path="$input_to_shortpath"
32135  # Check if we need to convert this using DOS-style short mode. If the path
32136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32137  # take no chances and rewrite it.
32138  # Note: m4 eats our [], so we need to use [ and ] instead.
32139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32140  if test "x$has_forbidden_chars" != x; then
32141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32145      # Going to short mode and back again did indeed matter. Since short mode is
32146      # case insensitive, let's make it lowercase to improve readability.
32147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32148      # Now convert it back to Unix-style (cygpath)
32149      input_path=`$CYGPATH -u "$shortmode_path"`
32150      new_path="$input_path"
32151    fi
32152  fi
32153
32154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32155  if test "x$test_cygdrive_prefix" = x; then
32156    # As a simple fix, exclude /usr/bin since it's not a real path.
32157    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32159      # a path prefixed by /cygdrive for fixpath to work.
32160      new_path="$CYGWIN_ROOT_PATH$input_path"
32161    fi
32162  fi
32163
32164  # remove trailing .exe if any
32165  new_path="${new_path/%.exe/}"
32166
32167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32168
32169  # First separate the path from the arguments. This will split at the first
32170  # space.
32171  complete="$CPP"
32172  path="${complete%% *}"
32173  tmp="$complete EOL"
32174  arguments="${tmp#* }"
32175
32176  # Input might be given as Windows format, start by converting to
32177  # unix format.
32178  new_path="$path"
32179
32180  windows_path="$new_path"
32181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32182    unix_path=`$CYGPATH -u "$windows_path"`
32183    new_path="$unix_path"
32184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32186    new_path="$unix_path"
32187  fi
32188
32189
32190  # Now try to locate executable using which
32191  new_path=`$WHICH "$new_path" 2> /dev/null`
32192
32193  if test "x$new_path" = x; then
32194    # Oops. Which didn't find the executable.
32195    # The splitting of arguments from the executable at a space might have been incorrect,
32196    # since paths with space are more likely in Windows. Give it another try with the whole
32197    # argument.
32198    path="$complete"
32199    arguments="EOL"
32200    new_path="$path"
32201
32202  windows_path="$new_path"
32203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32204    unix_path=`$CYGPATH -u "$windows_path"`
32205    new_path="$unix_path"
32206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32208    new_path="$unix_path"
32209  fi
32210
32211
32212    new_path=`$WHICH "$new_path" 2> /dev/null`
32213    # bat and cmd files are not always considered executable in MSYS causing which
32214    # to not find them
32215    if test "x$new_path" = x \
32216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32218      new_path="$path"
32219
32220  windows_path="$new_path"
32221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32222    unix_path=`$CYGPATH -u "$windows_path"`
32223    new_path="$unix_path"
32224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32226    new_path="$unix_path"
32227  fi
32228
32229    fi
32230
32231    if test "x$new_path" = x; then
32232      # It's still not found. Now this is an unrecoverable error.
32233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32234$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32235      has_space=`$ECHO "$complete" | $GREP " "`
32236      if test "x$has_space" != x; then
32237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32239      fi
32240      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32241    fi
32242  fi
32243
32244  # Now new_path has a complete unix path to the binary
32245  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32246    # Keep paths in /bin as-is, but remove trailing .exe if any
32247    new_path="${new_path/%.exe/}"
32248    # Do not save /bin paths to all_fixpath_prefixes!
32249  else
32250    # Not in mixed or Windows style, start by that.
32251    new_path=`cmd //c echo $new_path`
32252
32253  input_path="$new_path"
32254  # Check if we need to convert this using DOS-style short mode. If the path
32255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32256  # take no chances and rewrite it.
32257  # Note: m4 eats our [], so we need to use [ and ] instead.
32258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32259  if test "x$has_forbidden_chars" != x; then
32260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32262  fi
32263
32264    # Output is in $new_path
32265
32266  windows_path="$new_path"
32267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32268    unix_path=`$CYGPATH -u "$windows_path"`
32269    new_path="$unix_path"
32270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32272    new_path="$unix_path"
32273  fi
32274
32275    # remove trailing .exe if any
32276    new_path="${new_path/%.exe/}"
32277
32278    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32279    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32280  fi
32281
32282    else
32283      # We're on a unix platform. Hooray! :)
32284      # First separate the path from the arguments. This will split at the first
32285      # space.
32286      complete="$CPP"
32287      path="${complete%% *}"
32288      tmp="$complete EOL"
32289      arguments="${tmp#* }"
32290
32291      # Cannot rely on the command "which" here since it doesn't always work.
32292      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32293      if test -z "$is_absolute_path"; then
32294        # Path to executable is not absolute. Find it.
32295        IFS_save="$IFS"
32296        IFS=:
32297        for p in $PATH; do
32298          if test -f "$p/$path" && test -x "$p/$path"; then
32299            new_path="$p/$path"
32300            break
32301          fi
32302        done
32303        IFS="$IFS_save"
32304      else
32305        # This is an absolute path, we can use it without further modifications.
32306        new_path="$path"
32307      fi
32308
32309      if test "x$new_path" = x; then
32310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32311$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32312        has_space=`$ECHO "$complete" | $GREP " "`
32313        if test "x$has_space" != x; then
32314          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32315$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32316        fi
32317        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32318      fi
32319    fi
32320
32321    # Now join together the path and the arguments once again
32322    if test "x$arguments" != xEOL; then
32323      new_complete="$new_path ${arguments% *}"
32324    else
32325      new_complete="$new_path"
32326    fi
32327
32328    if test "x$complete" != "x$new_complete"; then
32329      CPP="$new_complete"
32330      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32331$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32332    fi
32333  fi
32334
32335  ac_ext=cpp
32336ac_cpp='$CXXCPP $CPPFLAGS'
32337ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32338ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32339ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32341$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32342if test -z "$CXXCPP"; then
32343  if ${ac_cv_prog_CXXCPP+:} false; then :
32344  $as_echo_n "(cached) " >&6
32345else
32346      # Double quotes because CXXCPP needs to be expanded
32347    for CXXCPP in "$CXX -E" "/lib/cpp"
32348    do
32349      ac_preproc_ok=false
32350for ac_cxx_preproc_warn_flag in '' yes
32351do
32352  # Use a header file that comes with gcc, so configuring glibc
32353  # with a fresh cross-compiler works.
32354  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32355  # <limits.h> exists even on freestanding compilers.
32356  # On the NeXT, cc -E runs the code through the compiler's parser,
32357  # not just through cpp. "Syntax error" is here to catch this case.
32358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32359/* end confdefs.h.  */
32360#ifdef __STDC__
32361# include <limits.h>
32362#else
32363# include <assert.h>
32364#endif
32365		     Syntax error
32366_ACEOF
32367if ac_fn_cxx_try_cpp "$LINENO"; then :
32368
32369else
32370  # Broken: fails on valid input.
32371continue
32372fi
32373rm -f conftest.err conftest.i conftest.$ac_ext
32374
32375  # OK, works on sane cases.  Now check whether nonexistent headers
32376  # can be detected and how.
32377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32378/* end confdefs.h.  */
32379#include <ac_nonexistent.h>
32380_ACEOF
32381if ac_fn_cxx_try_cpp "$LINENO"; then :
32382  # Broken: success on invalid input.
32383continue
32384else
32385  # Passes both tests.
32386ac_preproc_ok=:
32387break
32388fi
32389rm -f conftest.err conftest.i conftest.$ac_ext
32390
32391done
32392# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32393rm -f conftest.i conftest.err conftest.$ac_ext
32394if $ac_preproc_ok; then :
32395  break
32396fi
32397
32398    done
32399    ac_cv_prog_CXXCPP=$CXXCPP
32400
32401fi
32402  CXXCPP=$ac_cv_prog_CXXCPP
32403else
32404  ac_cv_prog_CXXCPP=$CXXCPP
32405fi
32406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32407$as_echo "$CXXCPP" >&6; }
32408ac_preproc_ok=false
32409for ac_cxx_preproc_warn_flag in '' yes
32410do
32411  # Use a header file that comes with gcc, so configuring glibc
32412  # with a fresh cross-compiler works.
32413  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32414  # <limits.h> exists even on freestanding compilers.
32415  # On the NeXT, cc -E runs the code through the compiler's parser,
32416  # not just through cpp. "Syntax error" is here to catch this case.
32417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32418/* end confdefs.h.  */
32419#ifdef __STDC__
32420# include <limits.h>
32421#else
32422# include <assert.h>
32423#endif
32424		     Syntax error
32425_ACEOF
32426if ac_fn_cxx_try_cpp "$LINENO"; then :
32427
32428else
32429  # Broken: fails on valid input.
32430continue
32431fi
32432rm -f conftest.err conftest.i conftest.$ac_ext
32433
32434  # OK, works on sane cases.  Now check whether nonexistent headers
32435  # can be detected and how.
32436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32437/* end confdefs.h.  */
32438#include <ac_nonexistent.h>
32439_ACEOF
32440if ac_fn_cxx_try_cpp "$LINENO"; then :
32441  # Broken: success on invalid input.
32442continue
32443else
32444  # Passes both tests.
32445ac_preproc_ok=:
32446break
32447fi
32448rm -f conftest.err conftest.i conftest.$ac_ext
32449
32450done
32451# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32452rm -f conftest.i conftest.err conftest.$ac_ext
32453if $ac_preproc_ok; then :
32454
32455else
32456  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32458as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32459See \`config.log' for more details" "$LINENO" 5; }
32460fi
32461
32462ac_ext=cpp
32463ac_cpp='$CXXCPP $CPPFLAGS'
32464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32467
32468
32469  # Only process if variable expands to non-empty
32470
32471  if test "x$CXXCPP" != x; then
32472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32473
32474  # First separate the path from the arguments. This will split at the first
32475  # space.
32476  complete="$CXXCPP"
32477  path="${complete%% *}"
32478  tmp="$complete EOL"
32479  arguments="${tmp#* }"
32480
32481  # Input might be given as Windows format, start by converting to
32482  # unix format.
32483  new_path=`$CYGPATH -u "$path"`
32484
32485  # Now try to locate executable using which
32486  new_path=`$WHICH "$new_path" 2> /dev/null`
32487  # bat and cmd files are not always considered executable in cygwin causing which
32488  # to not find them
32489  if test "x$new_path" = x \
32490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32492    new_path=`$CYGPATH -u "$path"`
32493  fi
32494  if test "x$new_path" = x; then
32495    # Oops. Which didn't find the executable.
32496    # The splitting of arguments from the executable at a space might have been incorrect,
32497    # since paths with space are more likely in Windows. Give it another try with the whole
32498    # argument.
32499    path="$complete"
32500    arguments="EOL"
32501    new_path=`$CYGPATH -u "$path"`
32502    new_path=`$WHICH "$new_path" 2> /dev/null`
32503    # bat and cmd files are not always considered executable in cygwin causing which
32504    # to not find them
32505    if test "x$new_path" = x \
32506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32508      new_path=`$CYGPATH -u "$path"`
32509    fi
32510    if test "x$new_path" = x; then
32511      # It's still not found. Now this is an unrecoverable error.
32512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32513$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32514      has_space=`$ECHO "$complete" | $GREP " "`
32515      if test "x$has_space" != x; then
32516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32518      fi
32519      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32520    fi
32521  fi
32522
32523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32526  # "foo.exe" is OK but "foo" is an error.
32527  #
32528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32529  # It is also a way to make sure we got the proper file name for the real test later on.
32530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32531  if test "x$test_shortpath" = x; then
32532    # Short path failed, file does not exist as specified.
32533    # Try adding .exe or .cmd
32534    if test -f "${new_path}.exe"; then
32535      input_to_shortpath="${new_path}.exe"
32536    elif test -f "${new_path}.cmd"; then
32537      input_to_shortpath="${new_path}.cmd"
32538    else
32539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32540$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32543      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32544    fi
32545  else
32546    input_to_shortpath="$new_path"
32547  fi
32548
32549  # Call helper function which possibly converts this using DOS-style short mode.
32550  # If so, the updated path is stored in $new_path.
32551  new_path="$input_to_shortpath"
32552
32553  input_path="$input_to_shortpath"
32554  # Check if we need to convert this using DOS-style short mode. If the path
32555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32556  # take no chances and rewrite it.
32557  # Note: m4 eats our [], so we need to use [ and ] instead.
32558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32559  if test "x$has_forbidden_chars" != x; then
32560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32564      # Going to short mode and back again did indeed matter. Since short mode is
32565      # case insensitive, let's make it lowercase to improve readability.
32566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32567      # Now convert it back to Unix-style (cygpath)
32568      input_path=`$CYGPATH -u "$shortmode_path"`
32569      new_path="$input_path"
32570    fi
32571  fi
32572
32573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32574  if test "x$test_cygdrive_prefix" = x; then
32575    # As a simple fix, exclude /usr/bin since it's not a real path.
32576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32578      # a path prefixed by /cygdrive for fixpath to work.
32579      new_path="$CYGWIN_ROOT_PATH$input_path"
32580    fi
32581  fi
32582
32583  # remove trailing .exe if any
32584  new_path="${new_path/%.exe/}"
32585
32586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32587
32588  # First separate the path from the arguments. This will split at the first
32589  # space.
32590  complete="$CXXCPP"
32591  path="${complete%% *}"
32592  tmp="$complete EOL"
32593  arguments="${tmp#* }"
32594
32595  # Input might be given as Windows format, start by converting to
32596  # unix format.
32597  new_path="$path"
32598
32599  windows_path="$new_path"
32600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32601    unix_path=`$CYGPATH -u "$windows_path"`
32602    new_path="$unix_path"
32603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32605    new_path="$unix_path"
32606  fi
32607
32608
32609  # Now try to locate executable using which
32610  new_path=`$WHICH "$new_path" 2> /dev/null`
32611
32612  if test "x$new_path" = x; then
32613    # Oops. Which didn't find the executable.
32614    # The splitting of arguments from the executable at a space might have been incorrect,
32615    # since paths with space are more likely in Windows. Give it another try with the whole
32616    # argument.
32617    path="$complete"
32618    arguments="EOL"
32619    new_path="$path"
32620
32621  windows_path="$new_path"
32622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32623    unix_path=`$CYGPATH -u "$windows_path"`
32624    new_path="$unix_path"
32625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32627    new_path="$unix_path"
32628  fi
32629
32630
32631    new_path=`$WHICH "$new_path" 2> /dev/null`
32632    # bat and cmd files are not always considered executable in MSYS causing which
32633    # to not find them
32634    if test "x$new_path" = x \
32635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32637      new_path="$path"
32638
32639  windows_path="$new_path"
32640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32641    unix_path=`$CYGPATH -u "$windows_path"`
32642    new_path="$unix_path"
32643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32645    new_path="$unix_path"
32646  fi
32647
32648    fi
32649
32650    if test "x$new_path" = x; then
32651      # It's still not found. Now this is an unrecoverable error.
32652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32653$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32654      has_space=`$ECHO "$complete" | $GREP " "`
32655      if test "x$has_space" != x; then
32656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32658      fi
32659      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32660    fi
32661  fi
32662
32663  # Now new_path has a complete unix path to the binary
32664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32665    # Keep paths in /bin as-is, but remove trailing .exe if any
32666    new_path="${new_path/%.exe/}"
32667    # Do not save /bin paths to all_fixpath_prefixes!
32668  else
32669    # Not in mixed or Windows style, start by that.
32670    new_path=`cmd //c echo $new_path`
32671
32672  input_path="$new_path"
32673  # Check if we need to convert this using DOS-style short mode. If the path
32674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32675  # take no chances and rewrite it.
32676  # Note: m4 eats our [], so we need to use [ and ] instead.
32677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32678  if test "x$has_forbidden_chars" != x; then
32679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32681  fi
32682
32683    # Output is in $new_path
32684
32685  windows_path="$new_path"
32686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32687    unix_path=`$CYGPATH -u "$windows_path"`
32688    new_path="$unix_path"
32689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32691    new_path="$unix_path"
32692  fi
32693
32694    # remove trailing .exe if any
32695    new_path="${new_path/%.exe/}"
32696
32697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32699  fi
32700
32701    else
32702      # We're on a unix platform. Hooray! :)
32703      # First separate the path from the arguments. This will split at the first
32704      # space.
32705      complete="$CXXCPP"
32706      path="${complete%% *}"
32707      tmp="$complete EOL"
32708      arguments="${tmp#* }"
32709
32710      # Cannot rely on the command "which" here since it doesn't always work.
32711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32712      if test -z "$is_absolute_path"; then
32713        # Path to executable is not absolute. Find it.
32714        IFS_save="$IFS"
32715        IFS=:
32716        for p in $PATH; do
32717          if test -f "$p/$path" && test -x "$p/$path"; then
32718            new_path="$p/$path"
32719            break
32720          fi
32721        done
32722        IFS="$IFS_save"
32723      else
32724        # This is an absolute path, we can use it without further modifications.
32725        new_path="$path"
32726      fi
32727
32728      if test "x$new_path" = x; then
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32730$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32731        has_space=`$ECHO "$complete" | $GREP " "`
32732        if test "x$has_space" != x; then
32733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32735        fi
32736        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32737      fi
32738    fi
32739
32740    # Now join together the path and the arguments once again
32741    if test "x$arguments" != xEOL; then
32742      new_complete="$new_path ${arguments% *}"
32743    else
32744      new_complete="$new_path"
32745    fi
32746
32747    if test "x$complete" != "x$new_complete"; then
32748      CXXCPP="$new_complete"
32749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32750$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32751    fi
32752  fi
32753
32754
32755  #
32756  # Setup the linker (LD)
32757  #
32758  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32759    # In the Microsoft toolchain we have a separate LD command "link".
32760    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32761    # a cygwin program for something completely different.
32762    # Extract the first word of "link", so it can be a program name with args.
32763set dummy link; ac_word=$2
32764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32765$as_echo_n "checking for $ac_word... " >&6; }
32766if ${ac_cv_prog_LD+:} false; then :
32767  $as_echo_n "(cached) " >&6
32768else
32769  if test -n "$LD"; then
32770  ac_cv_prog_LD="$LD" # Let the user override the test.
32771else
32772  ac_prog_rejected=no
32773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32774for as_dir in $PATH
32775do
32776  IFS=$as_save_IFS
32777  test -z "$as_dir" && as_dir=.
32778    for ac_exec_ext in '' $ac_executable_extensions; do
32779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32780    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32781       ac_prog_rejected=yes
32782       continue
32783     fi
32784    ac_cv_prog_LD="link"
32785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32786    break 2
32787  fi
32788done
32789  done
32790IFS=$as_save_IFS
32791
32792if test $ac_prog_rejected = yes; then
32793  # We found a bogon in the path, so make sure we never use it.
32794  set dummy $ac_cv_prog_LD
32795  shift
32796  if test $# != 0; then
32797    # We chose a different compiler from the bogus one.
32798    # However, it has the same basename, so the bogon will be chosen
32799    # first if we set LD to just the basename; use the full file name.
32800    shift
32801    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32802  fi
32803fi
32804fi
32805fi
32806LD=$ac_cv_prog_LD
32807if test -n "$LD"; then
32808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32809$as_echo "$LD" >&6; }
32810else
32811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32812$as_echo "no" >&6; }
32813fi
32814
32815
32816
32817  # Only process if variable expands to non-empty
32818
32819  if test "x$LD" != x; then
32820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32821
32822  # First separate the path from the arguments. This will split at the first
32823  # space.
32824  complete="$LD"
32825  path="${complete%% *}"
32826  tmp="$complete EOL"
32827  arguments="${tmp#* }"
32828
32829  # Input might be given as Windows format, start by converting to
32830  # unix format.
32831  new_path=`$CYGPATH -u "$path"`
32832
32833  # Now try to locate executable using which
32834  new_path=`$WHICH "$new_path" 2> /dev/null`
32835  # bat and cmd files are not always considered executable in cygwin causing which
32836  # to not find them
32837  if test "x$new_path" = x \
32838      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32839      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32840    new_path=`$CYGPATH -u "$path"`
32841  fi
32842  if test "x$new_path" = x; then
32843    # Oops. Which didn't find the executable.
32844    # The splitting of arguments from the executable at a space might have been incorrect,
32845    # since paths with space are more likely in Windows. Give it another try with the whole
32846    # argument.
32847    path="$complete"
32848    arguments="EOL"
32849    new_path=`$CYGPATH -u "$path"`
32850    new_path=`$WHICH "$new_path" 2> /dev/null`
32851    # bat and cmd files are not always considered executable in cygwin causing which
32852    # to not find them
32853    if test "x$new_path" = x \
32854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32856      new_path=`$CYGPATH -u "$path"`
32857    fi
32858    if test "x$new_path" = x; then
32859      # It's still not found. Now this is an unrecoverable error.
32860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32861$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32862      has_space=`$ECHO "$complete" | $GREP " "`
32863      if test "x$has_space" != x; then
32864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32866      fi
32867      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32868    fi
32869  fi
32870
32871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32874  # "foo.exe" is OK but "foo" is an error.
32875  #
32876  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32877  # It is also a way to make sure we got the proper file name for the real test later on.
32878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32879  if test "x$test_shortpath" = x; then
32880    # Short path failed, file does not exist as specified.
32881    # Try adding .exe or .cmd
32882    if test -f "${new_path}.exe"; then
32883      input_to_shortpath="${new_path}.exe"
32884    elif test -f "${new_path}.cmd"; then
32885      input_to_shortpath="${new_path}.cmd"
32886    else
32887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32888$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32891      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32892    fi
32893  else
32894    input_to_shortpath="$new_path"
32895  fi
32896
32897  # Call helper function which possibly converts this using DOS-style short mode.
32898  # If so, the updated path is stored in $new_path.
32899  new_path="$input_to_shortpath"
32900
32901  input_path="$input_to_shortpath"
32902  # Check if we need to convert this using DOS-style short mode. If the path
32903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32904  # take no chances and rewrite it.
32905  # Note: m4 eats our [], so we need to use [ and ] instead.
32906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32907  if test "x$has_forbidden_chars" != x; then
32908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32912      # Going to short mode and back again did indeed matter. Since short mode is
32913      # case insensitive, let's make it lowercase to improve readability.
32914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32915      # Now convert it back to Unix-style (cygpath)
32916      input_path=`$CYGPATH -u "$shortmode_path"`
32917      new_path="$input_path"
32918    fi
32919  fi
32920
32921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32922  if test "x$test_cygdrive_prefix" = x; then
32923    # As a simple fix, exclude /usr/bin since it's not a real path.
32924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32926      # a path prefixed by /cygdrive for fixpath to work.
32927      new_path="$CYGWIN_ROOT_PATH$input_path"
32928    fi
32929  fi
32930
32931  # remove trailing .exe if any
32932  new_path="${new_path/%.exe/}"
32933
32934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32935
32936  # First separate the path from the arguments. This will split at the first
32937  # space.
32938  complete="$LD"
32939  path="${complete%% *}"
32940  tmp="$complete EOL"
32941  arguments="${tmp#* }"
32942
32943  # Input might be given as Windows format, start by converting to
32944  # unix format.
32945  new_path="$path"
32946
32947  windows_path="$new_path"
32948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32949    unix_path=`$CYGPATH -u "$windows_path"`
32950    new_path="$unix_path"
32951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32953    new_path="$unix_path"
32954  fi
32955
32956
32957  # Now try to locate executable using which
32958  new_path=`$WHICH "$new_path" 2> /dev/null`
32959
32960  if test "x$new_path" = x; then
32961    # Oops. Which didn't find the executable.
32962    # The splitting of arguments from the executable at a space might have been incorrect,
32963    # since paths with space are more likely in Windows. Give it another try with the whole
32964    # argument.
32965    path="$complete"
32966    arguments="EOL"
32967    new_path="$path"
32968
32969  windows_path="$new_path"
32970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32971    unix_path=`$CYGPATH -u "$windows_path"`
32972    new_path="$unix_path"
32973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32975    new_path="$unix_path"
32976  fi
32977
32978
32979    new_path=`$WHICH "$new_path" 2> /dev/null`
32980    # bat and cmd files are not always considered executable in MSYS causing which
32981    # to not find them
32982    if test "x$new_path" = x \
32983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32985      new_path="$path"
32986
32987  windows_path="$new_path"
32988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32989    unix_path=`$CYGPATH -u "$windows_path"`
32990    new_path="$unix_path"
32991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32993    new_path="$unix_path"
32994  fi
32995
32996    fi
32997
32998    if test "x$new_path" = x; then
32999      # It's still not found. Now this is an unrecoverable error.
33000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33001$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33002      has_space=`$ECHO "$complete" | $GREP " "`
33003      if test "x$has_space" != x; then
33004        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33005$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33006      fi
33007      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33008    fi
33009  fi
33010
33011  # Now new_path has a complete unix path to the binary
33012  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33013    # Keep paths in /bin as-is, but remove trailing .exe if any
33014    new_path="${new_path/%.exe/}"
33015    # Do not save /bin paths to all_fixpath_prefixes!
33016  else
33017    # Not in mixed or Windows style, start by that.
33018    new_path=`cmd //c echo $new_path`
33019
33020  input_path="$new_path"
33021  # Check if we need to convert this using DOS-style short mode. If the path
33022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33023  # take no chances and rewrite it.
33024  # Note: m4 eats our [], so we need to use [ and ] instead.
33025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33026  if test "x$has_forbidden_chars" != x; then
33027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33029  fi
33030
33031    # Output is in $new_path
33032
33033  windows_path="$new_path"
33034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33035    unix_path=`$CYGPATH -u "$windows_path"`
33036    new_path="$unix_path"
33037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33039    new_path="$unix_path"
33040  fi
33041
33042    # remove trailing .exe if any
33043    new_path="${new_path/%.exe/}"
33044
33045    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33046    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33047  fi
33048
33049    else
33050      # We're on a unix platform. Hooray! :)
33051      # First separate the path from the arguments. This will split at the first
33052      # space.
33053      complete="$LD"
33054      path="${complete%% *}"
33055      tmp="$complete EOL"
33056      arguments="${tmp#* }"
33057
33058      # Cannot rely on the command "which" here since it doesn't always work.
33059      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33060      if test -z "$is_absolute_path"; then
33061        # Path to executable is not absolute. Find it.
33062        IFS_save="$IFS"
33063        IFS=:
33064        for p in $PATH; do
33065          if test -f "$p/$path" && test -x "$p/$path"; then
33066            new_path="$p/$path"
33067            break
33068          fi
33069        done
33070        IFS="$IFS_save"
33071      else
33072        # This is an absolute path, we can use it without further modifications.
33073        new_path="$path"
33074      fi
33075
33076      if test "x$new_path" = x; then
33077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33078$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33079        has_space=`$ECHO "$complete" | $GREP " "`
33080        if test "x$has_space" != x; then
33081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33083        fi
33084        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33085      fi
33086    fi
33087
33088    # Now join together the path and the arguments once again
33089    if test "x$arguments" != xEOL; then
33090      new_complete="$new_path ${arguments% *}"
33091    else
33092      new_complete="$new_path"
33093    fi
33094
33095    if test "x$complete" != "x$new_complete"; then
33096      LD="$new_complete"
33097      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
33098$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
33099    fi
33100  fi
33101
33102    # Verify that we indeed succeeded with this trick.
33103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33104$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33105    "$LD" --version > /dev/null
33106    if test $? -eq 0 ; then
33107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33108$as_echo "no" >&6; }
33109      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33110    else
33111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33112$as_echo "yes" >&6; }
33113    fi
33114    LDCXX="$LD"
33115  else
33116    # All other toolchains use the compiler to link.
33117    LD="$CC"
33118    LDCXX="$CXX"
33119  fi
33120
33121  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
33122
33123
33124  #
33125  # Setup the assembler (AS)
33126  #
33127  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
33128    # FIXME: should this really be solaris, or solstudio?
33129
33130
33131  # Publish this variable in the help.
33132
33133
33134  if test "x$AS" = x; then
33135    # The variable is not set by user, try to locate tool using the code snippet
33136    for ac_prog in as
33137do
33138  # Extract the first word of "$ac_prog", so it can be a program name with args.
33139set dummy $ac_prog; ac_word=$2
33140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33141$as_echo_n "checking for $ac_word... " >&6; }
33142if ${ac_cv_path_AS+:} false; then :
33143  $as_echo_n "(cached) " >&6
33144else
33145  case $AS in
33146  [\\/]* | ?:[\\/]*)
33147  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33148  ;;
33149  *)
33150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33151for as_dir in $PATH
33152do
33153  IFS=$as_save_IFS
33154  test -z "$as_dir" && as_dir=.
33155    for ac_exec_ext in '' $ac_executable_extensions; do
33156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33157    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33159    break 2
33160  fi
33161done
33162  done
33163IFS=$as_save_IFS
33164
33165  ;;
33166esac
33167fi
33168AS=$ac_cv_path_AS
33169if test -n "$AS"; then
33170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33171$as_echo "$AS" >&6; }
33172else
33173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33174$as_echo "no" >&6; }
33175fi
33176
33177
33178  test -n "$AS" && break
33179done
33180
33181  else
33182    # The variable is set, but is it from the command line or the environment?
33183
33184    # Try to remove the string !AS! from our list.
33185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33187      # If it failed, the variable was not from the command line. Ignore it,
33188      # but warn the user (except for BASH, which is always set by the calling BASH).
33189      if test "xAS" != xBASH; then
33190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33191$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33192      fi
33193      # Try to locate tool using the code snippet
33194      for ac_prog in as
33195do
33196  # Extract the first word of "$ac_prog", so it can be a program name with args.
33197set dummy $ac_prog; ac_word=$2
33198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33199$as_echo_n "checking for $ac_word... " >&6; }
33200if ${ac_cv_path_AS+:} false; then :
33201  $as_echo_n "(cached) " >&6
33202else
33203  case $AS in
33204  [\\/]* | ?:[\\/]*)
33205  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33206  ;;
33207  *)
33208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33209for as_dir in $PATH
33210do
33211  IFS=$as_save_IFS
33212  test -z "$as_dir" && as_dir=.
33213    for ac_exec_ext in '' $ac_executable_extensions; do
33214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33215    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33217    break 2
33218  fi
33219done
33220  done
33221IFS=$as_save_IFS
33222
33223  ;;
33224esac
33225fi
33226AS=$ac_cv_path_AS
33227if test -n "$AS"; then
33228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33229$as_echo "$AS" >&6; }
33230else
33231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33232$as_echo "no" >&6; }
33233fi
33234
33235
33236  test -n "$AS" && break
33237done
33238
33239    else
33240      # If it succeeded, then it was overridden by the user. We will use it
33241      # for the tool.
33242
33243      # First remove it from the list of overridden variables, so we can test
33244      # for unknown variables in the end.
33245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33246
33247      # Check if the provided tool contains a complete path.
33248      tool_specified="$AS"
33249      tool_basename="${tool_specified##*/}"
33250      if test "x$tool_basename" = "x$tool_specified"; then
33251        # A command without a complete path is provided, search $PATH.
33252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33253$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33254        # Extract the first word of "$tool_basename", so it can be a program name with args.
33255set dummy $tool_basename; ac_word=$2
33256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33257$as_echo_n "checking for $ac_word... " >&6; }
33258if ${ac_cv_path_AS+:} false; then :
33259  $as_echo_n "(cached) " >&6
33260else
33261  case $AS in
33262  [\\/]* | ?:[\\/]*)
33263  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33264  ;;
33265  *)
33266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33267for as_dir in $PATH
33268do
33269  IFS=$as_save_IFS
33270  test -z "$as_dir" && as_dir=.
33271    for ac_exec_ext in '' $ac_executable_extensions; do
33272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33273    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33275    break 2
33276  fi
33277done
33278  done
33279IFS=$as_save_IFS
33280
33281  ;;
33282esac
33283fi
33284AS=$ac_cv_path_AS
33285if test -n "$AS"; then
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33287$as_echo "$AS" >&6; }
33288else
33289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33290$as_echo "no" >&6; }
33291fi
33292
33293
33294        if test "x$AS" = x; then
33295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33296        fi
33297      else
33298        # Otherwise we believe it is a complete path. Use it as it is.
33299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33300$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33302$as_echo_n "checking for AS... " >&6; }
33303        if test ! -x "$tool_specified"; then
33304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33305$as_echo "not found" >&6; }
33306          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33307        fi
33308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33309$as_echo "$tool_specified" >&6; }
33310      fi
33311    fi
33312  fi
33313
33314
33315
33316  # Only process if variable expands to non-empty
33317
33318  if test "x$AS" != x; then
33319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33320
33321  # First separate the path from the arguments. This will split at the first
33322  # space.
33323  complete="$AS"
33324  path="${complete%% *}"
33325  tmp="$complete EOL"
33326  arguments="${tmp#* }"
33327
33328  # Input might be given as Windows format, start by converting to
33329  # unix format.
33330  new_path=`$CYGPATH -u "$path"`
33331
33332  # Now try to locate executable using which
33333  new_path=`$WHICH "$new_path" 2> /dev/null`
33334  # bat and cmd files are not always considered executable in cygwin causing which
33335  # to not find them
33336  if test "x$new_path" = x \
33337      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33338      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33339    new_path=`$CYGPATH -u "$path"`
33340  fi
33341  if test "x$new_path" = x; then
33342    # Oops. Which didn't find the executable.
33343    # The splitting of arguments from the executable at a space might have been incorrect,
33344    # since paths with space are more likely in Windows. Give it another try with the whole
33345    # argument.
33346    path="$complete"
33347    arguments="EOL"
33348    new_path=`$CYGPATH -u "$path"`
33349    new_path=`$WHICH "$new_path" 2> /dev/null`
33350    # bat and cmd files are not always considered executable in cygwin causing which
33351    # to not find them
33352    if test "x$new_path" = x \
33353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33355      new_path=`$CYGPATH -u "$path"`
33356    fi
33357    if test "x$new_path" = x; then
33358      # It's still not found. Now this is an unrecoverable error.
33359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33360$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33361      has_space=`$ECHO "$complete" | $GREP " "`
33362      if test "x$has_space" != x; then
33363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33365      fi
33366      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33367    fi
33368  fi
33369
33370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33373  # "foo.exe" is OK but "foo" is an error.
33374  #
33375  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33376  # It is also a way to make sure we got the proper file name for the real test later on.
33377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33378  if test "x$test_shortpath" = x; then
33379    # Short path failed, file does not exist as specified.
33380    # Try adding .exe or .cmd
33381    if test -f "${new_path}.exe"; then
33382      input_to_shortpath="${new_path}.exe"
33383    elif test -f "${new_path}.cmd"; then
33384      input_to_shortpath="${new_path}.cmd"
33385    else
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33387$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33390      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33391    fi
33392  else
33393    input_to_shortpath="$new_path"
33394  fi
33395
33396  # Call helper function which possibly converts this using DOS-style short mode.
33397  # If so, the updated path is stored in $new_path.
33398  new_path="$input_to_shortpath"
33399
33400  input_path="$input_to_shortpath"
33401  # Check if we need to convert this using DOS-style short mode. If the path
33402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33403  # take no chances and rewrite it.
33404  # Note: m4 eats our [], so we need to use [ and ] instead.
33405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33406  if test "x$has_forbidden_chars" != x; then
33407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33411      # Going to short mode and back again did indeed matter. Since short mode is
33412      # case insensitive, let's make it lowercase to improve readability.
33413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33414      # Now convert it back to Unix-style (cygpath)
33415      input_path=`$CYGPATH -u "$shortmode_path"`
33416      new_path="$input_path"
33417    fi
33418  fi
33419
33420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33421  if test "x$test_cygdrive_prefix" = x; then
33422    # As a simple fix, exclude /usr/bin since it's not a real path.
33423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33425      # a path prefixed by /cygdrive for fixpath to work.
33426      new_path="$CYGWIN_ROOT_PATH$input_path"
33427    fi
33428  fi
33429
33430  # remove trailing .exe if any
33431  new_path="${new_path/%.exe/}"
33432
33433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33434
33435  # First separate the path from the arguments. This will split at the first
33436  # space.
33437  complete="$AS"
33438  path="${complete%% *}"
33439  tmp="$complete EOL"
33440  arguments="${tmp#* }"
33441
33442  # Input might be given as Windows format, start by converting to
33443  # unix format.
33444  new_path="$path"
33445
33446  windows_path="$new_path"
33447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33448    unix_path=`$CYGPATH -u "$windows_path"`
33449    new_path="$unix_path"
33450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33452    new_path="$unix_path"
33453  fi
33454
33455
33456  # Now try to locate executable using which
33457  new_path=`$WHICH "$new_path" 2> /dev/null`
33458
33459  if test "x$new_path" = x; then
33460    # Oops. Which didn't find the executable.
33461    # The splitting of arguments from the executable at a space might have been incorrect,
33462    # since paths with space are more likely in Windows. Give it another try with the whole
33463    # argument.
33464    path="$complete"
33465    arguments="EOL"
33466    new_path="$path"
33467
33468  windows_path="$new_path"
33469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33470    unix_path=`$CYGPATH -u "$windows_path"`
33471    new_path="$unix_path"
33472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33474    new_path="$unix_path"
33475  fi
33476
33477
33478    new_path=`$WHICH "$new_path" 2> /dev/null`
33479    # bat and cmd files are not always considered executable in MSYS causing which
33480    # to not find them
33481    if test "x$new_path" = x \
33482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33484      new_path="$path"
33485
33486  windows_path="$new_path"
33487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33488    unix_path=`$CYGPATH -u "$windows_path"`
33489    new_path="$unix_path"
33490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33492    new_path="$unix_path"
33493  fi
33494
33495    fi
33496
33497    if test "x$new_path" = x; then
33498      # It's still not found. Now this is an unrecoverable error.
33499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33500$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33501      has_space=`$ECHO "$complete" | $GREP " "`
33502      if test "x$has_space" != x; then
33503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33505      fi
33506      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33507    fi
33508  fi
33509
33510  # Now new_path has a complete unix path to the binary
33511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33512    # Keep paths in /bin as-is, but remove trailing .exe if any
33513    new_path="${new_path/%.exe/}"
33514    # Do not save /bin paths to all_fixpath_prefixes!
33515  else
33516    # Not in mixed or Windows style, start by that.
33517    new_path=`cmd //c echo $new_path`
33518
33519  input_path="$new_path"
33520  # Check if we need to convert this using DOS-style short mode. If the path
33521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33522  # take no chances and rewrite it.
33523  # Note: m4 eats our [], so we need to use [ and ] instead.
33524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33525  if test "x$has_forbidden_chars" != x; then
33526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33528  fi
33529
33530    # Output is in $new_path
33531
33532  windows_path="$new_path"
33533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33534    unix_path=`$CYGPATH -u "$windows_path"`
33535    new_path="$unix_path"
33536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33538    new_path="$unix_path"
33539  fi
33540
33541    # remove trailing .exe if any
33542    new_path="${new_path/%.exe/}"
33543
33544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33546  fi
33547
33548    else
33549      # We're on a unix platform. Hooray! :)
33550      # First separate the path from the arguments. This will split at the first
33551      # space.
33552      complete="$AS"
33553      path="${complete%% *}"
33554      tmp="$complete EOL"
33555      arguments="${tmp#* }"
33556
33557      # Cannot rely on the command "which" here since it doesn't always work.
33558      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33559      if test -z "$is_absolute_path"; then
33560        # Path to executable is not absolute. Find it.
33561        IFS_save="$IFS"
33562        IFS=:
33563        for p in $PATH; do
33564          if test -f "$p/$path" && test -x "$p/$path"; then
33565            new_path="$p/$path"
33566            break
33567          fi
33568        done
33569        IFS="$IFS_save"
33570      else
33571        # This is an absolute path, we can use it without further modifications.
33572        new_path="$path"
33573      fi
33574
33575      if test "x$new_path" = x; then
33576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33577$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33578        has_space=`$ECHO "$complete" | $GREP " "`
33579        if test "x$has_space" != x; then
33580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33582        fi
33583        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33584      fi
33585    fi
33586
33587    # Now join together the path and the arguments once again
33588    if test "x$arguments" != xEOL; then
33589      new_complete="$new_path ${arguments% *}"
33590    else
33591      new_complete="$new_path"
33592    fi
33593
33594    if test "x$complete" != "x$new_complete"; then
33595      AS="$new_complete"
33596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33597$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33598    fi
33599  fi
33600
33601  else
33602    # FIXME: is this correct for microsoft?
33603    AS="$CC -c"
33604  fi
33605
33606
33607  #
33608  # Setup the archiver (AR)
33609  #
33610  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33611    # The corresponding ar tool is lib.exe (used to create static libraries)
33612    # Extract the first word of "lib", so it can be a program name with args.
33613set dummy lib; ac_word=$2
33614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33615$as_echo_n "checking for $ac_word... " >&6; }
33616if ${ac_cv_prog_AR+:} false; then :
33617  $as_echo_n "(cached) " >&6
33618else
33619  if test -n "$AR"; then
33620  ac_cv_prog_AR="$AR" # Let the user override the test.
33621else
33622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33623for as_dir in $PATH
33624do
33625  IFS=$as_save_IFS
33626  test -z "$as_dir" && as_dir=.
33627    for ac_exec_ext in '' $ac_executable_extensions; do
33628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33629    ac_cv_prog_AR="lib"
33630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33631    break 2
33632  fi
33633done
33634  done
33635IFS=$as_save_IFS
33636
33637fi
33638fi
33639AR=$ac_cv_prog_AR
33640if test -n "$AR"; then
33641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33642$as_echo "$AR" >&6; }
33643else
33644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33645$as_echo "no" >&6; }
33646fi
33647
33648
33649  else
33650
33651
33652  # Publish this variable in the help.
33653
33654
33655  if test "x$AR" = x; then
33656    # The variable is not set by user, try to locate tool using the code snippet
33657    if test -n "$ac_tool_prefix"; then
33658  for ac_prog in ar
33659  do
33660    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33663$as_echo_n "checking for $ac_word... " >&6; }
33664if ${ac_cv_prog_AR+:} false; then :
33665  $as_echo_n "(cached) " >&6
33666else
33667  if test -n "$AR"; then
33668  ac_cv_prog_AR="$AR" # Let the user override the test.
33669else
33670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33671for as_dir in $PATH
33672do
33673  IFS=$as_save_IFS
33674  test -z "$as_dir" && as_dir=.
33675    for ac_exec_ext in '' $ac_executable_extensions; do
33676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33677    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33679    break 2
33680  fi
33681done
33682  done
33683IFS=$as_save_IFS
33684
33685fi
33686fi
33687AR=$ac_cv_prog_AR
33688if test -n "$AR"; then
33689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33690$as_echo "$AR" >&6; }
33691else
33692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33693$as_echo "no" >&6; }
33694fi
33695
33696
33697    test -n "$AR" && break
33698  done
33699fi
33700if test -z "$AR"; then
33701  ac_ct_AR=$AR
33702  for ac_prog in ar
33703do
33704  # Extract the first word of "$ac_prog", so it can be a program name with args.
33705set dummy $ac_prog; ac_word=$2
33706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33707$as_echo_n "checking for $ac_word... " >&6; }
33708if ${ac_cv_prog_ac_ct_AR+:} false; then :
33709  $as_echo_n "(cached) " >&6
33710else
33711  if test -n "$ac_ct_AR"; then
33712  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33713else
33714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33715for as_dir in $PATH
33716do
33717  IFS=$as_save_IFS
33718  test -z "$as_dir" && as_dir=.
33719    for ac_exec_ext in '' $ac_executable_extensions; do
33720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33721    ac_cv_prog_ac_ct_AR="$ac_prog"
33722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33723    break 2
33724  fi
33725done
33726  done
33727IFS=$as_save_IFS
33728
33729fi
33730fi
33731ac_ct_AR=$ac_cv_prog_ac_ct_AR
33732if test -n "$ac_ct_AR"; then
33733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33734$as_echo "$ac_ct_AR" >&6; }
33735else
33736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33737$as_echo "no" >&6; }
33738fi
33739
33740
33741  test -n "$ac_ct_AR" && break
33742done
33743
33744  if test "x$ac_ct_AR" = x; then
33745    AR=""
33746  else
33747    case $cross_compiling:$ac_tool_warned in
33748yes:)
33749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33751ac_tool_warned=yes ;;
33752esac
33753    AR=$ac_ct_AR
33754  fi
33755fi
33756
33757  else
33758    # The variable is set, but is it from the command line or the environment?
33759
33760    # Try to remove the string !AR! from our list.
33761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33763      # If it failed, the variable was not from the command line. Ignore it,
33764      # but warn the user (except for BASH, which is always set by the calling BASH).
33765      if test "xAR" != xBASH; then
33766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33767$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33768      fi
33769      # Try to locate tool using the code snippet
33770      if test -n "$ac_tool_prefix"; then
33771  for ac_prog in ar
33772  do
33773    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33774set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33776$as_echo_n "checking for $ac_word... " >&6; }
33777if ${ac_cv_prog_AR+:} false; then :
33778  $as_echo_n "(cached) " >&6
33779else
33780  if test -n "$AR"; then
33781  ac_cv_prog_AR="$AR" # Let the user override the test.
33782else
33783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33784for as_dir in $PATH
33785do
33786  IFS=$as_save_IFS
33787  test -z "$as_dir" && as_dir=.
33788    for ac_exec_ext in '' $ac_executable_extensions; do
33789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33790    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33792    break 2
33793  fi
33794done
33795  done
33796IFS=$as_save_IFS
33797
33798fi
33799fi
33800AR=$ac_cv_prog_AR
33801if test -n "$AR"; then
33802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33803$as_echo "$AR" >&6; }
33804else
33805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33806$as_echo "no" >&6; }
33807fi
33808
33809
33810    test -n "$AR" && break
33811  done
33812fi
33813if test -z "$AR"; then
33814  ac_ct_AR=$AR
33815  for ac_prog in ar
33816do
33817  # Extract the first word of "$ac_prog", so it can be a program name with args.
33818set dummy $ac_prog; ac_word=$2
33819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33820$as_echo_n "checking for $ac_word... " >&6; }
33821if ${ac_cv_prog_ac_ct_AR+:} false; then :
33822  $as_echo_n "(cached) " >&6
33823else
33824  if test -n "$ac_ct_AR"; then
33825  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33826else
33827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33828for as_dir in $PATH
33829do
33830  IFS=$as_save_IFS
33831  test -z "$as_dir" && as_dir=.
33832    for ac_exec_ext in '' $ac_executable_extensions; do
33833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33834    ac_cv_prog_ac_ct_AR="$ac_prog"
33835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33836    break 2
33837  fi
33838done
33839  done
33840IFS=$as_save_IFS
33841
33842fi
33843fi
33844ac_ct_AR=$ac_cv_prog_ac_ct_AR
33845if test -n "$ac_ct_AR"; then
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33847$as_echo "$ac_ct_AR" >&6; }
33848else
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33850$as_echo "no" >&6; }
33851fi
33852
33853
33854  test -n "$ac_ct_AR" && break
33855done
33856
33857  if test "x$ac_ct_AR" = x; then
33858    AR=""
33859  else
33860    case $cross_compiling:$ac_tool_warned in
33861yes:)
33862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33864ac_tool_warned=yes ;;
33865esac
33866    AR=$ac_ct_AR
33867  fi
33868fi
33869
33870    else
33871      # If it succeeded, then it was overridden by the user. We will use it
33872      # for the tool.
33873
33874      # First remove it from the list of overridden variables, so we can test
33875      # for unknown variables in the end.
33876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33877
33878      # Check if the provided tool contains a complete path.
33879      tool_specified="$AR"
33880      tool_basename="${tool_specified##*/}"
33881      if test "x$tool_basename" = "x$tool_specified"; then
33882        # A command without a complete path is provided, search $PATH.
33883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33884$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33885        # Extract the first word of "$tool_basename", so it can be a program name with args.
33886set dummy $tool_basename; ac_word=$2
33887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33888$as_echo_n "checking for $ac_word... " >&6; }
33889if ${ac_cv_path_AR+:} false; then :
33890  $as_echo_n "(cached) " >&6
33891else
33892  case $AR in
33893  [\\/]* | ?:[\\/]*)
33894  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33895  ;;
33896  *)
33897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33898for as_dir in $PATH
33899do
33900  IFS=$as_save_IFS
33901  test -z "$as_dir" && as_dir=.
33902    for ac_exec_ext in '' $ac_executable_extensions; do
33903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33904    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33906    break 2
33907  fi
33908done
33909  done
33910IFS=$as_save_IFS
33911
33912  ;;
33913esac
33914fi
33915AR=$ac_cv_path_AR
33916if test -n "$AR"; then
33917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33918$as_echo "$AR" >&6; }
33919else
33920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33921$as_echo "no" >&6; }
33922fi
33923
33924
33925        if test "x$AR" = x; then
33926          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33927        fi
33928      else
33929        # Otherwise we believe it is a complete path. Use it as it is.
33930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33931$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33933$as_echo_n "checking for AR... " >&6; }
33934        if test ! -x "$tool_specified"; then
33935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33936$as_echo "not found" >&6; }
33937          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33938        fi
33939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33940$as_echo "$tool_specified" >&6; }
33941      fi
33942    fi
33943  fi
33944
33945
33946  fi
33947
33948  # Only process if variable expands to non-empty
33949
33950  if test "x$AR" != x; then
33951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33952
33953  # First separate the path from the arguments. This will split at the first
33954  # space.
33955  complete="$AR"
33956  path="${complete%% *}"
33957  tmp="$complete EOL"
33958  arguments="${tmp#* }"
33959
33960  # Input might be given as Windows format, start by converting to
33961  # unix format.
33962  new_path=`$CYGPATH -u "$path"`
33963
33964  # Now try to locate executable using which
33965  new_path=`$WHICH "$new_path" 2> /dev/null`
33966  # bat and cmd files are not always considered executable in cygwin causing which
33967  # to not find them
33968  if test "x$new_path" = x \
33969      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33970      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33971    new_path=`$CYGPATH -u "$path"`
33972  fi
33973  if test "x$new_path" = x; then
33974    # Oops. Which didn't find the executable.
33975    # The splitting of arguments from the executable at a space might have been incorrect,
33976    # since paths with space are more likely in Windows. Give it another try with the whole
33977    # argument.
33978    path="$complete"
33979    arguments="EOL"
33980    new_path=`$CYGPATH -u "$path"`
33981    new_path=`$WHICH "$new_path" 2> /dev/null`
33982    # bat and cmd files are not always considered executable in cygwin causing which
33983    # to not find them
33984    if test "x$new_path" = x \
33985        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33986        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33987      new_path=`$CYGPATH -u "$path"`
33988    fi
33989    if test "x$new_path" = x; then
33990      # It's still not found. Now this is an unrecoverable error.
33991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33992$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33993      has_space=`$ECHO "$complete" | $GREP " "`
33994      if test "x$has_space" != x; then
33995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33997      fi
33998      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33999    fi
34000  fi
34001
34002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34005  # "foo.exe" is OK but "foo" is an error.
34006  #
34007  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34008  # It is also a way to make sure we got the proper file name for the real test later on.
34009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34010  if test "x$test_shortpath" = x; then
34011    # Short path failed, file does not exist as specified.
34012    # Try adding .exe or .cmd
34013    if test -f "${new_path}.exe"; then
34014      input_to_shortpath="${new_path}.exe"
34015    elif test -f "${new_path}.cmd"; then
34016      input_to_shortpath="${new_path}.cmd"
34017    else
34018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
34019$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
34020      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34022      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34023    fi
34024  else
34025    input_to_shortpath="$new_path"
34026  fi
34027
34028  # Call helper function which possibly converts this using DOS-style short mode.
34029  # If so, the updated path is stored in $new_path.
34030  new_path="$input_to_shortpath"
34031
34032  input_path="$input_to_shortpath"
34033  # Check if we need to convert this using DOS-style short mode. If the path
34034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34035  # take no chances and rewrite it.
34036  # Note: m4 eats our [], so we need to use [ and ] instead.
34037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34038  if test "x$has_forbidden_chars" != x; then
34039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34043      # Going to short mode and back again did indeed matter. Since short mode is
34044      # case insensitive, let's make it lowercase to improve readability.
34045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34046      # Now convert it back to Unix-style (cygpath)
34047      input_path=`$CYGPATH -u "$shortmode_path"`
34048      new_path="$input_path"
34049    fi
34050  fi
34051
34052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34053  if test "x$test_cygdrive_prefix" = x; then
34054    # As a simple fix, exclude /usr/bin since it's not a real path.
34055    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34057      # a path prefixed by /cygdrive for fixpath to work.
34058      new_path="$CYGWIN_ROOT_PATH$input_path"
34059    fi
34060  fi
34061
34062  # remove trailing .exe if any
34063  new_path="${new_path/%.exe/}"
34064
34065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34066
34067  # First separate the path from the arguments. This will split at the first
34068  # space.
34069  complete="$AR"
34070  path="${complete%% *}"
34071  tmp="$complete EOL"
34072  arguments="${tmp#* }"
34073
34074  # Input might be given as Windows format, start by converting to
34075  # unix format.
34076  new_path="$path"
34077
34078  windows_path="$new_path"
34079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34080    unix_path=`$CYGPATH -u "$windows_path"`
34081    new_path="$unix_path"
34082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34084    new_path="$unix_path"
34085  fi
34086
34087
34088  # Now try to locate executable using which
34089  new_path=`$WHICH "$new_path" 2> /dev/null`
34090
34091  if test "x$new_path" = x; then
34092    # Oops. Which didn't find the executable.
34093    # The splitting of arguments from the executable at a space might have been incorrect,
34094    # since paths with space are more likely in Windows. Give it another try with the whole
34095    # argument.
34096    path="$complete"
34097    arguments="EOL"
34098    new_path="$path"
34099
34100  windows_path="$new_path"
34101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34102    unix_path=`$CYGPATH -u "$windows_path"`
34103    new_path="$unix_path"
34104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34106    new_path="$unix_path"
34107  fi
34108
34109
34110    new_path=`$WHICH "$new_path" 2> /dev/null`
34111    # bat and cmd files are not always considered executable in MSYS causing which
34112    # to not find them
34113    if test "x$new_path" = x \
34114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34116      new_path="$path"
34117
34118  windows_path="$new_path"
34119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34120    unix_path=`$CYGPATH -u "$windows_path"`
34121    new_path="$unix_path"
34122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34124    new_path="$unix_path"
34125  fi
34126
34127    fi
34128
34129    if test "x$new_path" = x; then
34130      # It's still not found. Now this is an unrecoverable error.
34131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34132$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34133      has_space=`$ECHO "$complete" | $GREP " "`
34134      if test "x$has_space" != x; then
34135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34137      fi
34138      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34139    fi
34140  fi
34141
34142  # Now new_path has a complete unix path to the binary
34143  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34144    # Keep paths in /bin as-is, but remove trailing .exe if any
34145    new_path="${new_path/%.exe/}"
34146    # Do not save /bin paths to all_fixpath_prefixes!
34147  else
34148    # Not in mixed or Windows style, start by that.
34149    new_path=`cmd //c echo $new_path`
34150
34151  input_path="$new_path"
34152  # Check if we need to convert this using DOS-style short mode. If the path
34153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34154  # take no chances and rewrite it.
34155  # Note: m4 eats our [], so we need to use [ and ] instead.
34156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34157  if test "x$has_forbidden_chars" != x; then
34158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34160  fi
34161
34162    # Output is in $new_path
34163
34164  windows_path="$new_path"
34165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34166    unix_path=`$CYGPATH -u "$windows_path"`
34167    new_path="$unix_path"
34168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34170    new_path="$unix_path"
34171  fi
34172
34173    # remove trailing .exe if any
34174    new_path="${new_path/%.exe/}"
34175
34176    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34177    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34178  fi
34179
34180    else
34181      # We're on a unix platform. Hooray! :)
34182      # First separate the path from the arguments. This will split at the first
34183      # space.
34184      complete="$AR"
34185      path="${complete%% *}"
34186      tmp="$complete EOL"
34187      arguments="${tmp#* }"
34188
34189      # Cannot rely on the command "which" here since it doesn't always work.
34190      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34191      if test -z "$is_absolute_path"; then
34192        # Path to executable is not absolute. Find it.
34193        IFS_save="$IFS"
34194        IFS=:
34195        for p in $PATH; do
34196          if test -f "$p/$path" && test -x "$p/$path"; then
34197            new_path="$p/$path"
34198            break
34199          fi
34200        done
34201        IFS="$IFS_save"
34202      else
34203        # This is an absolute path, we can use it without further modifications.
34204        new_path="$path"
34205      fi
34206
34207      if test "x$new_path" = x; then
34208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34209$as_echo "$as_me: The path of AR, 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}: This might be caused by spaces in the path, which is not allowed." >&5
34213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34214        fi
34215        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34216      fi
34217    fi
34218
34219    # Now join together the path and the arguments once again
34220    if test "x$arguments" != xEOL; then
34221      new_complete="$new_path ${arguments% *}"
34222    else
34223      new_complete="$new_path"
34224    fi
34225
34226    if test "x$complete" != "x$new_complete"; then
34227      AR="$new_complete"
34228      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34229$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34230    fi
34231  fi
34232
34233
34234
34235  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34236
34237
34238  # Publish this variable in the help.
34239
34240
34241  if test "x$LIPO" = x; then
34242    # The variable is not set by user, try to locate tool using the code snippet
34243    for ac_prog in lipo
34244do
34245  # Extract the first word of "$ac_prog", so it can be a program name with args.
34246set dummy $ac_prog; ac_word=$2
34247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34248$as_echo_n "checking for $ac_word... " >&6; }
34249if ${ac_cv_path_LIPO+:} false; then :
34250  $as_echo_n "(cached) " >&6
34251else
34252  case $LIPO in
34253  [\\/]* | ?:[\\/]*)
34254  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34255  ;;
34256  *)
34257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34258for as_dir in $PATH
34259do
34260  IFS=$as_save_IFS
34261  test -z "$as_dir" && as_dir=.
34262    for ac_exec_ext in '' $ac_executable_extensions; do
34263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34264    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34266    break 2
34267  fi
34268done
34269  done
34270IFS=$as_save_IFS
34271
34272  ;;
34273esac
34274fi
34275LIPO=$ac_cv_path_LIPO
34276if test -n "$LIPO"; then
34277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34278$as_echo "$LIPO" >&6; }
34279else
34280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34281$as_echo "no" >&6; }
34282fi
34283
34284
34285  test -n "$LIPO" && break
34286done
34287
34288  else
34289    # The variable is set, but is it from the command line or the environment?
34290
34291    # Try to remove the string !LIPO! from our list.
34292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34294      # If it failed, the variable was not from the command line. Ignore it,
34295      # but warn the user (except for BASH, which is always set by the calling BASH).
34296      if test "xLIPO" != xBASH; then
34297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34298$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34299      fi
34300      # Try to locate tool using the code snippet
34301      for ac_prog in lipo
34302do
34303  # Extract the first word of "$ac_prog", so it can be a program name with args.
34304set dummy $ac_prog; ac_word=$2
34305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34306$as_echo_n "checking for $ac_word... " >&6; }
34307if ${ac_cv_path_LIPO+:} false; then :
34308  $as_echo_n "(cached) " >&6
34309else
34310  case $LIPO in
34311  [\\/]* | ?:[\\/]*)
34312  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34313  ;;
34314  *)
34315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34316for as_dir in $PATH
34317do
34318  IFS=$as_save_IFS
34319  test -z "$as_dir" && as_dir=.
34320    for ac_exec_ext in '' $ac_executable_extensions; do
34321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34322    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34324    break 2
34325  fi
34326done
34327  done
34328IFS=$as_save_IFS
34329
34330  ;;
34331esac
34332fi
34333LIPO=$ac_cv_path_LIPO
34334if test -n "$LIPO"; then
34335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34336$as_echo "$LIPO" >&6; }
34337else
34338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34339$as_echo "no" >&6; }
34340fi
34341
34342
34343  test -n "$LIPO" && break
34344done
34345
34346    else
34347      # If it succeeded, then it was overridden by the user. We will use it
34348      # for the tool.
34349
34350      # First remove it from the list of overridden variables, so we can test
34351      # for unknown variables in the end.
34352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34353
34354      # Check if the provided tool contains a complete path.
34355      tool_specified="$LIPO"
34356      tool_basename="${tool_specified##*/}"
34357      if test "x$tool_basename" = "x$tool_specified"; then
34358        # A command without a complete path is provided, search $PATH.
34359        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34360$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34361        # Extract the first word of "$tool_basename", so it can be a program name with args.
34362set dummy $tool_basename; ac_word=$2
34363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34364$as_echo_n "checking for $ac_word... " >&6; }
34365if ${ac_cv_path_LIPO+:} false; then :
34366  $as_echo_n "(cached) " >&6
34367else
34368  case $LIPO in
34369  [\\/]* | ?:[\\/]*)
34370  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34371  ;;
34372  *)
34373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34374for as_dir in $PATH
34375do
34376  IFS=$as_save_IFS
34377  test -z "$as_dir" && as_dir=.
34378    for ac_exec_ext in '' $ac_executable_extensions; do
34379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34380    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34382    break 2
34383  fi
34384done
34385  done
34386IFS=$as_save_IFS
34387
34388  ;;
34389esac
34390fi
34391LIPO=$ac_cv_path_LIPO
34392if test -n "$LIPO"; then
34393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34394$as_echo "$LIPO" >&6; }
34395else
34396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34397$as_echo "no" >&6; }
34398fi
34399
34400
34401        if test "x$LIPO" = x; then
34402          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34403        fi
34404      else
34405        # Otherwise we believe it is a complete path. Use it as it is.
34406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34407$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34409$as_echo_n "checking for LIPO... " >&6; }
34410        if test ! -x "$tool_specified"; then
34411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34412$as_echo "not found" >&6; }
34413          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34414        fi
34415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34416$as_echo "$tool_specified" >&6; }
34417      fi
34418    fi
34419  fi
34420
34421
34422
34423  # Only process if variable expands to non-empty
34424
34425  if test "x$LIPO" != x; then
34426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34427
34428  # First separate the path from the arguments. This will split at the first
34429  # space.
34430  complete="$LIPO"
34431  path="${complete%% *}"
34432  tmp="$complete EOL"
34433  arguments="${tmp#* }"
34434
34435  # Input might be given as Windows format, start by converting to
34436  # unix format.
34437  new_path=`$CYGPATH -u "$path"`
34438
34439  # Now try to locate executable using which
34440  new_path=`$WHICH "$new_path" 2> /dev/null`
34441  # bat and cmd files are not always considered executable in cygwin causing which
34442  # to not find them
34443  if test "x$new_path" = x \
34444      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34445      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34446    new_path=`$CYGPATH -u "$path"`
34447  fi
34448  if test "x$new_path" = x; then
34449    # Oops. Which didn't find the executable.
34450    # The splitting of arguments from the executable at a space might have been incorrect,
34451    # since paths with space are more likely in Windows. Give it another try with the whole
34452    # argument.
34453    path="$complete"
34454    arguments="EOL"
34455    new_path=`$CYGPATH -u "$path"`
34456    new_path=`$WHICH "$new_path" 2> /dev/null`
34457    # bat and cmd files are not always considered executable in cygwin causing which
34458    # to not find them
34459    if test "x$new_path" = x \
34460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34462      new_path=`$CYGPATH -u "$path"`
34463    fi
34464    if test "x$new_path" = x; then
34465      # It's still not found. Now this is an unrecoverable error.
34466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34467$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34468      has_space=`$ECHO "$complete" | $GREP " "`
34469      if test "x$has_space" != x; then
34470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34472      fi
34473      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34474    fi
34475  fi
34476
34477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34480  # "foo.exe" is OK but "foo" is an error.
34481  #
34482  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34483  # It is also a way to make sure we got the proper file name for the real test later on.
34484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34485  if test "x$test_shortpath" = x; then
34486    # Short path failed, file does not exist as specified.
34487    # Try adding .exe or .cmd
34488    if test -f "${new_path}.exe"; then
34489      input_to_shortpath="${new_path}.exe"
34490    elif test -f "${new_path}.cmd"; then
34491      input_to_shortpath="${new_path}.cmd"
34492    else
34493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34494$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34495      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34496$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34497      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34498    fi
34499  else
34500    input_to_shortpath="$new_path"
34501  fi
34502
34503  # Call helper function which possibly converts this using DOS-style short mode.
34504  # If so, the updated path is stored in $new_path.
34505  new_path="$input_to_shortpath"
34506
34507  input_path="$input_to_shortpath"
34508  # Check if we need to convert this using DOS-style short mode. If the path
34509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34510  # take no chances and rewrite it.
34511  # Note: m4 eats our [], so we need to use [ and ] instead.
34512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34513  if test "x$has_forbidden_chars" != x; then
34514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34518      # Going to short mode and back again did indeed matter. Since short mode is
34519      # case insensitive, let's make it lowercase to improve readability.
34520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34521      # Now convert it back to Unix-style (cygpath)
34522      input_path=`$CYGPATH -u "$shortmode_path"`
34523      new_path="$input_path"
34524    fi
34525  fi
34526
34527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34528  if test "x$test_cygdrive_prefix" = x; then
34529    # As a simple fix, exclude /usr/bin since it's not a real path.
34530    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34532      # a path prefixed by /cygdrive for fixpath to work.
34533      new_path="$CYGWIN_ROOT_PATH$input_path"
34534    fi
34535  fi
34536
34537  # remove trailing .exe if any
34538  new_path="${new_path/%.exe/}"
34539
34540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34541
34542  # First separate the path from the arguments. This will split at the first
34543  # space.
34544  complete="$LIPO"
34545  path="${complete%% *}"
34546  tmp="$complete EOL"
34547  arguments="${tmp#* }"
34548
34549  # Input might be given as Windows format, start by converting to
34550  # unix format.
34551  new_path="$path"
34552
34553  windows_path="$new_path"
34554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34555    unix_path=`$CYGPATH -u "$windows_path"`
34556    new_path="$unix_path"
34557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34559    new_path="$unix_path"
34560  fi
34561
34562
34563  # Now try to locate executable using which
34564  new_path=`$WHICH "$new_path" 2> /dev/null`
34565
34566  if test "x$new_path" = x; then
34567    # Oops. Which didn't find the executable.
34568    # The splitting of arguments from the executable at a space might have been incorrect,
34569    # since paths with space are more likely in Windows. Give it another try with the whole
34570    # argument.
34571    path="$complete"
34572    arguments="EOL"
34573    new_path="$path"
34574
34575  windows_path="$new_path"
34576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34577    unix_path=`$CYGPATH -u "$windows_path"`
34578    new_path="$unix_path"
34579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34581    new_path="$unix_path"
34582  fi
34583
34584
34585    new_path=`$WHICH "$new_path" 2> /dev/null`
34586    # bat and cmd files are not always considered executable in MSYS causing which
34587    # to not find them
34588    if test "x$new_path" = x \
34589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34591      new_path="$path"
34592
34593  windows_path="$new_path"
34594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34595    unix_path=`$CYGPATH -u "$windows_path"`
34596    new_path="$unix_path"
34597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34599    new_path="$unix_path"
34600  fi
34601
34602    fi
34603
34604    if test "x$new_path" = x; then
34605      # It's still not found. Now this is an unrecoverable error.
34606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34607$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34608      has_space=`$ECHO "$complete" | $GREP " "`
34609      if test "x$has_space" != x; then
34610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34612      fi
34613      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34614    fi
34615  fi
34616
34617  # Now new_path has a complete unix path to the binary
34618  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34619    # Keep paths in /bin as-is, but remove trailing .exe if any
34620    new_path="${new_path/%.exe/}"
34621    # Do not save /bin paths to all_fixpath_prefixes!
34622  else
34623    # Not in mixed or Windows style, start by that.
34624    new_path=`cmd //c echo $new_path`
34625
34626  input_path="$new_path"
34627  # Check if we need to convert this using DOS-style short mode. If the path
34628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34629  # take no chances and rewrite it.
34630  # Note: m4 eats our [], so we need to use [ and ] instead.
34631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34632  if test "x$has_forbidden_chars" != x; then
34633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34635  fi
34636
34637    # Output is in $new_path
34638
34639  windows_path="$new_path"
34640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34641    unix_path=`$CYGPATH -u "$windows_path"`
34642    new_path="$unix_path"
34643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34645    new_path="$unix_path"
34646  fi
34647
34648    # remove trailing .exe if any
34649    new_path="${new_path/%.exe/}"
34650
34651    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34652    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34653  fi
34654
34655    else
34656      # We're on a unix platform. Hooray! :)
34657      # First separate the path from the arguments. This will split at the first
34658      # space.
34659      complete="$LIPO"
34660      path="${complete%% *}"
34661      tmp="$complete EOL"
34662      arguments="${tmp#* }"
34663
34664      # Cannot rely on the command "which" here since it doesn't always work.
34665      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34666      if test -z "$is_absolute_path"; then
34667        # Path to executable is not absolute. Find it.
34668        IFS_save="$IFS"
34669        IFS=:
34670        for p in $PATH; do
34671          if test -f "$p/$path" && test -x "$p/$path"; then
34672            new_path="$p/$path"
34673            break
34674          fi
34675        done
34676        IFS="$IFS_save"
34677      else
34678        # This is an absolute path, we can use it without further modifications.
34679        new_path="$path"
34680      fi
34681
34682      if test "x$new_path" = x; then
34683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34684$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34685        has_space=`$ECHO "$complete" | $GREP " "`
34686        if test "x$has_space" != x; then
34687          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34688$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34689        fi
34690        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34691      fi
34692    fi
34693
34694    # Now join together the path and the arguments once again
34695    if test "x$arguments" != xEOL; then
34696      new_complete="$new_path ${arguments% *}"
34697    else
34698      new_complete="$new_path"
34699    fi
34700
34701    if test "x$complete" != "x$new_complete"; then
34702      LIPO="$new_complete"
34703      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34704$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34705    fi
34706  fi
34707
34708  fi
34709
34710  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34711    # Extract the first word of "mt", so it can be a program name with args.
34712set dummy mt; ac_word=$2
34713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34714$as_echo_n "checking for $ac_word... " >&6; }
34715if ${ac_cv_prog_MT+:} false; then :
34716  $as_echo_n "(cached) " >&6
34717else
34718  if test -n "$MT"; then
34719  ac_cv_prog_MT="$MT" # Let the user override the test.
34720else
34721  ac_prog_rejected=no
34722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34723for as_dir in $PATH
34724do
34725  IFS=$as_save_IFS
34726  test -z "$as_dir" && as_dir=.
34727    for ac_exec_ext in '' $ac_executable_extensions; do
34728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34729    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34730       ac_prog_rejected=yes
34731       continue
34732     fi
34733    ac_cv_prog_MT="mt"
34734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34735    break 2
34736  fi
34737done
34738  done
34739IFS=$as_save_IFS
34740
34741if test $ac_prog_rejected = yes; then
34742  # We found a bogon in the path, so make sure we never use it.
34743  set dummy $ac_cv_prog_MT
34744  shift
34745  if test $# != 0; then
34746    # We chose a different compiler from the bogus one.
34747    # However, it has the same basename, so the bogon will be chosen
34748    # first if we set MT to just the basename; use the full file name.
34749    shift
34750    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34751  fi
34752fi
34753fi
34754fi
34755MT=$ac_cv_prog_MT
34756if test -n "$MT"; then
34757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34758$as_echo "$MT" >&6; }
34759else
34760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34761$as_echo "no" >&6; }
34762fi
34763
34764
34765
34766  # Only process if variable expands to non-empty
34767
34768  if test "x$MT" != x; then
34769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34770
34771  # First separate the path from the arguments. This will split at the first
34772  # space.
34773  complete="$MT"
34774  path="${complete%% *}"
34775  tmp="$complete EOL"
34776  arguments="${tmp#* }"
34777
34778  # Input might be given as Windows format, start by converting to
34779  # unix format.
34780  new_path=`$CYGPATH -u "$path"`
34781
34782  # Now try to locate executable using which
34783  new_path=`$WHICH "$new_path" 2> /dev/null`
34784  # bat and cmd files are not always considered executable in cygwin causing which
34785  # to not find them
34786  if test "x$new_path" = x \
34787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34789    new_path=`$CYGPATH -u "$path"`
34790  fi
34791  if test "x$new_path" = x; then
34792    # Oops. Which didn't find the executable.
34793    # The splitting of arguments from the executable at a space might have been incorrect,
34794    # since paths with space are more likely in Windows. Give it another try with the whole
34795    # argument.
34796    path="$complete"
34797    arguments="EOL"
34798    new_path=`$CYGPATH -u "$path"`
34799    new_path=`$WHICH "$new_path" 2> /dev/null`
34800    # bat and cmd files are not always considered executable in cygwin causing which
34801    # to not find them
34802    if test "x$new_path" = x \
34803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34805      new_path=`$CYGPATH -u "$path"`
34806    fi
34807    if test "x$new_path" = x; then
34808      # It's still not found. Now this is an unrecoverable error.
34809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34810$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34811      has_space=`$ECHO "$complete" | $GREP " "`
34812      if test "x$has_space" != x; then
34813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34815      fi
34816      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34817    fi
34818  fi
34819
34820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34823  # "foo.exe" is OK but "foo" is an error.
34824  #
34825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34826  # It is also a way to make sure we got the proper file name for the real test later on.
34827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34828  if test "x$test_shortpath" = x; then
34829    # Short path failed, file does not exist as specified.
34830    # Try adding .exe or .cmd
34831    if test -f "${new_path}.exe"; then
34832      input_to_shortpath="${new_path}.exe"
34833    elif test -f "${new_path}.cmd"; then
34834      input_to_shortpath="${new_path}.cmd"
34835    else
34836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34837$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34840      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34841    fi
34842  else
34843    input_to_shortpath="$new_path"
34844  fi
34845
34846  # Call helper function which possibly converts this using DOS-style short mode.
34847  # If so, the updated path is stored in $new_path.
34848  new_path="$input_to_shortpath"
34849
34850  input_path="$input_to_shortpath"
34851  # Check if we need to convert this using DOS-style short mode. If the path
34852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34853  # take no chances and rewrite it.
34854  # Note: m4 eats our [], so we need to use [ and ] instead.
34855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34856  if test "x$has_forbidden_chars" != x; then
34857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34861      # Going to short mode and back again did indeed matter. Since short mode is
34862      # case insensitive, let's make it lowercase to improve readability.
34863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34864      # Now convert it back to Unix-style (cygpath)
34865      input_path=`$CYGPATH -u "$shortmode_path"`
34866      new_path="$input_path"
34867    fi
34868  fi
34869
34870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34871  if test "x$test_cygdrive_prefix" = x; then
34872    # As a simple fix, exclude /usr/bin since it's not a real path.
34873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34875      # a path prefixed by /cygdrive for fixpath to work.
34876      new_path="$CYGWIN_ROOT_PATH$input_path"
34877    fi
34878  fi
34879
34880  # remove trailing .exe if any
34881  new_path="${new_path/%.exe/}"
34882
34883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34884
34885  # First separate the path from the arguments. This will split at the first
34886  # space.
34887  complete="$MT"
34888  path="${complete%% *}"
34889  tmp="$complete EOL"
34890  arguments="${tmp#* }"
34891
34892  # Input might be given as Windows format, start by converting to
34893  # unix format.
34894  new_path="$path"
34895
34896  windows_path="$new_path"
34897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34898    unix_path=`$CYGPATH -u "$windows_path"`
34899    new_path="$unix_path"
34900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34902    new_path="$unix_path"
34903  fi
34904
34905
34906  # Now try to locate executable using which
34907  new_path=`$WHICH "$new_path" 2> /dev/null`
34908
34909  if test "x$new_path" = x; then
34910    # Oops. Which didn't find the executable.
34911    # The splitting of arguments from the executable at a space might have been incorrect,
34912    # since paths with space are more likely in Windows. Give it another try with the whole
34913    # argument.
34914    path="$complete"
34915    arguments="EOL"
34916    new_path="$path"
34917
34918  windows_path="$new_path"
34919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34920    unix_path=`$CYGPATH -u "$windows_path"`
34921    new_path="$unix_path"
34922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34924    new_path="$unix_path"
34925  fi
34926
34927
34928    new_path=`$WHICH "$new_path" 2> /dev/null`
34929    # bat and cmd files are not always considered executable in MSYS causing which
34930    # to not find them
34931    if test "x$new_path" = x \
34932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34934      new_path="$path"
34935
34936  windows_path="$new_path"
34937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34938    unix_path=`$CYGPATH -u "$windows_path"`
34939    new_path="$unix_path"
34940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34942    new_path="$unix_path"
34943  fi
34944
34945    fi
34946
34947    if test "x$new_path" = x; then
34948      # It's still not found. Now this is an unrecoverable error.
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34950$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34951      has_space=`$ECHO "$complete" | $GREP " "`
34952      if test "x$has_space" != x; then
34953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34955      fi
34956      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34957    fi
34958  fi
34959
34960  # Now new_path has a complete unix path to the binary
34961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34962    # Keep paths in /bin as-is, but remove trailing .exe if any
34963    new_path="${new_path/%.exe/}"
34964    # Do not save /bin paths to all_fixpath_prefixes!
34965  else
34966    # Not in mixed or Windows style, start by that.
34967    new_path=`cmd //c echo $new_path`
34968
34969  input_path="$new_path"
34970  # Check if we need to convert this using DOS-style short mode. If the path
34971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34972  # take no chances and rewrite it.
34973  # Note: m4 eats our [], so we need to use [ and ] instead.
34974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34975  if test "x$has_forbidden_chars" != x; then
34976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34978  fi
34979
34980    # Output is in $new_path
34981
34982  windows_path="$new_path"
34983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34984    unix_path=`$CYGPATH -u "$windows_path"`
34985    new_path="$unix_path"
34986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34988    new_path="$unix_path"
34989  fi
34990
34991    # remove trailing .exe if any
34992    new_path="${new_path/%.exe/}"
34993
34994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34996  fi
34997
34998    else
34999      # We're on a unix platform. Hooray! :)
35000      # First separate the path from the arguments. This will split at the first
35001      # space.
35002      complete="$MT"
35003      path="${complete%% *}"
35004      tmp="$complete EOL"
35005      arguments="${tmp#* }"
35006
35007      # Cannot rely on the command "which" here since it doesn't always work.
35008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35009      if test -z "$is_absolute_path"; then
35010        # Path to executable is not absolute. Find it.
35011        IFS_save="$IFS"
35012        IFS=:
35013        for p in $PATH; do
35014          if test -f "$p/$path" && test -x "$p/$path"; then
35015            new_path="$p/$path"
35016            break
35017          fi
35018        done
35019        IFS="$IFS_save"
35020      else
35021        # This is an absolute path, we can use it without further modifications.
35022        new_path="$path"
35023      fi
35024
35025      if test "x$new_path" = x; then
35026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35027$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35028        has_space=`$ECHO "$complete" | $GREP " "`
35029        if test "x$has_space" != x; then
35030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35032        fi
35033        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35034      fi
35035    fi
35036
35037    # Now join together the path and the arguments once again
35038    if test "x$arguments" != xEOL; then
35039      new_complete="$new_path ${arguments% *}"
35040    else
35041      new_complete="$new_path"
35042    fi
35043
35044    if test "x$complete" != "x$new_complete"; then
35045      MT="$new_complete"
35046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
35047$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
35048    fi
35049  fi
35050
35051    # Setup the resource compiler (RC)
35052    # Extract the first word of "rc", so it can be a program name with args.
35053set dummy rc; ac_word=$2
35054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35055$as_echo_n "checking for $ac_word... " >&6; }
35056if ${ac_cv_prog_RC+:} false; then :
35057  $as_echo_n "(cached) " >&6
35058else
35059  if test -n "$RC"; then
35060  ac_cv_prog_RC="$RC" # Let the user override the test.
35061else
35062  ac_prog_rejected=no
35063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35064for as_dir in $PATH
35065do
35066  IFS=$as_save_IFS
35067  test -z "$as_dir" && as_dir=.
35068    for ac_exec_ext in '' $ac_executable_extensions; do
35069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35070    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
35071       ac_prog_rejected=yes
35072       continue
35073     fi
35074    ac_cv_prog_RC="rc"
35075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35076    break 2
35077  fi
35078done
35079  done
35080IFS=$as_save_IFS
35081
35082if test $ac_prog_rejected = yes; then
35083  # We found a bogon in the path, so make sure we never use it.
35084  set dummy $ac_cv_prog_RC
35085  shift
35086  if test $# != 0; then
35087    # We chose a different compiler from the bogus one.
35088    # However, it has the same basename, so the bogon will be chosen
35089    # first if we set RC to just the basename; use the full file name.
35090    shift
35091    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
35092  fi
35093fi
35094fi
35095fi
35096RC=$ac_cv_prog_RC
35097if test -n "$RC"; then
35098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
35099$as_echo "$RC" >&6; }
35100else
35101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35102$as_echo "no" >&6; }
35103fi
35104
35105
35106
35107  # Only process if variable expands to non-empty
35108
35109  if test "x$RC" != x; then
35110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35111
35112  # First separate the path from the arguments. This will split at the first
35113  # space.
35114  complete="$RC"
35115  path="${complete%% *}"
35116  tmp="$complete EOL"
35117  arguments="${tmp#* }"
35118
35119  # Input might be given as Windows format, start by converting to
35120  # unix format.
35121  new_path=`$CYGPATH -u "$path"`
35122
35123  # Now try to locate executable using which
35124  new_path=`$WHICH "$new_path" 2> /dev/null`
35125  # bat and cmd files are not always considered executable in cygwin causing which
35126  # to not find them
35127  if test "x$new_path" = x \
35128      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35129      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35130    new_path=`$CYGPATH -u "$path"`
35131  fi
35132  if test "x$new_path" = x; then
35133    # Oops. Which didn't find the executable.
35134    # The splitting of arguments from the executable at a space might have been incorrect,
35135    # since paths with space are more likely in Windows. Give it another try with the whole
35136    # argument.
35137    path="$complete"
35138    arguments="EOL"
35139    new_path=`$CYGPATH -u "$path"`
35140    new_path=`$WHICH "$new_path" 2> /dev/null`
35141    # bat and cmd files are not always considered executable in cygwin causing which
35142    # to not find them
35143    if test "x$new_path" = x \
35144        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35145        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35146      new_path=`$CYGPATH -u "$path"`
35147    fi
35148    if test "x$new_path" = x; then
35149      # It's still not found. Now this is an unrecoverable error.
35150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35151$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35152      has_space=`$ECHO "$complete" | $GREP " "`
35153      if test "x$has_space" != x; then
35154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35156      fi
35157      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35158    fi
35159  fi
35160
35161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35164  # "foo.exe" is OK but "foo" is an error.
35165  #
35166  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35167  # It is also a way to make sure we got the proper file name for the real test later on.
35168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35169  if test "x$test_shortpath" = x; then
35170    # Short path failed, file does not exist as specified.
35171    # Try adding .exe or .cmd
35172    if test -f "${new_path}.exe"; then
35173      input_to_shortpath="${new_path}.exe"
35174    elif test -f "${new_path}.cmd"; then
35175      input_to_shortpath="${new_path}.cmd"
35176    else
35177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35178$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35179      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35180$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35181      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35182    fi
35183  else
35184    input_to_shortpath="$new_path"
35185  fi
35186
35187  # Call helper function which possibly converts this using DOS-style short mode.
35188  # If so, the updated path is stored in $new_path.
35189  new_path="$input_to_shortpath"
35190
35191  input_path="$input_to_shortpath"
35192  # Check if we need to convert this using DOS-style short mode. If the path
35193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35194  # take no chances and rewrite it.
35195  # Note: m4 eats our [], so we need to use [ and ] instead.
35196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35197  if test "x$has_forbidden_chars" != x; then
35198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35202      # Going to short mode and back again did indeed matter. Since short mode is
35203      # case insensitive, let's make it lowercase to improve readability.
35204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35205      # Now convert it back to Unix-style (cygpath)
35206      input_path=`$CYGPATH -u "$shortmode_path"`
35207      new_path="$input_path"
35208    fi
35209  fi
35210
35211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35212  if test "x$test_cygdrive_prefix" = x; then
35213    # As a simple fix, exclude /usr/bin since it's not a real path.
35214    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35216      # a path prefixed by /cygdrive for fixpath to work.
35217      new_path="$CYGWIN_ROOT_PATH$input_path"
35218    fi
35219  fi
35220
35221  # remove trailing .exe if any
35222  new_path="${new_path/%.exe/}"
35223
35224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35225
35226  # First separate the path from the arguments. This will split at the first
35227  # space.
35228  complete="$RC"
35229  path="${complete%% *}"
35230  tmp="$complete EOL"
35231  arguments="${tmp#* }"
35232
35233  # Input might be given as Windows format, start by converting to
35234  # unix format.
35235  new_path="$path"
35236
35237  windows_path="$new_path"
35238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35239    unix_path=`$CYGPATH -u "$windows_path"`
35240    new_path="$unix_path"
35241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35243    new_path="$unix_path"
35244  fi
35245
35246
35247  # Now try to locate executable using which
35248  new_path=`$WHICH "$new_path" 2> /dev/null`
35249
35250  if test "x$new_path" = x; then
35251    # Oops. Which didn't find the executable.
35252    # The splitting of arguments from the executable at a space might have been incorrect,
35253    # since paths with space are more likely in Windows. Give it another try with the whole
35254    # argument.
35255    path="$complete"
35256    arguments="EOL"
35257    new_path="$path"
35258
35259  windows_path="$new_path"
35260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35261    unix_path=`$CYGPATH -u "$windows_path"`
35262    new_path="$unix_path"
35263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35265    new_path="$unix_path"
35266  fi
35267
35268
35269    new_path=`$WHICH "$new_path" 2> /dev/null`
35270    # bat and cmd files are not always considered executable in MSYS causing which
35271    # to not find them
35272    if test "x$new_path" = x \
35273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35275      new_path="$path"
35276
35277  windows_path="$new_path"
35278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35279    unix_path=`$CYGPATH -u "$windows_path"`
35280    new_path="$unix_path"
35281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35283    new_path="$unix_path"
35284  fi
35285
35286    fi
35287
35288    if test "x$new_path" = x; then
35289      # It's still not found. Now this is an unrecoverable error.
35290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35291$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35292      has_space=`$ECHO "$complete" | $GREP " "`
35293      if test "x$has_space" != x; then
35294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35296      fi
35297      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35298    fi
35299  fi
35300
35301  # Now new_path has a complete unix path to the binary
35302  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35303    # Keep paths in /bin as-is, but remove trailing .exe if any
35304    new_path="${new_path/%.exe/}"
35305    # Do not save /bin paths to all_fixpath_prefixes!
35306  else
35307    # Not in mixed or Windows style, start by that.
35308    new_path=`cmd //c echo $new_path`
35309
35310  input_path="$new_path"
35311  # Check if we need to convert this using DOS-style short mode. If the path
35312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35313  # take no chances and rewrite it.
35314  # Note: m4 eats our [], so we need to use [ and ] instead.
35315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35316  if test "x$has_forbidden_chars" != x; then
35317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35319  fi
35320
35321    # Output is in $new_path
35322
35323  windows_path="$new_path"
35324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35325    unix_path=`$CYGPATH -u "$windows_path"`
35326    new_path="$unix_path"
35327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35329    new_path="$unix_path"
35330  fi
35331
35332    # remove trailing .exe if any
35333    new_path="${new_path/%.exe/}"
35334
35335    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35336    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35337  fi
35338
35339    else
35340      # We're on a unix platform. Hooray! :)
35341      # First separate the path from the arguments. This will split at the first
35342      # space.
35343      complete="$RC"
35344      path="${complete%% *}"
35345      tmp="$complete EOL"
35346      arguments="${tmp#* }"
35347
35348      # Cannot rely on the command "which" here since it doesn't always work.
35349      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35350      if test -z "$is_absolute_path"; then
35351        # Path to executable is not absolute. Find it.
35352        IFS_save="$IFS"
35353        IFS=:
35354        for p in $PATH; do
35355          if test -f "$p/$path" && test -x "$p/$path"; then
35356            new_path="$p/$path"
35357            break
35358          fi
35359        done
35360        IFS="$IFS_save"
35361      else
35362        # This is an absolute path, we can use it without further modifications.
35363        new_path="$path"
35364      fi
35365
35366      if test "x$new_path" = x; then
35367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35368$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35369        has_space=`$ECHO "$complete" | $GREP " "`
35370        if test "x$has_space" != x; then
35371          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35372$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35373        fi
35374        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35375      fi
35376    fi
35377
35378    # Now join together the path and the arguments once again
35379    if test "x$arguments" != xEOL; then
35380      new_complete="$new_path ${arguments% *}"
35381    else
35382      new_complete="$new_path"
35383    fi
35384
35385    if test "x$complete" != "x$new_complete"; then
35386      RC="$new_complete"
35387      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35388$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35389    fi
35390  fi
35391
35392    # Extract the first word of "dumpbin", so it can be a program name with args.
35393set dummy dumpbin; ac_word=$2
35394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35395$as_echo_n "checking for $ac_word... " >&6; }
35396if ${ac_cv_prog_DUMPBIN+:} false; then :
35397  $as_echo_n "(cached) " >&6
35398else
35399  if test -n "$DUMPBIN"; then
35400  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35401else
35402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35403for as_dir in $PATH
35404do
35405  IFS=$as_save_IFS
35406  test -z "$as_dir" && as_dir=.
35407    for ac_exec_ext in '' $ac_executable_extensions; do
35408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35409    ac_cv_prog_DUMPBIN="dumpbin"
35410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35411    break 2
35412  fi
35413done
35414  done
35415IFS=$as_save_IFS
35416
35417fi
35418fi
35419DUMPBIN=$ac_cv_prog_DUMPBIN
35420if test -n "$DUMPBIN"; then
35421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35422$as_echo "$DUMPBIN" >&6; }
35423else
35424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35425$as_echo "no" >&6; }
35426fi
35427
35428
35429
35430  # Only process if variable expands to non-empty
35431
35432  if test "x$DUMPBIN" != x; then
35433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35434
35435  # First separate the path from the arguments. This will split at the first
35436  # space.
35437  complete="$DUMPBIN"
35438  path="${complete%% *}"
35439  tmp="$complete EOL"
35440  arguments="${tmp#* }"
35441
35442  # Input might be given as Windows format, start by converting to
35443  # unix format.
35444  new_path=`$CYGPATH -u "$path"`
35445
35446  # Now try to locate executable using which
35447  new_path=`$WHICH "$new_path" 2> /dev/null`
35448  # bat and cmd files are not always considered executable in cygwin causing which
35449  # to not find them
35450  if test "x$new_path" = x \
35451      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35452      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35453    new_path=`$CYGPATH -u "$path"`
35454  fi
35455  if test "x$new_path" = x; then
35456    # Oops. Which didn't find the executable.
35457    # The splitting of arguments from the executable at a space might have been incorrect,
35458    # since paths with space are more likely in Windows. Give it another try with the whole
35459    # argument.
35460    path="$complete"
35461    arguments="EOL"
35462    new_path=`$CYGPATH -u "$path"`
35463    new_path=`$WHICH "$new_path" 2> /dev/null`
35464    # bat and cmd files are not always considered executable in cygwin causing which
35465    # to not find them
35466    if test "x$new_path" = x \
35467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35469      new_path=`$CYGPATH -u "$path"`
35470    fi
35471    if test "x$new_path" = x; then
35472      # It's still not found. Now this is an unrecoverable error.
35473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35474$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35475      has_space=`$ECHO "$complete" | $GREP " "`
35476      if test "x$has_space" != x; then
35477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35479      fi
35480      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35481    fi
35482  fi
35483
35484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35487  # "foo.exe" is OK but "foo" is an error.
35488  #
35489  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35490  # It is also a way to make sure we got the proper file name for the real test later on.
35491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35492  if test "x$test_shortpath" = x; then
35493    # Short path failed, file does not exist as specified.
35494    # Try adding .exe or .cmd
35495    if test -f "${new_path}.exe"; then
35496      input_to_shortpath="${new_path}.exe"
35497    elif test -f "${new_path}.cmd"; then
35498      input_to_shortpath="${new_path}.cmd"
35499    else
35500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35501$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35504      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35505    fi
35506  else
35507    input_to_shortpath="$new_path"
35508  fi
35509
35510  # Call helper function which possibly converts this using DOS-style short mode.
35511  # If so, the updated path is stored in $new_path.
35512  new_path="$input_to_shortpath"
35513
35514  input_path="$input_to_shortpath"
35515  # Check if we need to convert this using DOS-style short mode. If the path
35516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35517  # take no chances and rewrite it.
35518  # Note: m4 eats our [], so we need to use [ and ] instead.
35519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35520  if test "x$has_forbidden_chars" != x; then
35521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35525      # Going to short mode and back again did indeed matter. Since short mode is
35526      # case insensitive, let's make it lowercase to improve readability.
35527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35528      # Now convert it back to Unix-style (cygpath)
35529      input_path=`$CYGPATH -u "$shortmode_path"`
35530      new_path="$input_path"
35531    fi
35532  fi
35533
35534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35535  if test "x$test_cygdrive_prefix" = x; then
35536    # As a simple fix, exclude /usr/bin since it's not a real path.
35537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35539      # a path prefixed by /cygdrive for fixpath to work.
35540      new_path="$CYGWIN_ROOT_PATH$input_path"
35541    fi
35542  fi
35543
35544  # remove trailing .exe if any
35545  new_path="${new_path/%.exe/}"
35546
35547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35548
35549  # First separate the path from the arguments. This will split at the first
35550  # space.
35551  complete="$DUMPBIN"
35552  path="${complete%% *}"
35553  tmp="$complete EOL"
35554  arguments="${tmp#* }"
35555
35556  # Input might be given as Windows format, start by converting to
35557  # unix format.
35558  new_path="$path"
35559
35560  windows_path="$new_path"
35561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35562    unix_path=`$CYGPATH -u "$windows_path"`
35563    new_path="$unix_path"
35564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35566    new_path="$unix_path"
35567  fi
35568
35569
35570  # Now try to locate executable using which
35571  new_path=`$WHICH "$new_path" 2> /dev/null`
35572
35573  if test "x$new_path" = x; then
35574    # Oops. Which didn't find the executable.
35575    # The splitting of arguments from the executable at a space might have been incorrect,
35576    # since paths with space are more likely in Windows. Give it another try with the whole
35577    # argument.
35578    path="$complete"
35579    arguments="EOL"
35580    new_path="$path"
35581
35582  windows_path="$new_path"
35583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35584    unix_path=`$CYGPATH -u "$windows_path"`
35585    new_path="$unix_path"
35586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35588    new_path="$unix_path"
35589  fi
35590
35591
35592    new_path=`$WHICH "$new_path" 2> /dev/null`
35593    # bat and cmd files are not always considered executable in MSYS causing which
35594    # to not find them
35595    if test "x$new_path" = x \
35596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35598      new_path="$path"
35599
35600  windows_path="$new_path"
35601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35602    unix_path=`$CYGPATH -u "$windows_path"`
35603    new_path="$unix_path"
35604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35606    new_path="$unix_path"
35607  fi
35608
35609    fi
35610
35611    if test "x$new_path" = x; then
35612      # It's still not found. Now this is an unrecoverable error.
35613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35614$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35615      has_space=`$ECHO "$complete" | $GREP " "`
35616      if test "x$has_space" != x; then
35617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35619      fi
35620      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35621    fi
35622  fi
35623
35624  # Now new_path has a complete unix path to the binary
35625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35626    # Keep paths in /bin as-is, but remove trailing .exe if any
35627    new_path="${new_path/%.exe/}"
35628    # Do not save /bin paths to all_fixpath_prefixes!
35629  else
35630    # Not in mixed or Windows style, start by that.
35631    new_path=`cmd //c echo $new_path`
35632
35633  input_path="$new_path"
35634  # Check if we need to convert this using DOS-style short mode. If the path
35635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35636  # take no chances and rewrite it.
35637  # Note: m4 eats our [], so we need to use [ and ] instead.
35638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35639  if test "x$has_forbidden_chars" != x; then
35640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35642  fi
35643
35644    # Output is in $new_path
35645
35646  windows_path="$new_path"
35647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35648    unix_path=`$CYGPATH -u "$windows_path"`
35649    new_path="$unix_path"
35650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35652    new_path="$unix_path"
35653  fi
35654
35655    # remove trailing .exe if any
35656    new_path="${new_path/%.exe/}"
35657
35658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35660  fi
35661
35662    else
35663      # We're on a unix platform. Hooray! :)
35664      # First separate the path from the arguments. This will split at the first
35665      # space.
35666      complete="$DUMPBIN"
35667      path="${complete%% *}"
35668      tmp="$complete EOL"
35669      arguments="${tmp#* }"
35670
35671      # Cannot rely on the command "which" here since it doesn't always work.
35672      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35673      if test -z "$is_absolute_path"; then
35674        # Path to executable is not absolute. Find it.
35675        IFS_save="$IFS"
35676        IFS=:
35677        for p in $PATH; do
35678          if test -f "$p/$path" && test -x "$p/$path"; then
35679            new_path="$p/$path"
35680            break
35681          fi
35682        done
35683        IFS="$IFS_save"
35684      else
35685        # This is an absolute path, we can use it without further modifications.
35686        new_path="$path"
35687      fi
35688
35689      if test "x$new_path" = x; then
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35691$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35692        has_space=`$ECHO "$complete" | $GREP " "`
35693        if test "x$has_space" != x; then
35694          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35695$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35696        fi
35697        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35698      fi
35699    fi
35700
35701    # Now join together the path and the arguments once again
35702    if test "x$arguments" != xEOL; then
35703      new_complete="$new_path ${arguments% *}"
35704    else
35705      new_complete="$new_path"
35706    fi
35707
35708    if test "x$complete" != "x$new_complete"; then
35709      DUMPBIN="$new_complete"
35710      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35711$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35712    fi
35713  fi
35714
35715    # We need to check for 'msbuild.exe' because at the place where we expect to
35716    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35717    # won't find the 'msbuild.exe' executable in that case (and the
35718    # 'ac_executable_extensions' is unusable due to performance reasons).
35719    # Notice that we intentionally don't fix up the path to MSBUILD because we
35720    # will call it in a DOS shell during freetype detection on Windows (see
35721    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35722    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35723set dummy msbuild.exe; ac_word=$2
35724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35725$as_echo_n "checking for $ac_word... " >&6; }
35726if ${ac_cv_prog_MSBUILD+:} false; then :
35727  $as_echo_n "(cached) " >&6
35728else
35729  if test -n "$MSBUILD"; then
35730  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35731else
35732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35733for as_dir in $PATH
35734do
35735  IFS=$as_save_IFS
35736  test -z "$as_dir" && as_dir=.
35737    for ac_exec_ext in '' $ac_executable_extensions; do
35738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35739    ac_cv_prog_MSBUILD="msbuild.exe"
35740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35741    break 2
35742  fi
35743done
35744  done
35745IFS=$as_save_IFS
35746
35747fi
35748fi
35749MSBUILD=$ac_cv_prog_MSBUILD
35750if test -n "$MSBUILD"; then
35751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35752$as_echo "$MSBUILD" >&6; }
35753else
35754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35755$as_echo "no" >&6; }
35756fi
35757
35758
35759  fi
35760
35761  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35762
35763
35764  # Publish this variable in the help.
35765
35766
35767  if test "x$STRIP" = x; then
35768    # The variable is not set by user, try to locate tool using the code snippet
35769    for ac_prog in strip
35770do
35771  # Extract the first word of "$ac_prog", so it can be a program name with args.
35772set dummy $ac_prog; ac_word=$2
35773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35774$as_echo_n "checking for $ac_word... " >&6; }
35775if ${ac_cv_path_STRIP+:} false; then :
35776  $as_echo_n "(cached) " >&6
35777else
35778  case $STRIP in
35779  [\\/]* | ?:[\\/]*)
35780  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35781  ;;
35782  *)
35783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35784for as_dir in $PATH
35785do
35786  IFS=$as_save_IFS
35787  test -z "$as_dir" && as_dir=.
35788    for ac_exec_ext in '' $ac_executable_extensions; do
35789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35790    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35792    break 2
35793  fi
35794done
35795  done
35796IFS=$as_save_IFS
35797
35798  ;;
35799esac
35800fi
35801STRIP=$ac_cv_path_STRIP
35802if test -n "$STRIP"; then
35803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35804$as_echo "$STRIP" >&6; }
35805else
35806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35807$as_echo "no" >&6; }
35808fi
35809
35810
35811  test -n "$STRIP" && break
35812done
35813
35814  else
35815    # The variable is set, but is it from the command line or the environment?
35816
35817    # Try to remove the string !STRIP! from our list.
35818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35820      # If it failed, the variable was not from the command line. Ignore it,
35821      # but warn the user (except for BASH, which is always set by the calling BASH).
35822      if test "xSTRIP" != xBASH; then
35823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35824$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35825      fi
35826      # Try to locate tool using the code snippet
35827      for ac_prog in strip
35828do
35829  # Extract the first word of "$ac_prog", so it can be a program name with args.
35830set dummy $ac_prog; ac_word=$2
35831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35832$as_echo_n "checking for $ac_word... " >&6; }
35833if ${ac_cv_path_STRIP+:} false; then :
35834  $as_echo_n "(cached) " >&6
35835else
35836  case $STRIP in
35837  [\\/]* | ?:[\\/]*)
35838  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35839  ;;
35840  *)
35841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35842for as_dir in $PATH
35843do
35844  IFS=$as_save_IFS
35845  test -z "$as_dir" && as_dir=.
35846    for ac_exec_ext in '' $ac_executable_extensions; do
35847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35848    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35850    break 2
35851  fi
35852done
35853  done
35854IFS=$as_save_IFS
35855
35856  ;;
35857esac
35858fi
35859STRIP=$ac_cv_path_STRIP
35860if test -n "$STRIP"; then
35861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35862$as_echo "$STRIP" >&6; }
35863else
35864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35865$as_echo "no" >&6; }
35866fi
35867
35868
35869  test -n "$STRIP" && break
35870done
35871
35872    else
35873      # If it succeeded, then it was overridden by the user. We will use it
35874      # for the tool.
35875
35876      # First remove it from the list of overridden variables, so we can test
35877      # for unknown variables in the end.
35878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35879
35880      # Check if the provided tool contains a complete path.
35881      tool_specified="$STRIP"
35882      tool_basename="${tool_specified##*/}"
35883      if test "x$tool_basename" = "x$tool_specified"; then
35884        # A command without a complete path is provided, search $PATH.
35885        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35886$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35887        # Extract the first word of "$tool_basename", so it can be a program name with args.
35888set dummy $tool_basename; ac_word=$2
35889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35890$as_echo_n "checking for $ac_word... " >&6; }
35891if ${ac_cv_path_STRIP+:} false; then :
35892  $as_echo_n "(cached) " >&6
35893else
35894  case $STRIP in
35895  [\\/]* | ?:[\\/]*)
35896  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35897  ;;
35898  *)
35899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35900for as_dir in $PATH
35901do
35902  IFS=$as_save_IFS
35903  test -z "$as_dir" && as_dir=.
35904    for ac_exec_ext in '' $ac_executable_extensions; do
35905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35906    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35908    break 2
35909  fi
35910done
35911  done
35912IFS=$as_save_IFS
35913
35914  ;;
35915esac
35916fi
35917STRIP=$ac_cv_path_STRIP
35918if test -n "$STRIP"; then
35919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35920$as_echo "$STRIP" >&6; }
35921else
35922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35923$as_echo "no" >&6; }
35924fi
35925
35926
35927        if test "x$STRIP" = x; then
35928          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35929        fi
35930      else
35931        # Otherwise we believe it is a complete path. Use it as it is.
35932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35933$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35935$as_echo_n "checking for STRIP... " >&6; }
35936        if test ! -x "$tool_specified"; then
35937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35938$as_echo "not found" >&6; }
35939          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35940        fi
35941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35942$as_echo "$tool_specified" >&6; }
35943      fi
35944    fi
35945  fi
35946
35947
35948
35949  # Only process if variable expands to non-empty
35950
35951  if test "x$STRIP" != x; then
35952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35953
35954  # First separate the path from the arguments. This will split at the first
35955  # space.
35956  complete="$STRIP"
35957  path="${complete%% *}"
35958  tmp="$complete EOL"
35959  arguments="${tmp#* }"
35960
35961  # Input might be given as Windows format, start by converting to
35962  # unix format.
35963  new_path=`$CYGPATH -u "$path"`
35964
35965  # Now try to locate executable using which
35966  new_path=`$WHICH "$new_path" 2> /dev/null`
35967  # bat and cmd files are not always considered executable in cygwin causing which
35968  # to not find them
35969  if test "x$new_path" = x \
35970      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35971      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35972    new_path=`$CYGPATH -u "$path"`
35973  fi
35974  if test "x$new_path" = x; then
35975    # Oops. Which didn't find the executable.
35976    # The splitting of arguments from the executable at a space might have been incorrect,
35977    # since paths with space are more likely in Windows. Give it another try with the whole
35978    # argument.
35979    path="$complete"
35980    arguments="EOL"
35981    new_path=`$CYGPATH -u "$path"`
35982    new_path=`$WHICH "$new_path" 2> /dev/null`
35983    # bat and cmd files are not always considered executable in cygwin causing which
35984    # to not find them
35985    if test "x$new_path" = x \
35986        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35987        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35988      new_path=`$CYGPATH -u "$path"`
35989    fi
35990    if test "x$new_path" = x; then
35991      # It's still not found. Now this is an unrecoverable error.
35992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35993$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35994      has_space=`$ECHO "$complete" | $GREP " "`
35995      if test "x$has_space" != x; then
35996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35998      fi
35999      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36000    fi
36001  fi
36002
36003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36006  # "foo.exe" is OK but "foo" is an error.
36007  #
36008  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36009  # It is also a way to make sure we got the proper file name for the real test later on.
36010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36011  if test "x$test_shortpath" = x; then
36012    # Short path failed, file does not exist as specified.
36013    # Try adding .exe or .cmd
36014    if test -f "${new_path}.exe"; then
36015      input_to_shortpath="${new_path}.exe"
36016    elif test -f "${new_path}.cmd"; then
36017      input_to_shortpath="${new_path}.cmd"
36018    else
36019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36020$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36021      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36022$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36023      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36024    fi
36025  else
36026    input_to_shortpath="$new_path"
36027  fi
36028
36029  # Call helper function which possibly converts this using DOS-style short mode.
36030  # If so, the updated path is stored in $new_path.
36031  new_path="$input_to_shortpath"
36032
36033  input_path="$input_to_shortpath"
36034  # Check if we need to convert this using DOS-style short mode. If the path
36035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36036  # take no chances and rewrite it.
36037  # Note: m4 eats our [], so we need to use [ and ] instead.
36038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36039  if test "x$has_forbidden_chars" != x; then
36040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36044      # Going to short mode and back again did indeed matter. Since short mode is
36045      # case insensitive, let's make it lowercase to improve readability.
36046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36047      # Now convert it back to Unix-style (cygpath)
36048      input_path=`$CYGPATH -u "$shortmode_path"`
36049      new_path="$input_path"
36050    fi
36051  fi
36052
36053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36054  if test "x$test_cygdrive_prefix" = x; then
36055    # As a simple fix, exclude /usr/bin since it's not a real path.
36056    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36058      # a path prefixed by /cygdrive for fixpath to work.
36059      new_path="$CYGWIN_ROOT_PATH$input_path"
36060    fi
36061  fi
36062
36063  # remove trailing .exe if any
36064  new_path="${new_path/%.exe/}"
36065
36066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36067
36068  # First separate the path from the arguments. This will split at the first
36069  # space.
36070  complete="$STRIP"
36071  path="${complete%% *}"
36072  tmp="$complete EOL"
36073  arguments="${tmp#* }"
36074
36075  # Input might be given as Windows format, start by converting to
36076  # unix format.
36077  new_path="$path"
36078
36079  windows_path="$new_path"
36080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36081    unix_path=`$CYGPATH -u "$windows_path"`
36082    new_path="$unix_path"
36083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36085    new_path="$unix_path"
36086  fi
36087
36088
36089  # Now try to locate executable using which
36090  new_path=`$WHICH "$new_path" 2> /dev/null`
36091
36092  if test "x$new_path" = x; then
36093    # Oops. Which didn't find the executable.
36094    # The splitting of arguments from the executable at a space might have been incorrect,
36095    # since paths with space are more likely in Windows. Give it another try with the whole
36096    # argument.
36097    path="$complete"
36098    arguments="EOL"
36099    new_path="$path"
36100
36101  windows_path="$new_path"
36102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36103    unix_path=`$CYGPATH -u "$windows_path"`
36104    new_path="$unix_path"
36105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36107    new_path="$unix_path"
36108  fi
36109
36110
36111    new_path=`$WHICH "$new_path" 2> /dev/null`
36112    # bat and cmd files are not always considered executable in MSYS causing which
36113    # to not find them
36114    if test "x$new_path" = x \
36115        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36116        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36117      new_path="$path"
36118
36119  windows_path="$new_path"
36120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36121    unix_path=`$CYGPATH -u "$windows_path"`
36122    new_path="$unix_path"
36123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36125    new_path="$unix_path"
36126  fi
36127
36128    fi
36129
36130    if test "x$new_path" = x; then
36131      # It's still not found. Now this is an unrecoverable error.
36132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36133$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36134      has_space=`$ECHO "$complete" | $GREP " "`
36135      if test "x$has_space" != x; then
36136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36138      fi
36139      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36140    fi
36141  fi
36142
36143  # Now new_path has a complete unix path to the binary
36144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36145    # Keep paths in /bin as-is, but remove trailing .exe if any
36146    new_path="${new_path/%.exe/}"
36147    # Do not save /bin paths to all_fixpath_prefixes!
36148  else
36149    # Not in mixed or Windows style, start by that.
36150    new_path=`cmd //c echo $new_path`
36151
36152  input_path="$new_path"
36153  # Check if we need to convert this using DOS-style short mode. If the path
36154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36155  # take no chances and rewrite it.
36156  # Note: m4 eats our [], so we need to use [ and ] instead.
36157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36158  if test "x$has_forbidden_chars" != x; then
36159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36161  fi
36162
36163    # Output is in $new_path
36164
36165  windows_path="$new_path"
36166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36167    unix_path=`$CYGPATH -u "$windows_path"`
36168    new_path="$unix_path"
36169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36171    new_path="$unix_path"
36172  fi
36173
36174    # remove trailing .exe if any
36175    new_path="${new_path/%.exe/}"
36176
36177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36179  fi
36180
36181    else
36182      # We're on a unix platform. Hooray! :)
36183      # First separate the path from the arguments. This will split at the first
36184      # space.
36185      complete="$STRIP"
36186      path="${complete%% *}"
36187      tmp="$complete EOL"
36188      arguments="${tmp#* }"
36189
36190      # Cannot rely on the command "which" here since it doesn't always work.
36191      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36192      if test -z "$is_absolute_path"; then
36193        # Path to executable is not absolute. Find it.
36194        IFS_save="$IFS"
36195        IFS=:
36196        for p in $PATH; do
36197          if test -f "$p/$path" && test -x "$p/$path"; then
36198            new_path="$p/$path"
36199            break
36200          fi
36201        done
36202        IFS="$IFS_save"
36203      else
36204        # This is an absolute path, we can use it without further modifications.
36205        new_path="$path"
36206      fi
36207
36208      if test "x$new_path" = x; then
36209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36210$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36211        has_space=`$ECHO "$complete" | $GREP " "`
36212        if test "x$has_space" != x; then
36213          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36215        fi
36216        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36217      fi
36218    fi
36219
36220    # Now join together the path and the arguments once again
36221    if test "x$arguments" != xEOL; then
36222      new_complete="$new_path ${arguments% *}"
36223    else
36224      new_complete="$new_path"
36225    fi
36226
36227    if test "x$complete" != "x$new_complete"; then
36228      STRIP="$new_complete"
36229      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36230$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36231    fi
36232  fi
36233
36234
36235
36236  # Publish this variable in the help.
36237
36238
36239  if test "x$NM" = x; then
36240    # The variable is not set by user, try to locate tool using the code snippet
36241    for ac_prog in nm
36242do
36243  # Extract the first word of "$ac_prog", so it can be a program name with args.
36244set dummy $ac_prog; ac_word=$2
36245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36246$as_echo_n "checking for $ac_word... " >&6; }
36247if ${ac_cv_path_NM+:} false; then :
36248  $as_echo_n "(cached) " >&6
36249else
36250  case $NM in
36251  [\\/]* | ?:[\\/]*)
36252  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36253  ;;
36254  *)
36255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36256for as_dir in $PATH
36257do
36258  IFS=$as_save_IFS
36259  test -z "$as_dir" && as_dir=.
36260    for ac_exec_ext in '' $ac_executable_extensions; do
36261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36262    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36264    break 2
36265  fi
36266done
36267  done
36268IFS=$as_save_IFS
36269
36270  ;;
36271esac
36272fi
36273NM=$ac_cv_path_NM
36274if test -n "$NM"; then
36275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36276$as_echo "$NM" >&6; }
36277else
36278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36279$as_echo "no" >&6; }
36280fi
36281
36282
36283  test -n "$NM" && break
36284done
36285
36286  else
36287    # The variable is set, but is it from the command line or the environment?
36288
36289    # Try to remove the string !NM! from our list.
36290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36292      # If it failed, the variable was not from the command line. Ignore it,
36293      # but warn the user (except for BASH, which is always set by the calling BASH).
36294      if test "xNM" != xBASH; then
36295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36296$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36297      fi
36298      # Try to locate tool using the code snippet
36299      for ac_prog in nm
36300do
36301  # Extract the first word of "$ac_prog", so it can be a program name with args.
36302set dummy $ac_prog; ac_word=$2
36303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36304$as_echo_n "checking for $ac_word... " >&6; }
36305if ${ac_cv_path_NM+:} false; then :
36306  $as_echo_n "(cached) " >&6
36307else
36308  case $NM in
36309  [\\/]* | ?:[\\/]*)
36310  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36311  ;;
36312  *)
36313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36314for as_dir in $PATH
36315do
36316  IFS=$as_save_IFS
36317  test -z "$as_dir" && as_dir=.
36318    for ac_exec_ext in '' $ac_executable_extensions; do
36319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36320    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36322    break 2
36323  fi
36324done
36325  done
36326IFS=$as_save_IFS
36327
36328  ;;
36329esac
36330fi
36331NM=$ac_cv_path_NM
36332if test -n "$NM"; then
36333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36334$as_echo "$NM" >&6; }
36335else
36336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36337$as_echo "no" >&6; }
36338fi
36339
36340
36341  test -n "$NM" && break
36342done
36343
36344    else
36345      # If it succeeded, then it was overridden by the user. We will use it
36346      # for the tool.
36347
36348      # First remove it from the list of overridden variables, so we can test
36349      # for unknown variables in the end.
36350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36351
36352      # Check if the provided tool contains a complete path.
36353      tool_specified="$NM"
36354      tool_basename="${tool_specified##*/}"
36355      if test "x$tool_basename" = "x$tool_specified"; then
36356        # A command without a complete path is provided, search $PATH.
36357        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36358$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36359        # Extract the first word of "$tool_basename", so it can be a program name with args.
36360set dummy $tool_basename; ac_word=$2
36361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36362$as_echo_n "checking for $ac_word... " >&6; }
36363if ${ac_cv_path_NM+:} false; then :
36364  $as_echo_n "(cached) " >&6
36365else
36366  case $NM in
36367  [\\/]* | ?:[\\/]*)
36368  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36369  ;;
36370  *)
36371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36372for as_dir in $PATH
36373do
36374  IFS=$as_save_IFS
36375  test -z "$as_dir" && as_dir=.
36376    for ac_exec_ext in '' $ac_executable_extensions; do
36377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36378    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36380    break 2
36381  fi
36382done
36383  done
36384IFS=$as_save_IFS
36385
36386  ;;
36387esac
36388fi
36389NM=$ac_cv_path_NM
36390if test -n "$NM"; then
36391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36392$as_echo "$NM" >&6; }
36393else
36394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36395$as_echo "no" >&6; }
36396fi
36397
36398
36399        if test "x$NM" = x; then
36400          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36401        fi
36402      else
36403        # Otherwise we believe it is a complete path. Use it as it is.
36404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36405$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36407$as_echo_n "checking for NM... " >&6; }
36408        if test ! -x "$tool_specified"; then
36409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36410$as_echo "not found" >&6; }
36411          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36412        fi
36413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36414$as_echo "$tool_specified" >&6; }
36415      fi
36416    fi
36417  fi
36418
36419
36420
36421  # Only process if variable expands to non-empty
36422
36423  if test "x$NM" != x; then
36424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36425
36426  # First separate the path from the arguments. This will split at the first
36427  # space.
36428  complete="$NM"
36429  path="${complete%% *}"
36430  tmp="$complete EOL"
36431  arguments="${tmp#* }"
36432
36433  # Input might be given as Windows format, start by converting to
36434  # unix format.
36435  new_path=`$CYGPATH -u "$path"`
36436
36437  # Now try to locate executable using which
36438  new_path=`$WHICH "$new_path" 2> /dev/null`
36439  # bat and cmd files are not always considered executable in cygwin causing which
36440  # to not find them
36441  if test "x$new_path" = x \
36442      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36443      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36444    new_path=`$CYGPATH -u "$path"`
36445  fi
36446  if test "x$new_path" = x; then
36447    # Oops. Which didn't find the executable.
36448    # The splitting of arguments from the executable at a space might have been incorrect,
36449    # since paths with space are more likely in Windows. Give it another try with the whole
36450    # argument.
36451    path="$complete"
36452    arguments="EOL"
36453    new_path=`$CYGPATH -u "$path"`
36454    new_path=`$WHICH "$new_path" 2> /dev/null`
36455    # bat and cmd files are not always considered executable in cygwin causing which
36456    # to not find them
36457    if test "x$new_path" = x \
36458        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36459        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36460      new_path=`$CYGPATH -u "$path"`
36461    fi
36462    if test "x$new_path" = x; then
36463      # It's still not found. Now this is an unrecoverable error.
36464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36465$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36466      has_space=`$ECHO "$complete" | $GREP " "`
36467      if test "x$has_space" != x; then
36468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36470      fi
36471      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36472    fi
36473  fi
36474
36475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36478  # "foo.exe" is OK but "foo" is an error.
36479  #
36480  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36481  # It is also a way to make sure we got the proper file name for the real test later on.
36482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36483  if test "x$test_shortpath" = x; then
36484    # Short path failed, file does not exist as specified.
36485    # Try adding .exe or .cmd
36486    if test -f "${new_path}.exe"; then
36487      input_to_shortpath="${new_path}.exe"
36488    elif test -f "${new_path}.cmd"; then
36489      input_to_shortpath="${new_path}.cmd"
36490    else
36491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36492$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36493      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36494$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36495      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36496    fi
36497  else
36498    input_to_shortpath="$new_path"
36499  fi
36500
36501  # Call helper function which possibly converts this using DOS-style short mode.
36502  # If so, the updated path is stored in $new_path.
36503  new_path="$input_to_shortpath"
36504
36505  input_path="$input_to_shortpath"
36506  # Check if we need to convert this using DOS-style short mode. If the path
36507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36508  # take no chances and rewrite it.
36509  # Note: m4 eats our [], so we need to use [ and ] instead.
36510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36511  if test "x$has_forbidden_chars" != x; then
36512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36516      # Going to short mode and back again did indeed matter. Since short mode is
36517      # case insensitive, let's make it lowercase to improve readability.
36518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36519      # Now convert it back to Unix-style (cygpath)
36520      input_path=`$CYGPATH -u "$shortmode_path"`
36521      new_path="$input_path"
36522    fi
36523  fi
36524
36525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36526  if test "x$test_cygdrive_prefix" = x; then
36527    # As a simple fix, exclude /usr/bin since it's not a real path.
36528    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36530      # a path prefixed by /cygdrive for fixpath to work.
36531      new_path="$CYGWIN_ROOT_PATH$input_path"
36532    fi
36533  fi
36534
36535  # remove trailing .exe if any
36536  new_path="${new_path/%.exe/}"
36537
36538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36539
36540  # First separate the path from the arguments. This will split at the first
36541  # space.
36542  complete="$NM"
36543  path="${complete%% *}"
36544  tmp="$complete EOL"
36545  arguments="${tmp#* }"
36546
36547  # Input might be given as Windows format, start by converting to
36548  # unix format.
36549  new_path="$path"
36550
36551  windows_path="$new_path"
36552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36553    unix_path=`$CYGPATH -u "$windows_path"`
36554    new_path="$unix_path"
36555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36557    new_path="$unix_path"
36558  fi
36559
36560
36561  # Now try to locate executable using which
36562  new_path=`$WHICH "$new_path" 2> /dev/null`
36563
36564  if test "x$new_path" = x; then
36565    # Oops. Which didn't find the executable.
36566    # The splitting of arguments from the executable at a space might have been incorrect,
36567    # since paths with space are more likely in Windows. Give it another try with the whole
36568    # argument.
36569    path="$complete"
36570    arguments="EOL"
36571    new_path="$path"
36572
36573  windows_path="$new_path"
36574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36575    unix_path=`$CYGPATH -u "$windows_path"`
36576    new_path="$unix_path"
36577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36579    new_path="$unix_path"
36580  fi
36581
36582
36583    new_path=`$WHICH "$new_path" 2> /dev/null`
36584    # bat and cmd files are not always considered executable in MSYS causing which
36585    # to not find them
36586    if test "x$new_path" = x \
36587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36589      new_path="$path"
36590
36591  windows_path="$new_path"
36592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36593    unix_path=`$CYGPATH -u "$windows_path"`
36594    new_path="$unix_path"
36595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36597    new_path="$unix_path"
36598  fi
36599
36600    fi
36601
36602    if test "x$new_path" = x; then
36603      # It's still not found. Now this is an unrecoverable error.
36604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36605$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36606      has_space=`$ECHO "$complete" | $GREP " "`
36607      if test "x$has_space" != x; then
36608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36610      fi
36611      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36612    fi
36613  fi
36614
36615  # Now new_path has a complete unix path to the binary
36616  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36617    # Keep paths in /bin as-is, but remove trailing .exe if any
36618    new_path="${new_path/%.exe/}"
36619    # Do not save /bin paths to all_fixpath_prefixes!
36620  else
36621    # Not in mixed or Windows style, start by that.
36622    new_path=`cmd //c echo $new_path`
36623
36624  input_path="$new_path"
36625  # Check if we need to convert this using DOS-style short mode. If the path
36626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36627  # take no chances and rewrite it.
36628  # Note: m4 eats our [], so we need to use [ and ] instead.
36629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36630  if test "x$has_forbidden_chars" != x; then
36631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36633  fi
36634
36635    # Output is in $new_path
36636
36637  windows_path="$new_path"
36638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36639    unix_path=`$CYGPATH -u "$windows_path"`
36640    new_path="$unix_path"
36641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36643    new_path="$unix_path"
36644  fi
36645
36646    # remove trailing .exe if any
36647    new_path="${new_path/%.exe/}"
36648
36649    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36650    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36651  fi
36652
36653    else
36654      # We're on a unix platform. Hooray! :)
36655      # First separate the path from the arguments. This will split at the first
36656      # space.
36657      complete="$NM"
36658      path="${complete%% *}"
36659      tmp="$complete EOL"
36660      arguments="${tmp#* }"
36661
36662      # Cannot rely on the command "which" here since it doesn't always work.
36663      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36664      if test -z "$is_absolute_path"; then
36665        # Path to executable is not absolute. Find it.
36666        IFS_save="$IFS"
36667        IFS=:
36668        for p in $PATH; do
36669          if test -f "$p/$path" && test -x "$p/$path"; then
36670            new_path="$p/$path"
36671            break
36672          fi
36673        done
36674        IFS="$IFS_save"
36675      else
36676        # This is an absolute path, we can use it without further modifications.
36677        new_path="$path"
36678      fi
36679
36680      if test "x$new_path" = x; then
36681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36682$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36683        has_space=`$ECHO "$complete" | $GREP " "`
36684        if test "x$has_space" != x; then
36685          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36686$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36687        fi
36688        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36689      fi
36690    fi
36691
36692    # Now join together the path and the arguments once again
36693    if test "x$arguments" != xEOL; then
36694      new_complete="$new_path ${arguments% *}"
36695    else
36696      new_complete="$new_path"
36697    fi
36698
36699    if test "x$complete" != "x$new_complete"; then
36700      NM="$new_complete"
36701      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36702$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36703    fi
36704  fi
36705
36706
36707
36708  # Publish this variable in the help.
36709
36710
36711  if test "x$GNM" = x; then
36712    # The variable is not set by user, try to locate tool using the code snippet
36713    for ac_prog in gnm
36714do
36715  # Extract the first word of "$ac_prog", so it can be a program name with args.
36716set dummy $ac_prog; ac_word=$2
36717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36718$as_echo_n "checking for $ac_word... " >&6; }
36719if ${ac_cv_path_GNM+:} false; then :
36720  $as_echo_n "(cached) " >&6
36721else
36722  case $GNM in
36723  [\\/]* | ?:[\\/]*)
36724  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36725  ;;
36726  *)
36727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36728for as_dir in $PATH
36729do
36730  IFS=$as_save_IFS
36731  test -z "$as_dir" && as_dir=.
36732    for ac_exec_ext in '' $ac_executable_extensions; do
36733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36734    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36736    break 2
36737  fi
36738done
36739  done
36740IFS=$as_save_IFS
36741
36742  ;;
36743esac
36744fi
36745GNM=$ac_cv_path_GNM
36746if test -n "$GNM"; then
36747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36748$as_echo "$GNM" >&6; }
36749else
36750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36751$as_echo "no" >&6; }
36752fi
36753
36754
36755  test -n "$GNM" && break
36756done
36757
36758  else
36759    # The variable is set, but is it from the command line or the environment?
36760
36761    # Try to remove the string !GNM! from our list.
36762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36764      # If it failed, the variable was not from the command line. Ignore it,
36765      # but warn the user (except for BASH, which is always set by the calling BASH).
36766      if test "xGNM" != xBASH; then
36767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36768$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36769      fi
36770      # Try to locate tool using the code snippet
36771      for ac_prog in gnm
36772do
36773  # Extract the first word of "$ac_prog", so it can be a program name with args.
36774set dummy $ac_prog; ac_word=$2
36775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36776$as_echo_n "checking for $ac_word... " >&6; }
36777if ${ac_cv_path_GNM+:} false; then :
36778  $as_echo_n "(cached) " >&6
36779else
36780  case $GNM in
36781  [\\/]* | ?:[\\/]*)
36782  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36783  ;;
36784  *)
36785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36786for as_dir in $PATH
36787do
36788  IFS=$as_save_IFS
36789  test -z "$as_dir" && as_dir=.
36790    for ac_exec_ext in '' $ac_executable_extensions; do
36791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36792    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36794    break 2
36795  fi
36796done
36797  done
36798IFS=$as_save_IFS
36799
36800  ;;
36801esac
36802fi
36803GNM=$ac_cv_path_GNM
36804if test -n "$GNM"; then
36805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36806$as_echo "$GNM" >&6; }
36807else
36808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36809$as_echo "no" >&6; }
36810fi
36811
36812
36813  test -n "$GNM" && break
36814done
36815
36816    else
36817      # If it succeeded, then it was overridden by the user. We will use it
36818      # for the tool.
36819
36820      # First remove it from the list of overridden variables, so we can test
36821      # for unknown variables in the end.
36822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36823
36824      # Check if the provided tool contains a complete path.
36825      tool_specified="$GNM"
36826      tool_basename="${tool_specified##*/}"
36827      if test "x$tool_basename" = "x$tool_specified"; then
36828        # A command without a complete path is provided, search $PATH.
36829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36830$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36831        # Extract the first word of "$tool_basename", so it can be a program name with args.
36832set dummy $tool_basename; ac_word=$2
36833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36834$as_echo_n "checking for $ac_word... " >&6; }
36835if ${ac_cv_path_GNM+:} false; then :
36836  $as_echo_n "(cached) " >&6
36837else
36838  case $GNM in
36839  [\\/]* | ?:[\\/]*)
36840  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36841  ;;
36842  *)
36843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36844for as_dir in $PATH
36845do
36846  IFS=$as_save_IFS
36847  test -z "$as_dir" && as_dir=.
36848    for ac_exec_ext in '' $ac_executable_extensions; do
36849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36850    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36852    break 2
36853  fi
36854done
36855  done
36856IFS=$as_save_IFS
36857
36858  ;;
36859esac
36860fi
36861GNM=$ac_cv_path_GNM
36862if test -n "$GNM"; then
36863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36864$as_echo "$GNM" >&6; }
36865else
36866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36867$as_echo "no" >&6; }
36868fi
36869
36870
36871        if test "x$GNM" = x; then
36872          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36873        fi
36874      else
36875        # Otherwise we believe it is a complete path. Use it as it is.
36876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36877$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36879$as_echo_n "checking for GNM... " >&6; }
36880        if test ! -x "$tool_specified"; then
36881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36882$as_echo "not found" >&6; }
36883          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36884        fi
36885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36886$as_echo "$tool_specified" >&6; }
36887      fi
36888    fi
36889  fi
36890
36891
36892
36893  # Only process if variable expands to non-empty
36894
36895  if test "x$GNM" != x; then
36896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36897
36898  # First separate the path from the arguments. This will split at the first
36899  # space.
36900  complete="$GNM"
36901  path="${complete%% *}"
36902  tmp="$complete EOL"
36903  arguments="${tmp#* }"
36904
36905  # Input might be given as Windows format, start by converting to
36906  # unix format.
36907  new_path=`$CYGPATH -u "$path"`
36908
36909  # Now try to locate executable using which
36910  new_path=`$WHICH "$new_path" 2> /dev/null`
36911  # bat and cmd files are not always considered executable in cygwin causing which
36912  # to not find them
36913  if test "x$new_path" = x \
36914      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36915      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36916    new_path=`$CYGPATH -u "$path"`
36917  fi
36918  if test "x$new_path" = x; then
36919    # Oops. Which didn't find the executable.
36920    # The splitting of arguments from the executable at a space might have been incorrect,
36921    # since paths with space are more likely in Windows. Give it another try with the whole
36922    # argument.
36923    path="$complete"
36924    arguments="EOL"
36925    new_path=`$CYGPATH -u "$path"`
36926    new_path=`$WHICH "$new_path" 2> /dev/null`
36927    # bat and cmd files are not always considered executable in cygwin causing which
36928    # to not find them
36929    if test "x$new_path" = x \
36930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36932      new_path=`$CYGPATH -u "$path"`
36933    fi
36934    if test "x$new_path" = x; then
36935      # It's still not found. Now this is an unrecoverable error.
36936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36937$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36938      has_space=`$ECHO "$complete" | $GREP " "`
36939      if test "x$has_space" != x; then
36940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36942      fi
36943      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36944    fi
36945  fi
36946
36947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36950  # "foo.exe" is OK but "foo" is an error.
36951  #
36952  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36953  # It is also a way to make sure we got the proper file name for the real test later on.
36954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36955  if test "x$test_shortpath" = x; then
36956    # Short path failed, file does not exist as specified.
36957    # Try adding .exe or .cmd
36958    if test -f "${new_path}.exe"; then
36959      input_to_shortpath="${new_path}.exe"
36960    elif test -f "${new_path}.cmd"; then
36961      input_to_shortpath="${new_path}.cmd"
36962    else
36963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36964$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36965      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36966$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36967      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36968    fi
36969  else
36970    input_to_shortpath="$new_path"
36971  fi
36972
36973  # Call helper function which possibly converts this using DOS-style short mode.
36974  # If so, the updated path is stored in $new_path.
36975  new_path="$input_to_shortpath"
36976
36977  input_path="$input_to_shortpath"
36978  # Check if we need to convert this using DOS-style short mode. If the path
36979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36980  # take no chances and rewrite it.
36981  # Note: m4 eats our [], so we need to use [ and ] instead.
36982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36983  if test "x$has_forbidden_chars" != x; then
36984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36988      # Going to short mode and back again did indeed matter. Since short mode is
36989      # case insensitive, let's make it lowercase to improve readability.
36990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36991      # Now convert it back to Unix-style (cygpath)
36992      input_path=`$CYGPATH -u "$shortmode_path"`
36993      new_path="$input_path"
36994    fi
36995  fi
36996
36997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36998  if test "x$test_cygdrive_prefix" = x; then
36999    # As a simple fix, exclude /usr/bin since it's not a real path.
37000    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37002      # a path prefixed by /cygdrive for fixpath to work.
37003      new_path="$CYGWIN_ROOT_PATH$input_path"
37004    fi
37005  fi
37006
37007  # remove trailing .exe if any
37008  new_path="${new_path/%.exe/}"
37009
37010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37011
37012  # First separate the path from the arguments. This will split at the first
37013  # space.
37014  complete="$GNM"
37015  path="${complete%% *}"
37016  tmp="$complete EOL"
37017  arguments="${tmp#* }"
37018
37019  # Input might be given as Windows format, start by converting to
37020  # unix format.
37021  new_path="$path"
37022
37023  windows_path="$new_path"
37024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37025    unix_path=`$CYGPATH -u "$windows_path"`
37026    new_path="$unix_path"
37027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37029    new_path="$unix_path"
37030  fi
37031
37032
37033  # Now try to locate executable using which
37034  new_path=`$WHICH "$new_path" 2> /dev/null`
37035
37036  if test "x$new_path" = x; then
37037    # Oops. Which didn't find the executable.
37038    # The splitting of arguments from the executable at a space might have been incorrect,
37039    # since paths with space are more likely in Windows. Give it another try with the whole
37040    # argument.
37041    path="$complete"
37042    arguments="EOL"
37043    new_path="$path"
37044
37045  windows_path="$new_path"
37046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37047    unix_path=`$CYGPATH -u "$windows_path"`
37048    new_path="$unix_path"
37049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37051    new_path="$unix_path"
37052  fi
37053
37054
37055    new_path=`$WHICH "$new_path" 2> /dev/null`
37056    # bat and cmd files are not always considered executable in MSYS causing which
37057    # to not find them
37058    if test "x$new_path" = x \
37059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37061      new_path="$path"
37062
37063  windows_path="$new_path"
37064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37065    unix_path=`$CYGPATH -u "$windows_path"`
37066    new_path="$unix_path"
37067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37069    new_path="$unix_path"
37070  fi
37071
37072    fi
37073
37074    if test "x$new_path" = x; then
37075      # It's still not found. Now this is an unrecoverable error.
37076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37077$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37078      has_space=`$ECHO "$complete" | $GREP " "`
37079      if test "x$has_space" != x; then
37080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37082      fi
37083      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37084    fi
37085  fi
37086
37087  # Now new_path has a complete unix path to the binary
37088  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37089    # Keep paths in /bin as-is, but remove trailing .exe if any
37090    new_path="${new_path/%.exe/}"
37091    # Do not save /bin paths to all_fixpath_prefixes!
37092  else
37093    # Not in mixed or Windows style, start by that.
37094    new_path=`cmd //c echo $new_path`
37095
37096  input_path="$new_path"
37097  # Check if we need to convert this using DOS-style short mode. If the path
37098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37099  # take no chances and rewrite it.
37100  # Note: m4 eats our [], so we need to use [ and ] instead.
37101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37102  if test "x$has_forbidden_chars" != x; then
37103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37105  fi
37106
37107    # Output is in $new_path
37108
37109  windows_path="$new_path"
37110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37111    unix_path=`$CYGPATH -u "$windows_path"`
37112    new_path="$unix_path"
37113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37115    new_path="$unix_path"
37116  fi
37117
37118    # remove trailing .exe if any
37119    new_path="${new_path/%.exe/}"
37120
37121    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37122    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37123  fi
37124
37125    else
37126      # We're on a unix platform. Hooray! :)
37127      # First separate the path from the arguments. This will split at the first
37128      # space.
37129      complete="$GNM"
37130      path="${complete%% *}"
37131      tmp="$complete EOL"
37132      arguments="${tmp#* }"
37133
37134      # Cannot rely on the command "which" here since it doesn't always work.
37135      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37136      if test -z "$is_absolute_path"; then
37137        # Path to executable is not absolute. Find it.
37138        IFS_save="$IFS"
37139        IFS=:
37140        for p in $PATH; do
37141          if test -f "$p/$path" && test -x "$p/$path"; then
37142            new_path="$p/$path"
37143            break
37144          fi
37145        done
37146        IFS="$IFS_save"
37147      else
37148        # This is an absolute path, we can use it without further modifications.
37149        new_path="$path"
37150      fi
37151
37152      if test "x$new_path" = x; then
37153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37154$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37155        has_space=`$ECHO "$complete" | $GREP " "`
37156        if test "x$has_space" != x; then
37157          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37159        fi
37160        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37161      fi
37162    fi
37163
37164    # Now join together the path and the arguments once again
37165    if test "x$arguments" != xEOL; then
37166      new_complete="$new_path ${arguments% *}"
37167    else
37168      new_complete="$new_path"
37169    fi
37170
37171    if test "x$complete" != "x$new_complete"; then
37172      GNM="$new_complete"
37173      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37174$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37175    fi
37176  fi
37177
37178  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37179    # FIXME: we should unify this with the solaris case above.
37180
37181
37182  # Publish this variable in the help.
37183
37184
37185  if test "x$STRIP" = x; then
37186    # The variable is not set by user, try to locate tool using the code snippet
37187    if test -n "$ac_tool_prefix"; then
37188  for ac_prog in strip
37189  do
37190    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37191set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37193$as_echo_n "checking for $ac_word... " >&6; }
37194if ${ac_cv_prog_STRIP+:} false; then :
37195  $as_echo_n "(cached) " >&6
37196else
37197  if test -n "$STRIP"; then
37198  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37199else
37200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37201for as_dir in $PATH
37202do
37203  IFS=$as_save_IFS
37204  test -z "$as_dir" && as_dir=.
37205    for ac_exec_ext in '' $ac_executable_extensions; do
37206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37207    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37209    break 2
37210  fi
37211done
37212  done
37213IFS=$as_save_IFS
37214
37215fi
37216fi
37217STRIP=$ac_cv_prog_STRIP
37218if test -n "$STRIP"; then
37219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37220$as_echo "$STRIP" >&6; }
37221else
37222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37223$as_echo "no" >&6; }
37224fi
37225
37226
37227    test -n "$STRIP" && break
37228  done
37229fi
37230if test -z "$STRIP"; then
37231  ac_ct_STRIP=$STRIP
37232  for ac_prog in strip
37233do
37234  # Extract the first word of "$ac_prog", so it can be a program name with args.
37235set dummy $ac_prog; ac_word=$2
37236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37237$as_echo_n "checking for $ac_word... " >&6; }
37238if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37239  $as_echo_n "(cached) " >&6
37240else
37241  if test -n "$ac_ct_STRIP"; then
37242  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37243else
37244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37245for as_dir in $PATH
37246do
37247  IFS=$as_save_IFS
37248  test -z "$as_dir" && as_dir=.
37249    for ac_exec_ext in '' $ac_executable_extensions; do
37250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37251    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37253    break 2
37254  fi
37255done
37256  done
37257IFS=$as_save_IFS
37258
37259fi
37260fi
37261ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37262if test -n "$ac_ct_STRIP"; then
37263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37264$as_echo "$ac_ct_STRIP" >&6; }
37265else
37266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37267$as_echo "no" >&6; }
37268fi
37269
37270
37271  test -n "$ac_ct_STRIP" && break
37272done
37273
37274  if test "x$ac_ct_STRIP" = x; then
37275    STRIP=""
37276  else
37277    case $cross_compiling:$ac_tool_warned in
37278yes:)
37279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37281ac_tool_warned=yes ;;
37282esac
37283    STRIP=$ac_ct_STRIP
37284  fi
37285fi
37286
37287  else
37288    # The variable is set, but is it from the command line or the environment?
37289
37290    # Try to remove the string !STRIP! from our list.
37291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37293      # If it failed, the variable was not from the command line. Ignore it,
37294      # but warn the user (except for BASH, which is always set by the calling BASH).
37295      if test "xSTRIP" != xBASH; then
37296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37297$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37298      fi
37299      # Try to locate tool using the code snippet
37300      if test -n "$ac_tool_prefix"; then
37301  for ac_prog in strip
37302  do
37303    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37304set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37306$as_echo_n "checking for $ac_word... " >&6; }
37307if ${ac_cv_prog_STRIP+:} false; then :
37308  $as_echo_n "(cached) " >&6
37309else
37310  if test -n "$STRIP"; then
37311  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37312else
37313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37314for as_dir in $PATH
37315do
37316  IFS=$as_save_IFS
37317  test -z "$as_dir" && as_dir=.
37318    for ac_exec_ext in '' $ac_executable_extensions; do
37319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37320    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37322    break 2
37323  fi
37324done
37325  done
37326IFS=$as_save_IFS
37327
37328fi
37329fi
37330STRIP=$ac_cv_prog_STRIP
37331if test -n "$STRIP"; then
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37333$as_echo "$STRIP" >&6; }
37334else
37335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37336$as_echo "no" >&6; }
37337fi
37338
37339
37340    test -n "$STRIP" && break
37341  done
37342fi
37343if test -z "$STRIP"; then
37344  ac_ct_STRIP=$STRIP
37345  for ac_prog in strip
37346do
37347  # Extract the first word of "$ac_prog", so it can be a program name with args.
37348set dummy $ac_prog; ac_word=$2
37349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37350$as_echo_n "checking for $ac_word... " >&6; }
37351if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37352  $as_echo_n "(cached) " >&6
37353else
37354  if test -n "$ac_ct_STRIP"; then
37355  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37356else
37357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37358for as_dir in $PATH
37359do
37360  IFS=$as_save_IFS
37361  test -z "$as_dir" && as_dir=.
37362    for ac_exec_ext in '' $ac_executable_extensions; do
37363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37364    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37366    break 2
37367  fi
37368done
37369  done
37370IFS=$as_save_IFS
37371
37372fi
37373fi
37374ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37375if test -n "$ac_ct_STRIP"; then
37376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37377$as_echo "$ac_ct_STRIP" >&6; }
37378else
37379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37380$as_echo "no" >&6; }
37381fi
37382
37383
37384  test -n "$ac_ct_STRIP" && break
37385done
37386
37387  if test "x$ac_ct_STRIP" = x; then
37388    STRIP=""
37389  else
37390    case $cross_compiling:$ac_tool_warned in
37391yes:)
37392{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37393$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37394ac_tool_warned=yes ;;
37395esac
37396    STRIP=$ac_ct_STRIP
37397  fi
37398fi
37399
37400    else
37401      # If it succeeded, then it was overridden by the user. We will use it
37402      # for the tool.
37403
37404      # First remove it from the list of overridden variables, so we can test
37405      # for unknown variables in the end.
37406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37407
37408      # Check if the provided tool contains a complete path.
37409      tool_specified="$STRIP"
37410      tool_basename="${tool_specified##*/}"
37411      if test "x$tool_basename" = "x$tool_specified"; then
37412        # A command without a complete path is provided, search $PATH.
37413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37414$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37415        # Extract the first word of "$tool_basename", so it can be a program name with args.
37416set dummy $tool_basename; ac_word=$2
37417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37418$as_echo_n "checking for $ac_word... " >&6; }
37419if ${ac_cv_path_STRIP+:} false; then :
37420  $as_echo_n "(cached) " >&6
37421else
37422  case $STRIP in
37423  [\\/]* | ?:[\\/]*)
37424  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37425  ;;
37426  *)
37427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37428for as_dir in $PATH
37429do
37430  IFS=$as_save_IFS
37431  test -z "$as_dir" && as_dir=.
37432    for ac_exec_ext in '' $ac_executable_extensions; do
37433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37434    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37436    break 2
37437  fi
37438done
37439  done
37440IFS=$as_save_IFS
37441
37442  ;;
37443esac
37444fi
37445STRIP=$ac_cv_path_STRIP
37446if test -n "$STRIP"; then
37447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37448$as_echo "$STRIP" >&6; }
37449else
37450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37451$as_echo "no" >&6; }
37452fi
37453
37454
37455        if test "x$STRIP" = x; then
37456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37457        fi
37458      else
37459        # Otherwise we believe it is a complete path. Use it as it is.
37460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37461$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37463$as_echo_n "checking for STRIP... " >&6; }
37464        if test ! -x "$tool_specified"; then
37465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37466$as_echo "not found" >&6; }
37467          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37468        fi
37469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37470$as_echo "$tool_specified" >&6; }
37471      fi
37472    fi
37473  fi
37474
37475
37476
37477  # Only process if variable expands to non-empty
37478
37479  if test "x$STRIP" != x; then
37480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37481
37482  # First separate the path from the arguments. This will split at the first
37483  # space.
37484  complete="$STRIP"
37485  path="${complete%% *}"
37486  tmp="$complete EOL"
37487  arguments="${tmp#* }"
37488
37489  # Input might be given as Windows format, start by converting to
37490  # unix format.
37491  new_path=`$CYGPATH -u "$path"`
37492
37493  # Now try to locate executable using which
37494  new_path=`$WHICH "$new_path" 2> /dev/null`
37495  # bat and cmd files are not always considered executable in cygwin causing which
37496  # to not find them
37497  if test "x$new_path" = x \
37498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37500    new_path=`$CYGPATH -u "$path"`
37501  fi
37502  if test "x$new_path" = x; then
37503    # Oops. Which didn't find the executable.
37504    # The splitting of arguments from the executable at a space might have been incorrect,
37505    # since paths with space are more likely in Windows. Give it another try with the whole
37506    # argument.
37507    path="$complete"
37508    arguments="EOL"
37509    new_path=`$CYGPATH -u "$path"`
37510    new_path=`$WHICH "$new_path" 2> /dev/null`
37511    # bat and cmd files are not always considered executable in cygwin causing which
37512    # to not find them
37513    if test "x$new_path" = x \
37514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37516      new_path=`$CYGPATH -u "$path"`
37517    fi
37518    if test "x$new_path" = x; then
37519      # It's still not found. Now this is an unrecoverable error.
37520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37521$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37522      has_space=`$ECHO "$complete" | $GREP " "`
37523      if test "x$has_space" != x; then
37524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37526      fi
37527      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37528    fi
37529  fi
37530
37531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37534  # "foo.exe" is OK but "foo" is an error.
37535  #
37536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37537  # It is also a way to make sure we got the proper file name for the real test later on.
37538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37539  if test "x$test_shortpath" = x; then
37540    # Short path failed, file does not exist as specified.
37541    # Try adding .exe or .cmd
37542    if test -f "${new_path}.exe"; then
37543      input_to_shortpath="${new_path}.exe"
37544    elif test -f "${new_path}.cmd"; then
37545      input_to_shortpath="${new_path}.cmd"
37546    else
37547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37548$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37551      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37552    fi
37553  else
37554    input_to_shortpath="$new_path"
37555  fi
37556
37557  # Call helper function which possibly converts this using DOS-style short mode.
37558  # If so, the updated path is stored in $new_path.
37559  new_path="$input_to_shortpath"
37560
37561  input_path="$input_to_shortpath"
37562  # Check if we need to convert this using DOS-style short mode. If the path
37563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37564  # take no chances and rewrite it.
37565  # Note: m4 eats our [], so we need to use [ and ] instead.
37566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37567  if test "x$has_forbidden_chars" != x; then
37568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37572      # Going to short mode and back again did indeed matter. Since short mode is
37573      # case insensitive, let's make it lowercase to improve readability.
37574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37575      # Now convert it back to Unix-style (cygpath)
37576      input_path=`$CYGPATH -u "$shortmode_path"`
37577      new_path="$input_path"
37578    fi
37579  fi
37580
37581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37582  if test "x$test_cygdrive_prefix" = x; then
37583    # As a simple fix, exclude /usr/bin since it's not a real path.
37584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37586      # a path prefixed by /cygdrive for fixpath to work.
37587      new_path="$CYGWIN_ROOT_PATH$input_path"
37588    fi
37589  fi
37590
37591  # remove trailing .exe if any
37592  new_path="${new_path/%.exe/}"
37593
37594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37595
37596  # First separate the path from the arguments. This will split at the first
37597  # space.
37598  complete="$STRIP"
37599  path="${complete%% *}"
37600  tmp="$complete EOL"
37601  arguments="${tmp#* }"
37602
37603  # Input might be given as Windows format, start by converting to
37604  # unix format.
37605  new_path="$path"
37606
37607  windows_path="$new_path"
37608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37609    unix_path=`$CYGPATH -u "$windows_path"`
37610    new_path="$unix_path"
37611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37613    new_path="$unix_path"
37614  fi
37615
37616
37617  # Now try to locate executable using which
37618  new_path=`$WHICH "$new_path" 2> /dev/null`
37619
37620  if test "x$new_path" = x; then
37621    # Oops. Which didn't find the executable.
37622    # The splitting of arguments from the executable at a space might have been incorrect,
37623    # since paths with space are more likely in Windows. Give it another try with the whole
37624    # argument.
37625    path="$complete"
37626    arguments="EOL"
37627    new_path="$path"
37628
37629  windows_path="$new_path"
37630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37631    unix_path=`$CYGPATH -u "$windows_path"`
37632    new_path="$unix_path"
37633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37635    new_path="$unix_path"
37636  fi
37637
37638
37639    new_path=`$WHICH "$new_path" 2> /dev/null`
37640    # bat and cmd files are not always considered executable in MSYS causing which
37641    # to not find them
37642    if test "x$new_path" = x \
37643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37645      new_path="$path"
37646
37647  windows_path="$new_path"
37648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37649    unix_path=`$CYGPATH -u "$windows_path"`
37650    new_path="$unix_path"
37651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37653    new_path="$unix_path"
37654  fi
37655
37656    fi
37657
37658    if test "x$new_path" = x; then
37659      # It's still not found. Now this is an unrecoverable error.
37660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37661$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37662      has_space=`$ECHO "$complete" | $GREP " "`
37663      if test "x$has_space" != x; then
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37666      fi
37667      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37668    fi
37669  fi
37670
37671  # Now new_path has a complete unix path to the binary
37672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37673    # Keep paths in /bin as-is, but remove trailing .exe if any
37674    new_path="${new_path/%.exe/}"
37675    # Do not save /bin paths to all_fixpath_prefixes!
37676  else
37677    # Not in mixed or Windows style, start by that.
37678    new_path=`cmd //c echo $new_path`
37679
37680  input_path="$new_path"
37681  # Check if we need to convert this using DOS-style short mode. If the path
37682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37683  # take no chances and rewrite it.
37684  # Note: m4 eats our [], so we need to use [ and ] instead.
37685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37686  if test "x$has_forbidden_chars" != x; then
37687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37689  fi
37690
37691    # Output is in $new_path
37692
37693  windows_path="$new_path"
37694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37695    unix_path=`$CYGPATH -u "$windows_path"`
37696    new_path="$unix_path"
37697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37699    new_path="$unix_path"
37700  fi
37701
37702    # remove trailing .exe if any
37703    new_path="${new_path/%.exe/}"
37704
37705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37707  fi
37708
37709    else
37710      # We're on a unix platform. Hooray! :)
37711      # First separate the path from the arguments. This will split at the first
37712      # space.
37713      complete="$STRIP"
37714      path="${complete%% *}"
37715      tmp="$complete EOL"
37716      arguments="${tmp#* }"
37717
37718      # Cannot rely on the command "which" here since it doesn't always work.
37719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37720      if test -z "$is_absolute_path"; then
37721        # Path to executable is not absolute. Find it.
37722        IFS_save="$IFS"
37723        IFS=:
37724        for p in $PATH; do
37725          if test -f "$p/$path" && test -x "$p/$path"; then
37726            new_path="$p/$path"
37727            break
37728          fi
37729        done
37730        IFS="$IFS_save"
37731      else
37732        # This is an absolute path, we can use it without further modifications.
37733        new_path="$path"
37734      fi
37735
37736      if test "x$new_path" = x; then
37737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37738$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37739        has_space=`$ECHO "$complete" | $GREP " "`
37740        if test "x$has_space" != x; then
37741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37743        fi
37744        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37745      fi
37746    fi
37747
37748    # Now join together the path and the arguments once again
37749    if test "x$arguments" != xEOL; then
37750      new_complete="$new_path ${arguments% *}"
37751    else
37752      new_complete="$new_path"
37753    fi
37754
37755    if test "x$complete" != "x$new_complete"; then
37756      STRIP="$new_complete"
37757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37758$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37759    fi
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  # Only process if variable expands to non-empty
38060
38061  if test "x$NM" != x; then
38062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38063
38064  # First separate the path from the arguments. This will split at the first
38065  # space.
38066  complete="$NM"
38067  path="${complete%% *}"
38068  tmp="$complete EOL"
38069  arguments="${tmp#* }"
38070
38071  # Input might be given as Windows format, start by converting to
38072  # unix format.
38073  new_path=`$CYGPATH -u "$path"`
38074
38075  # Now try to locate executable using which
38076  new_path=`$WHICH "$new_path" 2> /dev/null`
38077  # bat and cmd files are not always considered executable in cygwin causing which
38078  # to not find them
38079  if test "x$new_path" = x \
38080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38082    new_path=`$CYGPATH -u "$path"`
38083  fi
38084  if test "x$new_path" = x; then
38085    # Oops. Which didn't find the executable.
38086    # The splitting of arguments from the executable at a space might have been incorrect,
38087    # since paths with space are more likely in Windows. Give it another try with the whole
38088    # argument.
38089    path="$complete"
38090    arguments="EOL"
38091    new_path=`$CYGPATH -u "$path"`
38092    new_path=`$WHICH "$new_path" 2> /dev/null`
38093    # bat and cmd files are not always considered executable in cygwin causing which
38094    # to not find them
38095    if test "x$new_path" = x \
38096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38098      new_path=`$CYGPATH -u "$path"`
38099    fi
38100    if test "x$new_path" = x; then
38101      # It's still not found. Now this is an unrecoverable error.
38102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38103$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38104      has_space=`$ECHO "$complete" | $GREP " "`
38105      if test "x$has_space" != x; then
38106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38108      fi
38109      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38110    fi
38111  fi
38112
38113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38116  # "foo.exe" is OK but "foo" is an error.
38117  #
38118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38119  # It is also a way to make sure we got the proper file name for the real test later on.
38120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38121  if test "x$test_shortpath" = x; then
38122    # Short path failed, file does not exist as specified.
38123    # Try adding .exe or .cmd
38124    if test -f "${new_path}.exe"; then
38125      input_to_shortpath="${new_path}.exe"
38126    elif test -f "${new_path}.cmd"; then
38127      input_to_shortpath="${new_path}.cmd"
38128    else
38129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38130$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38133      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38134    fi
38135  else
38136    input_to_shortpath="$new_path"
38137  fi
38138
38139  # Call helper function which possibly converts this using DOS-style short mode.
38140  # If so, the updated path is stored in $new_path.
38141  new_path="$input_to_shortpath"
38142
38143  input_path="$input_to_shortpath"
38144  # Check if we need to convert this using DOS-style short mode. If the path
38145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38146  # take no chances and rewrite it.
38147  # Note: m4 eats our [], so we need to use [ and ] instead.
38148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38149  if test "x$has_forbidden_chars" != x; then
38150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38154      # Going to short mode and back again did indeed matter. Since short mode is
38155      # case insensitive, let's make it lowercase to improve readability.
38156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38157      # Now convert it back to Unix-style (cygpath)
38158      input_path=`$CYGPATH -u "$shortmode_path"`
38159      new_path="$input_path"
38160    fi
38161  fi
38162
38163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38164  if test "x$test_cygdrive_prefix" = x; then
38165    # As a simple fix, exclude /usr/bin since it's not a real path.
38166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38168      # a path prefixed by /cygdrive for fixpath to work.
38169      new_path="$CYGWIN_ROOT_PATH$input_path"
38170    fi
38171  fi
38172
38173  # remove trailing .exe if any
38174  new_path="${new_path/%.exe/}"
38175
38176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38177
38178  # First separate the path from the arguments. This will split at the first
38179  # space.
38180  complete="$NM"
38181  path="${complete%% *}"
38182  tmp="$complete EOL"
38183  arguments="${tmp#* }"
38184
38185  # Input might be given as Windows format, start by converting to
38186  # unix format.
38187  new_path="$path"
38188
38189  windows_path="$new_path"
38190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38191    unix_path=`$CYGPATH -u "$windows_path"`
38192    new_path="$unix_path"
38193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38195    new_path="$unix_path"
38196  fi
38197
38198
38199  # Now try to locate executable using which
38200  new_path=`$WHICH "$new_path" 2> /dev/null`
38201
38202  if test "x$new_path" = x; then
38203    # Oops. Which didn't find the executable.
38204    # The splitting of arguments from the executable at a space might have been incorrect,
38205    # since paths with space are more likely in Windows. Give it another try with the whole
38206    # argument.
38207    path="$complete"
38208    arguments="EOL"
38209    new_path="$path"
38210
38211  windows_path="$new_path"
38212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38213    unix_path=`$CYGPATH -u "$windows_path"`
38214    new_path="$unix_path"
38215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38217    new_path="$unix_path"
38218  fi
38219
38220
38221    new_path=`$WHICH "$new_path" 2> /dev/null`
38222    # bat and cmd files are not always considered executable in MSYS causing which
38223    # to not find them
38224    if test "x$new_path" = x \
38225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38227      new_path="$path"
38228
38229  windows_path="$new_path"
38230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38231    unix_path=`$CYGPATH -u "$windows_path"`
38232    new_path="$unix_path"
38233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38235    new_path="$unix_path"
38236  fi
38237
38238    fi
38239
38240    if test "x$new_path" = x; then
38241      # It's still not found. Now this is an unrecoverable error.
38242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38243$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38244      has_space=`$ECHO "$complete" | $GREP " "`
38245      if test "x$has_space" != x; then
38246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38248      fi
38249      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38250    fi
38251  fi
38252
38253  # Now new_path has a complete unix path to the binary
38254  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38255    # Keep paths in /bin as-is, but remove trailing .exe if any
38256    new_path="${new_path/%.exe/}"
38257    # Do not save /bin paths to all_fixpath_prefixes!
38258  else
38259    # Not in mixed or Windows style, start by that.
38260    new_path=`cmd //c echo $new_path`
38261
38262  input_path="$new_path"
38263  # Check if we need to convert this using DOS-style short mode. If the path
38264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38265  # take no chances and rewrite it.
38266  # Note: m4 eats our [], so we need to use [ and ] instead.
38267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38268  if test "x$has_forbidden_chars" != x; then
38269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38271  fi
38272
38273    # Output is in $new_path
38274
38275  windows_path="$new_path"
38276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38277    unix_path=`$CYGPATH -u "$windows_path"`
38278    new_path="$unix_path"
38279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38281    new_path="$unix_path"
38282  fi
38283
38284    # remove trailing .exe if any
38285    new_path="${new_path/%.exe/}"
38286
38287    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38288    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38289  fi
38290
38291    else
38292      # We're on a unix platform. Hooray! :)
38293      # First separate the path from the arguments. This will split at the first
38294      # space.
38295      complete="$NM"
38296      path="${complete%% *}"
38297      tmp="$complete EOL"
38298      arguments="${tmp#* }"
38299
38300      # Cannot rely on the command "which" here since it doesn't always work.
38301      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38302      if test -z "$is_absolute_path"; then
38303        # Path to executable is not absolute. Find it.
38304        IFS_save="$IFS"
38305        IFS=:
38306        for p in $PATH; do
38307          if test -f "$p/$path" && test -x "$p/$path"; then
38308            new_path="$p/$path"
38309            break
38310          fi
38311        done
38312        IFS="$IFS_save"
38313      else
38314        # This is an absolute path, we can use it without further modifications.
38315        new_path="$path"
38316      fi
38317
38318      if test "x$new_path" = x; then
38319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38320$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38321        has_space=`$ECHO "$complete" | $GREP " "`
38322        if test "x$has_space" != x; then
38323          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38324$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38325        fi
38326        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38327      fi
38328    fi
38329
38330    # Now join together the path and the arguments once again
38331    if test "x$arguments" != xEOL; then
38332      new_complete="$new_path ${arguments% *}"
38333    else
38334      new_complete="$new_path"
38335    fi
38336
38337    if test "x$complete" != "x$new_complete"; then
38338      NM="$new_complete"
38339      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38340$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38341    fi
38342  fi
38343
38344    GNM="$NM"
38345
38346  fi
38347
38348  # objcopy is used for moving debug symbols to separate files when
38349  # full debug symbols are enabled.
38350  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38351
38352
38353  # Publish this variable in the help.
38354
38355
38356  if test "x$OBJCOPY" = x; then
38357    # The variable is not set by user, try to locate tool using the code snippet
38358    if test -n "$ac_tool_prefix"; then
38359  for ac_prog in gobjcopy objcopy
38360  do
38361    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38362set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38364$as_echo_n "checking for $ac_word... " >&6; }
38365if ${ac_cv_prog_OBJCOPY+:} false; then :
38366  $as_echo_n "(cached) " >&6
38367else
38368  if test -n "$OBJCOPY"; then
38369  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38370else
38371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38372for as_dir in $PATH
38373do
38374  IFS=$as_save_IFS
38375  test -z "$as_dir" && as_dir=.
38376    for ac_exec_ext in '' $ac_executable_extensions; do
38377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38378    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38380    break 2
38381  fi
38382done
38383  done
38384IFS=$as_save_IFS
38385
38386fi
38387fi
38388OBJCOPY=$ac_cv_prog_OBJCOPY
38389if test -n "$OBJCOPY"; then
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38391$as_echo "$OBJCOPY" >&6; }
38392else
38393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38394$as_echo "no" >&6; }
38395fi
38396
38397
38398    test -n "$OBJCOPY" && break
38399  done
38400fi
38401if test -z "$OBJCOPY"; then
38402  ac_ct_OBJCOPY=$OBJCOPY
38403  for ac_prog in gobjcopy objcopy
38404do
38405  # Extract the first word of "$ac_prog", so it can be a program name with args.
38406set dummy $ac_prog; ac_word=$2
38407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38408$as_echo_n "checking for $ac_word... " >&6; }
38409if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38410  $as_echo_n "(cached) " >&6
38411else
38412  if test -n "$ac_ct_OBJCOPY"; then
38413  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38414else
38415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38416for as_dir in $PATH
38417do
38418  IFS=$as_save_IFS
38419  test -z "$as_dir" && as_dir=.
38420    for ac_exec_ext in '' $ac_executable_extensions; do
38421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38422    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38424    break 2
38425  fi
38426done
38427  done
38428IFS=$as_save_IFS
38429
38430fi
38431fi
38432ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38433if test -n "$ac_ct_OBJCOPY"; then
38434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38435$as_echo "$ac_ct_OBJCOPY" >&6; }
38436else
38437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38438$as_echo "no" >&6; }
38439fi
38440
38441
38442  test -n "$ac_ct_OBJCOPY" && break
38443done
38444
38445  if test "x$ac_ct_OBJCOPY" = x; then
38446    OBJCOPY=""
38447  else
38448    case $cross_compiling:$ac_tool_warned in
38449yes:)
38450{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38451$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38452ac_tool_warned=yes ;;
38453esac
38454    OBJCOPY=$ac_ct_OBJCOPY
38455  fi
38456fi
38457
38458  else
38459    # The variable is set, but is it from the command line or the environment?
38460
38461    # Try to remove the string !OBJCOPY! from our list.
38462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38464      # If it failed, the variable was not from the command line. Ignore it,
38465      # but warn the user (except for BASH, which is always set by the calling BASH).
38466      if test "xOBJCOPY" != xBASH; then
38467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38468$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38469      fi
38470      # Try to locate tool using the code snippet
38471      if test -n "$ac_tool_prefix"; then
38472  for ac_prog in gobjcopy objcopy
38473  do
38474    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38475set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38477$as_echo_n "checking for $ac_word... " >&6; }
38478if ${ac_cv_prog_OBJCOPY+:} false; then :
38479  $as_echo_n "(cached) " >&6
38480else
38481  if test -n "$OBJCOPY"; then
38482  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38483else
38484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38485for as_dir in $PATH
38486do
38487  IFS=$as_save_IFS
38488  test -z "$as_dir" && as_dir=.
38489    for ac_exec_ext in '' $ac_executable_extensions; do
38490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38491    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38493    break 2
38494  fi
38495done
38496  done
38497IFS=$as_save_IFS
38498
38499fi
38500fi
38501OBJCOPY=$ac_cv_prog_OBJCOPY
38502if test -n "$OBJCOPY"; then
38503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38504$as_echo "$OBJCOPY" >&6; }
38505else
38506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38507$as_echo "no" >&6; }
38508fi
38509
38510
38511    test -n "$OBJCOPY" && break
38512  done
38513fi
38514if test -z "$OBJCOPY"; then
38515  ac_ct_OBJCOPY=$OBJCOPY
38516  for ac_prog in gobjcopy objcopy
38517do
38518  # Extract the first word of "$ac_prog", so it can be a program name with args.
38519set dummy $ac_prog; ac_word=$2
38520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38521$as_echo_n "checking for $ac_word... " >&6; }
38522if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38523  $as_echo_n "(cached) " >&6
38524else
38525  if test -n "$ac_ct_OBJCOPY"; then
38526  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38527else
38528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38529for as_dir in $PATH
38530do
38531  IFS=$as_save_IFS
38532  test -z "$as_dir" && as_dir=.
38533    for ac_exec_ext in '' $ac_executable_extensions; do
38534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38535    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38537    break 2
38538  fi
38539done
38540  done
38541IFS=$as_save_IFS
38542
38543fi
38544fi
38545ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38546if test -n "$ac_ct_OBJCOPY"; then
38547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38548$as_echo "$ac_ct_OBJCOPY" >&6; }
38549else
38550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38551$as_echo "no" >&6; }
38552fi
38553
38554
38555  test -n "$ac_ct_OBJCOPY" && break
38556done
38557
38558  if test "x$ac_ct_OBJCOPY" = x; then
38559    OBJCOPY=""
38560  else
38561    case $cross_compiling:$ac_tool_warned in
38562yes:)
38563{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38564$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38565ac_tool_warned=yes ;;
38566esac
38567    OBJCOPY=$ac_ct_OBJCOPY
38568  fi
38569fi
38570
38571    else
38572      # If it succeeded, then it was overridden by the user. We will use it
38573      # for the tool.
38574
38575      # First remove it from the list of overridden variables, so we can test
38576      # for unknown variables in the end.
38577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38578
38579      # Check if the provided tool contains a complete path.
38580      tool_specified="$OBJCOPY"
38581      tool_basename="${tool_specified##*/}"
38582      if test "x$tool_basename" = "x$tool_specified"; then
38583        # A command without a complete path is provided, search $PATH.
38584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38585$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38586        # Extract the first word of "$tool_basename", so it can be a program name with args.
38587set dummy $tool_basename; ac_word=$2
38588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38589$as_echo_n "checking for $ac_word... " >&6; }
38590if ${ac_cv_path_OBJCOPY+:} false; then :
38591  $as_echo_n "(cached) " >&6
38592else
38593  case $OBJCOPY in
38594  [\\/]* | ?:[\\/]*)
38595  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38596  ;;
38597  *)
38598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38599for as_dir in $PATH
38600do
38601  IFS=$as_save_IFS
38602  test -z "$as_dir" && as_dir=.
38603    for ac_exec_ext in '' $ac_executable_extensions; do
38604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38605    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38607    break 2
38608  fi
38609done
38610  done
38611IFS=$as_save_IFS
38612
38613  ;;
38614esac
38615fi
38616OBJCOPY=$ac_cv_path_OBJCOPY
38617if test -n "$OBJCOPY"; then
38618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38619$as_echo "$OBJCOPY" >&6; }
38620else
38621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38622$as_echo "no" >&6; }
38623fi
38624
38625
38626        if test "x$OBJCOPY" = x; then
38627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38628        fi
38629      else
38630        # Otherwise we believe it is a complete path. Use it as it is.
38631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38632$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38634$as_echo_n "checking for OBJCOPY... " >&6; }
38635        if test ! -x "$tool_specified"; then
38636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38637$as_echo "not found" >&6; }
38638          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38639        fi
38640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38641$as_echo "$tool_specified" >&6; }
38642      fi
38643    fi
38644  fi
38645
38646
38647    # Only call fixup if objcopy was found.
38648    if test -n "$OBJCOPY"; then
38649
38650  # Only process if variable expands to non-empty
38651
38652  if test "x$OBJCOPY" != x; then
38653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38654
38655  # First separate the path from the arguments. This will split at the first
38656  # space.
38657  complete="$OBJCOPY"
38658  path="${complete%% *}"
38659  tmp="$complete EOL"
38660  arguments="${tmp#* }"
38661
38662  # Input might be given as Windows format, start by converting to
38663  # unix format.
38664  new_path=`$CYGPATH -u "$path"`
38665
38666  # Now try to locate executable using which
38667  new_path=`$WHICH "$new_path" 2> /dev/null`
38668  # bat and cmd files are not always considered executable in cygwin causing which
38669  # to not find them
38670  if test "x$new_path" = x \
38671      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38672      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38673    new_path=`$CYGPATH -u "$path"`
38674  fi
38675  if test "x$new_path" = x; then
38676    # Oops. Which didn't find the executable.
38677    # The splitting of arguments from the executable at a space might have been incorrect,
38678    # since paths with space are more likely in Windows. Give it another try with the whole
38679    # argument.
38680    path="$complete"
38681    arguments="EOL"
38682    new_path=`$CYGPATH -u "$path"`
38683    new_path=`$WHICH "$new_path" 2> /dev/null`
38684    # bat and cmd files are not always considered executable in cygwin causing which
38685    # to not find them
38686    if test "x$new_path" = x \
38687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38689      new_path=`$CYGPATH -u "$path"`
38690    fi
38691    if test "x$new_path" = x; then
38692      # It's still not found. Now this is an unrecoverable error.
38693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38694$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38695      has_space=`$ECHO "$complete" | $GREP " "`
38696      if test "x$has_space" != x; then
38697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38699      fi
38700      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38701    fi
38702  fi
38703
38704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38707  # "foo.exe" is OK but "foo" is an error.
38708  #
38709  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38710  # It is also a way to make sure we got the proper file name for the real test later on.
38711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38712  if test "x$test_shortpath" = x; then
38713    # Short path failed, file does not exist as specified.
38714    # Try adding .exe or .cmd
38715    if test -f "${new_path}.exe"; then
38716      input_to_shortpath="${new_path}.exe"
38717    elif test -f "${new_path}.cmd"; then
38718      input_to_shortpath="${new_path}.cmd"
38719    else
38720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38721$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38722      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38723$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38724      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38725    fi
38726  else
38727    input_to_shortpath="$new_path"
38728  fi
38729
38730  # Call helper function which possibly converts this using DOS-style short mode.
38731  # If so, the updated path is stored in $new_path.
38732  new_path="$input_to_shortpath"
38733
38734  input_path="$input_to_shortpath"
38735  # Check if we need to convert this using DOS-style short mode. If the path
38736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38737  # take no chances and rewrite it.
38738  # Note: m4 eats our [], so we need to use [ and ] instead.
38739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38740  if test "x$has_forbidden_chars" != x; then
38741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38745      # Going to short mode and back again did indeed matter. Since short mode is
38746      # case insensitive, let's make it lowercase to improve readability.
38747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38748      # Now convert it back to Unix-style (cygpath)
38749      input_path=`$CYGPATH -u "$shortmode_path"`
38750      new_path="$input_path"
38751    fi
38752  fi
38753
38754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38755  if test "x$test_cygdrive_prefix" = x; then
38756    # As a simple fix, exclude /usr/bin since it's not a real path.
38757    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38759      # a path prefixed by /cygdrive for fixpath to work.
38760      new_path="$CYGWIN_ROOT_PATH$input_path"
38761    fi
38762  fi
38763
38764  # remove trailing .exe if any
38765  new_path="${new_path/%.exe/}"
38766
38767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38768
38769  # First separate the path from the arguments. This will split at the first
38770  # space.
38771  complete="$OBJCOPY"
38772  path="${complete%% *}"
38773  tmp="$complete EOL"
38774  arguments="${tmp#* }"
38775
38776  # Input might be given as Windows format, start by converting to
38777  # unix format.
38778  new_path="$path"
38779
38780  windows_path="$new_path"
38781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38782    unix_path=`$CYGPATH -u "$windows_path"`
38783    new_path="$unix_path"
38784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38786    new_path="$unix_path"
38787  fi
38788
38789
38790  # Now try to locate executable using which
38791  new_path=`$WHICH "$new_path" 2> /dev/null`
38792
38793  if test "x$new_path" = x; then
38794    # Oops. Which didn't find the executable.
38795    # The splitting of arguments from the executable at a space might have been incorrect,
38796    # since paths with space are more likely in Windows. Give it another try with the whole
38797    # argument.
38798    path="$complete"
38799    arguments="EOL"
38800    new_path="$path"
38801
38802  windows_path="$new_path"
38803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38804    unix_path=`$CYGPATH -u "$windows_path"`
38805    new_path="$unix_path"
38806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38808    new_path="$unix_path"
38809  fi
38810
38811
38812    new_path=`$WHICH "$new_path" 2> /dev/null`
38813    # bat and cmd files are not always considered executable in MSYS causing which
38814    # to not find them
38815    if test "x$new_path" = x \
38816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38818      new_path="$path"
38819
38820  windows_path="$new_path"
38821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38822    unix_path=`$CYGPATH -u "$windows_path"`
38823    new_path="$unix_path"
38824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38826    new_path="$unix_path"
38827  fi
38828
38829    fi
38830
38831    if test "x$new_path" = x; then
38832      # It's still not found. Now this is an unrecoverable error.
38833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38834$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38835      has_space=`$ECHO "$complete" | $GREP " "`
38836      if test "x$has_space" != x; then
38837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38839      fi
38840      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38841    fi
38842  fi
38843
38844  # Now new_path has a complete unix path to the binary
38845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38846    # Keep paths in /bin as-is, but remove trailing .exe if any
38847    new_path="${new_path/%.exe/}"
38848    # Do not save /bin paths to all_fixpath_prefixes!
38849  else
38850    # Not in mixed or Windows style, start by that.
38851    new_path=`cmd //c echo $new_path`
38852
38853  input_path="$new_path"
38854  # Check if we need to convert this using DOS-style short mode. If the path
38855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38856  # take no chances and rewrite it.
38857  # Note: m4 eats our [], so we need to use [ and ] instead.
38858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38859  if test "x$has_forbidden_chars" != x; then
38860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38862  fi
38863
38864    # Output is in $new_path
38865
38866  windows_path="$new_path"
38867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868    unix_path=`$CYGPATH -u "$windows_path"`
38869    new_path="$unix_path"
38870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38872    new_path="$unix_path"
38873  fi
38874
38875    # remove trailing .exe if any
38876    new_path="${new_path/%.exe/}"
38877
38878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38880  fi
38881
38882    else
38883      # We're on a unix platform. Hooray! :)
38884      # First separate the path from the arguments. This will split at the first
38885      # space.
38886      complete="$OBJCOPY"
38887      path="${complete%% *}"
38888      tmp="$complete EOL"
38889      arguments="${tmp#* }"
38890
38891      # Cannot rely on the command "which" here since it doesn't always work.
38892      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38893      if test -z "$is_absolute_path"; then
38894        # Path to executable is not absolute. Find it.
38895        IFS_save="$IFS"
38896        IFS=:
38897        for p in $PATH; do
38898          if test -f "$p/$path" && test -x "$p/$path"; then
38899            new_path="$p/$path"
38900            break
38901          fi
38902        done
38903        IFS="$IFS_save"
38904      else
38905        # This is an absolute path, we can use it without further modifications.
38906        new_path="$path"
38907      fi
38908
38909      if test "x$new_path" = x; then
38910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38911$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38912        has_space=`$ECHO "$complete" | $GREP " "`
38913        if test "x$has_space" != x; then
38914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38916        fi
38917        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38918      fi
38919    fi
38920
38921    # Now join together the path and the arguments once again
38922    if test "x$arguments" != xEOL; then
38923      new_complete="$new_path ${arguments% *}"
38924    else
38925      new_complete="$new_path"
38926    fi
38927
38928    if test "x$complete" != "x$new_complete"; then
38929      OBJCOPY="$new_complete"
38930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38931$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38932    fi
38933  fi
38934
38935      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38936        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38937        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38938        # - version number is last blank separate word on first line
38939        # - version number formats that have been seen:
38940        #   - <major>.<minor>
38941        #   - <major>.<minor>.<micro>
38942        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38943        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38944         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38945              -e 's/.* //' \
38946              -e '/^[01]\./b bad' \
38947              -e '/^2\./{' \
38948              -e '  s/^2\.//' \
38949              -e '  /^[0-9]$/b bad' \
38950              -e '  /^[0-9]\./b bad' \
38951              -e '  /^1[0-9]$/b bad' \
38952              -e '  /^1[0-9]\./b bad' \
38953              -e '  /^20\./b bad' \
38954              -e '  /^21\.0$/b bad' \
38955              -e '  /^21\.0\./b bad' \
38956              -e '}' \
38957              -e ':good' \
38958              -e 's/.*/VALID_VERSION/p' \
38959              -e 'q' \
38960              -e ':bad' \
38961              -e 's/.*/BAD_VERSION/p' \
38962              -e 'q'`
38963        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38964          OBJCOPY=
38965          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
38966$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38967          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38968$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38969          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38970$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38971          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38972$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38973          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38974$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38975        fi
38976      fi
38977    fi
38978  fi
38979
38980
38981
38982  # Publish this variable in the help.
38983
38984
38985  if test "x$OBJDUMP" = x; then
38986    # The variable is not set by user, try to locate tool using the code snippet
38987    if test -n "$ac_tool_prefix"; then
38988  for ac_prog in gobjdump objdump
38989  do
38990    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38991set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38993$as_echo_n "checking for $ac_word... " >&6; }
38994if ${ac_cv_prog_OBJDUMP+:} false; then :
38995  $as_echo_n "(cached) " >&6
38996else
38997  if test -n "$OBJDUMP"; then
38998  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38999else
39000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39001for as_dir in $PATH
39002do
39003  IFS=$as_save_IFS
39004  test -z "$as_dir" && as_dir=.
39005    for ac_exec_ext in '' $ac_executable_extensions; do
39006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39007    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39009    break 2
39010  fi
39011done
39012  done
39013IFS=$as_save_IFS
39014
39015fi
39016fi
39017OBJDUMP=$ac_cv_prog_OBJDUMP
39018if test -n "$OBJDUMP"; then
39019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39020$as_echo "$OBJDUMP" >&6; }
39021else
39022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39023$as_echo "no" >&6; }
39024fi
39025
39026
39027    test -n "$OBJDUMP" && break
39028  done
39029fi
39030if test -z "$OBJDUMP"; then
39031  ac_ct_OBJDUMP=$OBJDUMP
39032  for ac_prog in gobjdump objdump
39033do
39034  # Extract the first word of "$ac_prog", so it can be a program name with args.
39035set dummy $ac_prog; ac_word=$2
39036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39037$as_echo_n "checking for $ac_word... " >&6; }
39038if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39039  $as_echo_n "(cached) " >&6
39040else
39041  if test -n "$ac_ct_OBJDUMP"; then
39042  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39043else
39044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39045for as_dir in $PATH
39046do
39047  IFS=$as_save_IFS
39048  test -z "$as_dir" && as_dir=.
39049    for ac_exec_ext in '' $ac_executable_extensions; do
39050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39051    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39053    break 2
39054  fi
39055done
39056  done
39057IFS=$as_save_IFS
39058
39059fi
39060fi
39061ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39062if test -n "$ac_ct_OBJDUMP"; then
39063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39064$as_echo "$ac_ct_OBJDUMP" >&6; }
39065else
39066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39067$as_echo "no" >&6; }
39068fi
39069
39070
39071  test -n "$ac_ct_OBJDUMP" && break
39072done
39073
39074  if test "x$ac_ct_OBJDUMP" = x; then
39075    OBJDUMP=""
39076  else
39077    case $cross_compiling:$ac_tool_warned in
39078yes:)
39079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39081ac_tool_warned=yes ;;
39082esac
39083    OBJDUMP=$ac_ct_OBJDUMP
39084  fi
39085fi
39086
39087  else
39088    # The variable is set, but is it from the command line or the environment?
39089
39090    # Try to remove the string !OBJDUMP! from our list.
39091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39093      # If it failed, the variable was not from the command line. Ignore it,
39094      # but warn the user (except for BASH, which is always set by the calling BASH).
39095      if test "xOBJDUMP" != xBASH; then
39096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39097$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39098      fi
39099      # Try to locate tool using the code snippet
39100      if test -n "$ac_tool_prefix"; then
39101  for ac_prog in gobjdump objdump
39102  do
39103    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39104set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39106$as_echo_n "checking for $ac_word... " >&6; }
39107if ${ac_cv_prog_OBJDUMP+:} false; then :
39108  $as_echo_n "(cached) " >&6
39109else
39110  if test -n "$OBJDUMP"; then
39111  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39112else
39113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39114for as_dir in $PATH
39115do
39116  IFS=$as_save_IFS
39117  test -z "$as_dir" && as_dir=.
39118    for ac_exec_ext in '' $ac_executable_extensions; do
39119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39120    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39122    break 2
39123  fi
39124done
39125  done
39126IFS=$as_save_IFS
39127
39128fi
39129fi
39130OBJDUMP=$ac_cv_prog_OBJDUMP
39131if test -n "$OBJDUMP"; then
39132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39133$as_echo "$OBJDUMP" >&6; }
39134else
39135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39136$as_echo "no" >&6; }
39137fi
39138
39139
39140    test -n "$OBJDUMP" && break
39141  done
39142fi
39143if test -z "$OBJDUMP"; then
39144  ac_ct_OBJDUMP=$OBJDUMP
39145  for ac_prog in gobjdump objdump
39146do
39147  # Extract the first word of "$ac_prog", so it can be a program name with args.
39148set dummy $ac_prog; ac_word=$2
39149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39150$as_echo_n "checking for $ac_word... " >&6; }
39151if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39152  $as_echo_n "(cached) " >&6
39153else
39154  if test -n "$ac_ct_OBJDUMP"; then
39155  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39156else
39157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39158for as_dir in $PATH
39159do
39160  IFS=$as_save_IFS
39161  test -z "$as_dir" && as_dir=.
39162    for ac_exec_ext in '' $ac_executable_extensions; do
39163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39164    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39166    break 2
39167  fi
39168done
39169  done
39170IFS=$as_save_IFS
39171
39172fi
39173fi
39174ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39175if test -n "$ac_ct_OBJDUMP"; then
39176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39177$as_echo "$ac_ct_OBJDUMP" >&6; }
39178else
39179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39180$as_echo "no" >&6; }
39181fi
39182
39183
39184  test -n "$ac_ct_OBJDUMP" && break
39185done
39186
39187  if test "x$ac_ct_OBJDUMP" = x; then
39188    OBJDUMP=""
39189  else
39190    case $cross_compiling:$ac_tool_warned in
39191yes:)
39192{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39193$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39194ac_tool_warned=yes ;;
39195esac
39196    OBJDUMP=$ac_ct_OBJDUMP
39197  fi
39198fi
39199
39200    else
39201      # If it succeeded, then it was overridden by the user. We will use it
39202      # for the tool.
39203
39204      # First remove it from the list of overridden variables, so we can test
39205      # for unknown variables in the end.
39206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39207
39208      # Check if the provided tool contains a complete path.
39209      tool_specified="$OBJDUMP"
39210      tool_basename="${tool_specified##*/}"
39211      if test "x$tool_basename" = "x$tool_specified"; then
39212        # A command without a complete path is provided, search $PATH.
39213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39214$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39215        # Extract the first word of "$tool_basename", so it can be a program name with args.
39216set dummy $tool_basename; ac_word=$2
39217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39218$as_echo_n "checking for $ac_word... " >&6; }
39219if ${ac_cv_path_OBJDUMP+:} false; then :
39220  $as_echo_n "(cached) " >&6
39221else
39222  case $OBJDUMP in
39223  [\\/]* | ?:[\\/]*)
39224  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39225  ;;
39226  *)
39227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39228for as_dir in $PATH
39229do
39230  IFS=$as_save_IFS
39231  test -z "$as_dir" && as_dir=.
39232    for ac_exec_ext in '' $ac_executable_extensions; do
39233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39234    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39236    break 2
39237  fi
39238done
39239  done
39240IFS=$as_save_IFS
39241
39242  ;;
39243esac
39244fi
39245OBJDUMP=$ac_cv_path_OBJDUMP
39246if test -n "$OBJDUMP"; then
39247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39248$as_echo "$OBJDUMP" >&6; }
39249else
39250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39251$as_echo "no" >&6; }
39252fi
39253
39254
39255        if test "x$OBJDUMP" = x; then
39256          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39257        fi
39258      else
39259        # Otherwise we believe it is a complete path. Use it as it is.
39260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39261$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39263$as_echo_n "checking for OBJDUMP... " >&6; }
39264        if test ! -x "$tool_specified"; then
39265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39266$as_echo "not found" >&6; }
39267          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39268        fi
39269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39270$as_echo "$tool_specified" >&6; }
39271      fi
39272    fi
39273  fi
39274
39275
39276  if test "x$OBJDUMP" != x; then
39277    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39278    # bails if argument is missing.
39279
39280  # Only process if variable expands to non-empty
39281
39282  if test "x$OBJDUMP" != x; then
39283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39284
39285  # First separate the path from the arguments. This will split at the first
39286  # space.
39287  complete="$OBJDUMP"
39288  path="${complete%% *}"
39289  tmp="$complete EOL"
39290  arguments="${tmp#* }"
39291
39292  # Input might be given as Windows format, start by converting to
39293  # unix format.
39294  new_path=`$CYGPATH -u "$path"`
39295
39296  # Now try to locate executable using which
39297  new_path=`$WHICH "$new_path" 2> /dev/null`
39298  # bat and cmd files are not always considered executable in cygwin causing which
39299  # to not find them
39300  if test "x$new_path" = x \
39301      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39302      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39303    new_path=`$CYGPATH -u "$path"`
39304  fi
39305  if test "x$new_path" = x; then
39306    # Oops. Which didn't find the executable.
39307    # The splitting of arguments from the executable at a space might have been incorrect,
39308    # since paths with space are more likely in Windows. Give it another try with the whole
39309    # argument.
39310    path="$complete"
39311    arguments="EOL"
39312    new_path=`$CYGPATH -u "$path"`
39313    new_path=`$WHICH "$new_path" 2> /dev/null`
39314    # bat and cmd files are not always considered executable in cygwin causing which
39315    # to not find them
39316    if test "x$new_path" = x \
39317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39319      new_path=`$CYGPATH -u "$path"`
39320    fi
39321    if test "x$new_path" = x; then
39322      # It's still not found. Now this is an unrecoverable error.
39323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39324$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39325      has_space=`$ECHO "$complete" | $GREP " "`
39326      if test "x$has_space" != x; then
39327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39329      fi
39330      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39331    fi
39332  fi
39333
39334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39337  # "foo.exe" is OK but "foo" is an error.
39338  #
39339  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39340  # It is also a way to make sure we got the proper file name for the real test later on.
39341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39342  if test "x$test_shortpath" = x; then
39343    # Short path failed, file does not exist as specified.
39344    # Try adding .exe or .cmd
39345    if test -f "${new_path}.exe"; then
39346      input_to_shortpath="${new_path}.exe"
39347    elif test -f "${new_path}.cmd"; then
39348      input_to_shortpath="${new_path}.cmd"
39349    else
39350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39351$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39354      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39355    fi
39356  else
39357    input_to_shortpath="$new_path"
39358  fi
39359
39360  # Call helper function which possibly converts this using DOS-style short mode.
39361  # If so, the updated path is stored in $new_path.
39362  new_path="$input_to_shortpath"
39363
39364  input_path="$input_to_shortpath"
39365  # Check if we need to convert this using DOS-style short mode. If the path
39366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39367  # take no chances and rewrite it.
39368  # Note: m4 eats our [], so we need to use [ and ] instead.
39369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39370  if test "x$has_forbidden_chars" != x; then
39371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39375      # Going to short mode and back again did indeed matter. Since short mode is
39376      # case insensitive, let's make it lowercase to improve readability.
39377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39378      # Now convert it back to Unix-style (cygpath)
39379      input_path=`$CYGPATH -u "$shortmode_path"`
39380      new_path="$input_path"
39381    fi
39382  fi
39383
39384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39385  if test "x$test_cygdrive_prefix" = x; then
39386    # As a simple fix, exclude /usr/bin since it's not a real path.
39387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39389      # a path prefixed by /cygdrive for fixpath to work.
39390      new_path="$CYGWIN_ROOT_PATH$input_path"
39391    fi
39392  fi
39393
39394  # remove trailing .exe if any
39395  new_path="${new_path/%.exe/}"
39396
39397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39398
39399  # First separate the path from the arguments. This will split at the first
39400  # space.
39401  complete="$OBJDUMP"
39402  path="${complete%% *}"
39403  tmp="$complete EOL"
39404  arguments="${tmp#* }"
39405
39406  # Input might be given as Windows format, start by converting to
39407  # unix format.
39408  new_path="$path"
39409
39410  windows_path="$new_path"
39411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39412    unix_path=`$CYGPATH -u "$windows_path"`
39413    new_path="$unix_path"
39414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39416    new_path="$unix_path"
39417  fi
39418
39419
39420  # Now try to locate executable using which
39421  new_path=`$WHICH "$new_path" 2> /dev/null`
39422
39423  if test "x$new_path" = x; then
39424    # Oops. Which didn't find the executable.
39425    # The splitting of arguments from the executable at a space might have been incorrect,
39426    # since paths with space are more likely in Windows. Give it another try with the whole
39427    # argument.
39428    path="$complete"
39429    arguments="EOL"
39430    new_path="$path"
39431
39432  windows_path="$new_path"
39433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39434    unix_path=`$CYGPATH -u "$windows_path"`
39435    new_path="$unix_path"
39436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39438    new_path="$unix_path"
39439  fi
39440
39441
39442    new_path=`$WHICH "$new_path" 2> /dev/null`
39443    # bat and cmd files are not always considered executable in MSYS causing which
39444    # to not find them
39445    if test "x$new_path" = x \
39446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39448      new_path="$path"
39449
39450  windows_path="$new_path"
39451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39452    unix_path=`$CYGPATH -u "$windows_path"`
39453    new_path="$unix_path"
39454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39456    new_path="$unix_path"
39457  fi
39458
39459    fi
39460
39461    if test "x$new_path" = x; then
39462      # It's still not found. Now this is an unrecoverable error.
39463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39464$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39465      has_space=`$ECHO "$complete" | $GREP " "`
39466      if test "x$has_space" != x; then
39467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39469      fi
39470      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39471    fi
39472  fi
39473
39474  # Now new_path has a complete unix path to the binary
39475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39476    # Keep paths in /bin as-is, but remove trailing .exe if any
39477    new_path="${new_path/%.exe/}"
39478    # Do not save /bin paths to all_fixpath_prefixes!
39479  else
39480    # Not in mixed or Windows style, start by that.
39481    new_path=`cmd //c echo $new_path`
39482
39483  input_path="$new_path"
39484  # Check if we need to convert this using DOS-style short mode. If the path
39485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39486  # take no chances and rewrite it.
39487  # Note: m4 eats our [], so we need to use [ and ] instead.
39488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39489  if test "x$has_forbidden_chars" != x; then
39490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39492  fi
39493
39494    # Output is in $new_path
39495
39496  windows_path="$new_path"
39497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39498    unix_path=`$CYGPATH -u "$windows_path"`
39499    new_path="$unix_path"
39500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39502    new_path="$unix_path"
39503  fi
39504
39505    # remove trailing .exe if any
39506    new_path="${new_path/%.exe/}"
39507
39508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39510  fi
39511
39512    else
39513      # We're on a unix platform. Hooray! :)
39514      # First separate the path from the arguments. This will split at the first
39515      # space.
39516      complete="$OBJDUMP"
39517      path="${complete%% *}"
39518      tmp="$complete EOL"
39519      arguments="${tmp#* }"
39520
39521      # Cannot rely on the command "which" here since it doesn't always work.
39522      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39523      if test -z "$is_absolute_path"; then
39524        # Path to executable is not absolute. Find it.
39525        IFS_save="$IFS"
39526        IFS=:
39527        for p in $PATH; do
39528          if test -f "$p/$path" && test -x "$p/$path"; then
39529            new_path="$p/$path"
39530            break
39531          fi
39532        done
39533        IFS="$IFS_save"
39534      else
39535        # This is an absolute path, we can use it without further modifications.
39536        new_path="$path"
39537      fi
39538
39539      if test "x$new_path" = x; then
39540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39541$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39542        has_space=`$ECHO "$complete" | $GREP " "`
39543        if test "x$has_space" != x; then
39544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39546        fi
39547        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39548      fi
39549    fi
39550
39551    # Now join together the path and the arguments once again
39552    if test "x$arguments" != xEOL; then
39553      new_complete="$new_path ${arguments% *}"
39554    else
39555      new_complete="$new_path"
39556    fi
39557
39558    if test "x$complete" != "x$new_complete"; then
39559      OBJDUMP="$new_complete"
39560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39561$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39562    fi
39563  fi
39564
39565  fi
39566
39567
39568  # Restore old path.
39569  PATH="$OLD_PATH"
39570
39571  # Restore the flags to the user specified values.
39572  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39573  CFLAGS="$ORG_CFLAGS"
39574  CXXFLAGS="$ORG_CXXFLAGS"
39575
39576
39577# Finally do some processing after the detection phase
39578
39579  if test "x$COMPILE_TYPE" = "xcross"; then
39580    # Now we need to find a C/C++ compiler that can build executables for the
39581    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39582    # used once. Also, we need to do this without adding a tools dir to the
39583    # path, otherwise we might pick up cross-compilers which don't use standard
39584    # naming.
39585
39586    # FIXME: we should list the discovered compilers as an exclude pattern!
39587    # If we do that, we can do this detection before POST_DETECTION, and still
39588    # find the build compilers in the tools dir, if needed.
39589
39590
39591  # Publish this variable in the help.
39592
39593
39594  if test "x$BUILD_CC" = x; then
39595    # The variable is not set by user, try to locate tool using the code snippet
39596    for ac_prog in cl cc gcc
39597do
39598  # Extract the first word of "$ac_prog", so it can be a program name with args.
39599set dummy $ac_prog; ac_word=$2
39600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39601$as_echo_n "checking for $ac_word... " >&6; }
39602if ${ac_cv_path_BUILD_CC+:} false; then :
39603  $as_echo_n "(cached) " >&6
39604else
39605  case $BUILD_CC in
39606  [\\/]* | ?:[\\/]*)
39607  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39608  ;;
39609  *)
39610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39611for as_dir in $PATH
39612do
39613  IFS=$as_save_IFS
39614  test -z "$as_dir" && as_dir=.
39615    for ac_exec_ext in '' $ac_executable_extensions; do
39616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39617    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39619    break 2
39620  fi
39621done
39622  done
39623IFS=$as_save_IFS
39624
39625  ;;
39626esac
39627fi
39628BUILD_CC=$ac_cv_path_BUILD_CC
39629if test -n "$BUILD_CC"; then
39630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39631$as_echo "$BUILD_CC" >&6; }
39632else
39633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39634$as_echo "no" >&6; }
39635fi
39636
39637
39638  test -n "$BUILD_CC" && break
39639done
39640
39641  else
39642    # The variable is set, but is it from the command line or the environment?
39643
39644    # Try to remove the string !BUILD_CC! from our list.
39645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39647      # If it failed, the variable was not from the command line. Ignore it,
39648      # but warn the user (except for BASH, which is always set by the calling BASH).
39649      if test "xBUILD_CC" != xBASH; then
39650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39651$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39652      fi
39653      # Try to locate tool using the code snippet
39654      for ac_prog in cl cc gcc
39655do
39656  # Extract the first word of "$ac_prog", so it can be a program name with args.
39657set dummy $ac_prog; ac_word=$2
39658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39659$as_echo_n "checking for $ac_word... " >&6; }
39660if ${ac_cv_path_BUILD_CC+:} false; then :
39661  $as_echo_n "(cached) " >&6
39662else
39663  case $BUILD_CC in
39664  [\\/]* | ?:[\\/]*)
39665  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39666  ;;
39667  *)
39668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39669for as_dir in $PATH
39670do
39671  IFS=$as_save_IFS
39672  test -z "$as_dir" && as_dir=.
39673    for ac_exec_ext in '' $ac_executable_extensions; do
39674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39675    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39677    break 2
39678  fi
39679done
39680  done
39681IFS=$as_save_IFS
39682
39683  ;;
39684esac
39685fi
39686BUILD_CC=$ac_cv_path_BUILD_CC
39687if test -n "$BUILD_CC"; then
39688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39689$as_echo "$BUILD_CC" >&6; }
39690else
39691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39692$as_echo "no" >&6; }
39693fi
39694
39695
39696  test -n "$BUILD_CC" && break
39697done
39698
39699    else
39700      # If it succeeded, then it was overridden by the user. We will use it
39701      # for the tool.
39702
39703      # First remove it from the list of overridden variables, so we can test
39704      # for unknown variables in the end.
39705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39706
39707      # Check if the provided tool contains a complete path.
39708      tool_specified="$BUILD_CC"
39709      tool_basename="${tool_specified##*/}"
39710      if test "x$tool_basename" = "x$tool_specified"; then
39711        # A command without a complete path is provided, search $PATH.
39712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39713$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39714        # Extract the first word of "$tool_basename", so it can be a program name with args.
39715set dummy $tool_basename; ac_word=$2
39716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39717$as_echo_n "checking for $ac_word... " >&6; }
39718if ${ac_cv_path_BUILD_CC+:} false; then :
39719  $as_echo_n "(cached) " >&6
39720else
39721  case $BUILD_CC in
39722  [\\/]* | ?:[\\/]*)
39723  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39724  ;;
39725  *)
39726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39727for as_dir in $PATH
39728do
39729  IFS=$as_save_IFS
39730  test -z "$as_dir" && as_dir=.
39731    for ac_exec_ext in '' $ac_executable_extensions; do
39732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39733    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39735    break 2
39736  fi
39737done
39738  done
39739IFS=$as_save_IFS
39740
39741  ;;
39742esac
39743fi
39744BUILD_CC=$ac_cv_path_BUILD_CC
39745if test -n "$BUILD_CC"; then
39746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39747$as_echo "$BUILD_CC" >&6; }
39748else
39749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39750$as_echo "no" >&6; }
39751fi
39752
39753
39754        if test "x$BUILD_CC" = x; then
39755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39756        fi
39757      else
39758        # Otherwise we believe it is a complete path. Use it as it is.
39759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39760$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39762$as_echo_n "checking for BUILD_CC... " >&6; }
39763        if test ! -x "$tool_specified"; then
39764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39765$as_echo "not found" >&6; }
39766          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39767        fi
39768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39769$as_echo "$tool_specified" >&6; }
39770      fi
39771    fi
39772  fi
39773
39774
39775
39776  # Only process if variable expands to non-empty
39777
39778  if test "x$BUILD_CC" != x; then
39779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39780
39781  # First separate the path from the arguments. This will split at the first
39782  # space.
39783  complete="$BUILD_CC"
39784  path="${complete%% *}"
39785  tmp="$complete EOL"
39786  arguments="${tmp#* }"
39787
39788  # Input might be given as Windows format, start by converting to
39789  # unix format.
39790  new_path=`$CYGPATH -u "$path"`
39791
39792  # Now try to locate executable using which
39793  new_path=`$WHICH "$new_path" 2> /dev/null`
39794  # bat and cmd files are not always considered executable in cygwin causing which
39795  # to not find them
39796  if test "x$new_path" = x \
39797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39799    new_path=`$CYGPATH -u "$path"`
39800  fi
39801  if test "x$new_path" = x; then
39802    # Oops. Which didn't find the executable.
39803    # The splitting of arguments from the executable at a space might have been incorrect,
39804    # since paths with space are more likely in Windows. Give it another try with the whole
39805    # argument.
39806    path="$complete"
39807    arguments="EOL"
39808    new_path=`$CYGPATH -u "$path"`
39809    new_path=`$WHICH "$new_path" 2> /dev/null`
39810    # bat and cmd files are not always considered executable in cygwin causing which
39811    # to not find them
39812    if test "x$new_path" = x \
39813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39815      new_path=`$CYGPATH -u "$path"`
39816    fi
39817    if test "x$new_path" = x; then
39818      # It's still not found. Now this is an unrecoverable error.
39819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39820$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39821      has_space=`$ECHO "$complete" | $GREP " "`
39822      if test "x$has_space" != x; then
39823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39825      fi
39826      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39827    fi
39828  fi
39829
39830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39833  # "foo.exe" is OK but "foo" is an error.
39834  #
39835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39836  # It is also a way to make sure we got the proper file name for the real test later on.
39837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39838  if test "x$test_shortpath" = x; then
39839    # Short path failed, file does not exist as specified.
39840    # Try adding .exe or .cmd
39841    if test -f "${new_path}.exe"; then
39842      input_to_shortpath="${new_path}.exe"
39843    elif test -f "${new_path}.cmd"; then
39844      input_to_shortpath="${new_path}.cmd"
39845    else
39846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39847$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39850      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39851    fi
39852  else
39853    input_to_shortpath="$new_path"
39854  fi
39855
39856  # Call helper function which possibly converts this using DOS-style short mode.
39857  # If so, the updated path is stored in $new_path.
39858  new_path="$input_to_shortpath"
39859
39860  input_path="$input_to_shortpath"
39861  # Check if we need to convert this using DOS-style short mode. If the path
39862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39863  # take no chances and rewrite it.
39864  # Note: m4 eats our [], so we need to use [ and ] instead.
39865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39866  if test "x$has_forbidden_chars" != x; then
39867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39871      # Going to short mode and back again did indeed matter. Since short mode is
39872      # case insensitive, let's make it lowercase to improve readability.
39873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39874      # Now convert it back to Unix-style (cygpath)
39875      input_path=`$CYGPATH -u "$shortmode_path"`
39876      new_path="$input_path"
39877    fi
39878  fi
39879
39880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39881  if test "x$test_cygdrive_prefix" = x; then
39882    # As a simple fix, exclude /usr/bin since it's not a real path.
39883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39885      # a path prefixed by /cygdrive for fixpath to work.
39886      new_path="$CYGWIN_ROOT_PATH$input_path"
39887    fi
39888  fi
39889
39890  # remove trailing .exe if any
39891  new_path="${new_path/%.exe/}"
39892
39893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39894
39895  # First separate the path from the arguments. This will split at the first
39896  # space.
39897  complete="$BUILD_CC"
39898  path="${complete%% *}"
39899  tmp="$complete EOL"
39900  arguments="${tmp#* }"
39901
39902  # Input might be given as Windows format, start by converting to
39903  # unix format.
39904  new_path="$path"
39905
39906  windows_path="$new_path"
39907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39908    unix_path=`$CYGPATH -u "$windows_path"`
39909    new_path="$unix_path"
39910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39912    new_path="$unix_path"
39913  fi
39914
39915
39916  # Now try to locate executable using which
39917  new_path=`$WHICH "$new_path" 2> /dev/null`
39918
39919  if test "x$new_path" = x; then
39920    # Oops. Which didn't find the executable.
39921    # The splitting of arguments from the executable at a space might have been incorrect,
39922    # since paths with space are more likely in Windows. Give it another try with the whole
39923    # argument.
39924    path="$complete"
39925    arguments="EOL"
39926    new_path="$path"
39927
39928  windows_path="$new_path"
39929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39930    unix_path=`$CYGPATH -u "$windows_path"`
39931    new_path="$unix_path"
39932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39934    new_path="$unix_path"
39935  fi
39936
39937
39938    new_path=`$WHICH "$new_path" 2> /dev/null`
39939    # bat and cmd files are not always considered executable in MSYS causing which
39940    # to not find them
39941    if test "x$new_path" = x \
39942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39944      new_path="$path"
39945
39946  windows_path="$new_path"
39947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39948    unix_path=`$CYGPATH -u "$windows_path"`
39949    new_path="$unix_path"
39950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39952    new_path="$unix_path"
39953  fi
39954
39955    fi
39956
39957    if test "x$new_path" = x; then
39958      # It's still not found. Now this is an unrecoverable error.
39959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39960$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39961      has_space=`$ECHO "$complete" | $GREP " "`
39962      if test "x$has_space" != x; then
39963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39965      fi
39966      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39967    fi
39968  fi
39969
39970  # Now new_path has a complete unix path to the binary
39971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39972    # Keep paths in /bin as-is, but remove trailing .exe if any
39973    new_path="${new_path/%.exe/}"
39974    # Do not save /bin paths to all_fixpath_prefixes!
39975  else
39976    # Not in mixed or Windows style, start by that.
39977    new_path=`cmd //c echo $new_path`
39978
39979  input_path="$new_path"
39980  # Check if we need to convert this using DOS-style short mode. If the path
39981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39982  # take no chances and rewrite it.
39983  # Note: m4 eats our [], so we need to use [ and ] instead.
39984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39985  if test "x$has_forbidden_chars" != x; then
39986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39988  fi
39989
39990    # Output is in $new_path
39991
39992  windows_path="$new_path"
39993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39994    unix_path=`$CYGPATH -u "$windows_path"`
39995    new_path="$unix_path"
39996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39998    new_path="$unix_path"
39999  fi
40000
40001    # remove trailing .exe if any
40002    new_path="${new_path/%.exe/}"
40003
40004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40006  fi
40007
40008    else
40009      # We're on a unix platform. Hooray! :)
40010      # First separate the path from the arguments. This will split at the first
40011      # space.
40012      complete="$BUILD_CC"
40013      path="${complete%% *}"
40014      tmp="$complete EOL"
40015      arguments="${tmp#* }"
40016
40017      # Cannot rely on the command "which" here since it doesn't always work.
40018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40019      if test -z "$is_absolute_path"; then
40020        # Path to executable is not absolute. Find it.
40021        IFS_save="$IFS"
40022        IFS=:
40023        for p in $PATH; do
40024          if test -f "$p/$path" && test -x "$p/$path"; then
40025            new_path="$p/$path"
40026            break
40027          fi
40028        done
40029        IFS="$IFS_save"
40030      else
40031        # This is an absolute path, we can use it without further modifications.
40032        new_path="$path"
40033      fi
40034
40035      if test "x$new_path" = x; then
40036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40037$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40038        has_space=`$ECHO "$complete" | $GREP " "`
40039        if test "x$has_space" != x; then
40040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40042        fi
40043        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40044      fi
40045    fi
40046
40047    # Now join together the path and the arguments once again
40048    if test "x$arguments" != xEOL; then
40049      new_complete="$new_path ${arguments% *}"
40050    else
40051      new_complete="$new_path"
40052    fi
40053
40054    if test "x$complete" != "x$new_complete"; then
40055      BUILD_CC="$new_complete"
40056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40057$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40058    fi
40059  fi
40060
40061
40062
40063  # Publish this variable in the help.
40064
40065
40066  if test "x$BUILD_CXX" = x; then
40067    # The variable is not set by user, try to locate tool using the code snippet
40068    for ac_prog in cl CC g++
40069do
40070  # Extract the first word of "$ac_prog", so it can be a program name with args.
40071set dummy $ac_prog; ac_word=$2
40072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40073$as_echo_n "checking for $ac_word... " >&6; }
40074if ${ac_cv_path_BUILD_CXX+:} false; then :
40075  $as_echo_n "(cached) " >&6
40076else
40077  case $BUILD_CXX in
40078  [\\/]* | ?:[\\/]*)
40079  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40080  ;;
40081  *)
40082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40083for as_dir in $PATH
40084do
40085  IFS=$as_save_IFS
40086  test -z "$as_dir" && as_dir=.
40087    for ac_exec_ext in '' $ac_executable_extensions; do
40088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40089    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40091    break 2
40092  fi
40093done
40094  done
40095IFS=$as_save_IFS
40096
40097  ;;
40098esac
40099fi
40100BUILD_CXX=$ac_cv_path_BUILD_CXX
40101if test -n "$BUILD_CXX"; then
40102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40103$as_echo "$BUILD_CXX" >&6; }
40104else
40105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40106$as_echo "no" >&6; }
40107fi
40108
40109
40110  test -n "$BUILD_CXX" && break
40111done
40112
40113  else
40114    # The variable is set, but is it from the command line or the environment?
40115
40116    # Try to remove the string !BUILD_CXX! from our list.
40117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40119      # If it failed, the variable was not from the command line. Ignore it,
40120      # but warn the user (except for BASH, which is always set by the calling BASH).
40121      if test "xBUILD_CXX" != xBASH; then
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40123$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40124      fi
40125      # Try to locate tool using the code snippet
40126      for ac_prog in cl CC g++
40127do
40128  # Extract the first word of "$ac_prog", so it can be a program name with args.
40129set dummy $ac_prog; ac_word=$2
40130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40131$as_echo_n "checking for $ac_word... " >&6; }
40132if ${ac_cv_path_BUILD_CXX+:} false; then :
40133  $as_echo_n "(cached) " >&6
40134else
40135  case $BUILD_CXX in
40136  [\\/]* | ?:[\\/]*)
40137  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40138  ;;
40139  *)
40140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40141for as_dir in $PATH
40142do
40143  IFS=$as_save_IFS
40144  test -z "$as_dir" && as_dir=.
40145    for ac_exec_ext in '' $ac_executable_extensions; do
40146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40147    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40149    break 2
40150  fi
40151done
40152  done
40153IFS=$as_save_IFS
40154
40155  ;;
40156esac
40157fi
40158BUILD_CXX=$ac_cv_path_BUILD_CXX
40159if test -n "$BUILD_CXX"; then
40160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40161$as_echo "$BUILD_CXX" >&6; }
40162else
40163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40164$as_echo "no" >&6; }
40165fi
40166
40167
40168  test -n "$BUILD_CXX" && break
40169done
40170
40171    else
40172      # If it succeeded, then it was overridden by the user. We will use it
40173      # for the tool.
40174
40175      # First remove it from the list of overridden variables, so we can test
40176      # for unknown variables in the end.
40177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40178
40179      # Check if the provided tool contains a complete path.
40180      tool_specified="$BUILD_CXX"
40181      tool_basename="${tool_specified##*/}"
40182      if test "x$tool_basename" = "x$tool_specified"; then
40183        # A command without a complete path is provided, search $PATH.
40184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40185$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40186        # Extract the first word of "$tool_basename", so it can be a program name with args.
40187set dummy $tool_basename; ac_word=$2
40188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40189$as_echo_n "checking for $ac_word... " >&6; }
40190if ${ac_cv_path_BUILD_CXX+:} false; then :
40191  $as_echo_n "(cached) " >&6
40192else
40193  case $BUILD_CXX in
40194  [\\/]* | ?:[\\/]*)
40195  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40196  ;;
40197  *)
40198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40199for as_dir in $PATH
40200do
40201  IFS=$as_save_IFS
40202  test -z "$as_dir" && as_dir=.
40203    for ac_exec_ext in '' $ac_executable_extensions; do
40204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40205    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40207    break 2
40208  fi
40209done
40210  done
40211IFS=$as_save_IFS
40212
40213  ;;
40214esac
40215fi
40216BUILD_CXX=$ac_cv_path_BUILD_CXX
40217if test -n "$BUILD_CXX"; then
40218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40219$as_echo "$BUILD_CXX" >&6; }
40220else
40221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40222$as_echo "no" >&6; }
40223fi
40224
40225
40226        if test "x$BUILD_CXX" = x; then
40227          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40228        fi
40229      else
40230        # Otherwise we believe it is a complete path. Use it as it is.
40231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40232$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40234$as_echo_n "checking for BUILD_CXX... " >&6; }
40235        if test ! -x "$tool_specified"; then
40236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40237$as_echo "not found" >&6; }
40238          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40239        fi
40240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40241$as_echo "$tool_specified" >&6; }
40242      fi
40243    fi
40244  fi
40245
40246
40247
40248  # Only process if variable expands to non-empty
40249
40250  if test "x$BUILD_CXX" != x; then
40251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40252
40253  # First separate the path from the arguments. This will split at the first
40254  # space.
40255  complete="$BUILD_CXX"
40256  path="${complete%% *}"
40257  tmp="$complete EOL"
40258  arguments="${tmp#* }"
40259
40260  # Input might be given as Windows format, start by converting to
40261  # unix format.
40262  new_path=`$CYGPATH -u "$path"`
40263
40264  # Now try to locate executable using which
40265  new_path=`$WHICH "$new_path" 2> /dev/null`
40266  # bat and cmd files are not always considered executable in cygwin causing which
40267  # to not find them
40268  if test "x$new_path" = x \
40269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40271    new_path=`$CYGPATH -u "$path"`
40272  fi
40273  if test "x$new_path" = x; then
40274    # Oops. Which didn't find the executable.
40275    # The splitting of arguments from the executable at a space might have been incorrect,
40276    # since paths with space are more likely in Windows. Give it another try with the whole
40277    # argument.
40278    path="$complete"
40279    arguments="EOL"
40280    new_path=`$CYGPATH -u "$path"`
40281    new_path=`$WHICH "$new_path" 2> /dev/null`
40282    # bat and cmd files are not always considered executable in cygwin causing which
40283    # to not find them
40284    if test "x$new_path" = x \
40285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40287      new_path=`$CYGPATH -u "$path"`
40288    fi
40289    if test "x$new_path" = x; then
40290      # It's still not found. Now this is an unrecoverable error.
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40292$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40293      has_space=`$ECHO "$complete" | $GREP " "`
40294      if test "x$has_space" != x; then
40295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40297      fi
40298      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40299    fi
40300  fi
40301
40302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40305  # "foo.exe" is OK but "foo" is an error.
40306  #
40307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40308  # It is also a way to make sure we got the proper file name for the real test later on.
40309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40310  if test "x$test_shortpath" = x; then
40311    # Short path failed, file does not exist as specified.
40312    # Try adding .exe or .cmd
40313    if test -f "${new_path}.exe"; then
40314      input_to_shortpath="${new_path}.exe"
40315    elif test -f "${new_path}.cmd"; then
40316      input_to_shortpath="${new_path}.cmd"
40317    else
40318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40319$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40322      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40323    fi
40324  else
40325    input_to_shortpath="$new_path"
40326  fi
40327
40328  # Call helper function which possibly converts this using DOS-style short mode.
40329  # If so, the updated path is stored in $new_path.
40330  new_path="$input_to_shortpath"
40331
40332  input_path="$input_to_shortpath"
40333  # Check if we need to convert this using DOS-style short mode. If the path
40334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40335  # take no chances and rewrite it.
40336  # Note: m4 eats our [], so we need to use [ and ] instead.
40337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40338  if test "x$has_forbidden_chars" != x; then
40339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40343      # Going to short mode and back again did indeed matter. Since short mode is
40344      # case insensitive, let's make it lowercase to improve readability.
40345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40346      # Now convert it back to Unix-style (cygpath)
40347      input_path=`$CYGPATH -u "$shortmode_path"`
40348      new_path="$input_path"
40349    fi
40350  fi
40351
40352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40353  if test "x$test_cygdrive_prefix" = x; then
40354    # As a simple fix, exclude /usr/bin since it's not a real path.
40355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40357      # a path prefixed by /cygdrive for fixpath to work.
40358      new_path="$CYGWIN_ROOT_PATH$input_path"
40359    fi
40360  fi
40361
40362  # remove trailing .exe if any
40363  new_path="${new_path/%.exe/}"
40364
40365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40366
40367  # First separate the path from the arguments. This will split at the first
40368  # space.
40369  complete="$BUILD_CXX"
40370  path="${complete%% *}"
40371  tmp="$complete EOL"
40372  arguments="${tmp#* }"
40373
40374  # Input might be given as Windows format, start by converting to
40375  # unix format.
40376  new_path="$path"
40377
40378  windows_path="$new_path"
40379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40380    unix_path=`$CYGPATH -u "$windows_path"`
40381    new_path="$unix_path"
40382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40384    new_path="$unix_path"
40385  fi
40386
40387
40388  # Now try to locate executable using which
40389  new_path=`$WHICH "$new_path" 2> /dev/null`
40390
40391  if test "x$new_path" = x; then
40392    # Oops. Which didn't find the executable.
40393    # The splitting of arguments from the executable at a space might have been incorrect,
40394    # since paths with space are more likely in Windows. Give it another try with the whole
40395    # argument.
40396    path="$complete"
40397    arguments="EOL"
40398    new_path="$path"
40399
40400  windows_path="$new_path"
40401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40402    unix_path=`$CYGPATH -u "$windows_path"`
40403    new_path="$unix_path"
40404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40406    new_path="$unix_path"
40407  fi
40408
40409
40410    new_path=`$WHICH "$new_path" 2> /dev/null`
40411    # bat and cmd files are not always considered executable in MSYS causing which
40412    # to not find them
40413    if test "x$new_path" = x \
40414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40416      new_path="$path"
40417
40418  windows_path="$new_path"
40419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40420    unix_path=`$CYGPATH -u "$windows_path"`
40421    new_path="$unix_path"
40422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40424    new_path="$unix_path"
40425  fi
40426
40427    fi
40428
40429    if test "x$new_path" = x; then
40430      # It's still not found. Now this is an unrecoverable error.
40431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40432$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40433      has_space=`$ECHO "$complete" | $GREP " "`
40434      if test "x$has_space" != x; then
40435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40437      fi
40438      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40439    fi
40440  fi
40441
40442  # Now new_path has a complete unix path to the binary
40443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40444    # Keep paths in /bin as-is, but remove trailing .exe if any
40445    new_path="${new_path/%.exe/}"
40446    # Do not save /bin paths to all_fixpath_prefixes!
40447  else
40448    # Not in mixed or Windows style, start by that.
40449    new_path=`cmd //c echo $new_path`
40450
40451  input_path="$new_path"
40452  # Check if we need to convert this using DOS-style short mode. If the path
40453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40454  # take no chances and rewrite it.
40455  # Note: m4 eats our [], so we need to use [ and ] instead.
40456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40457  if test "x$has_forbidden_chars" != x; then
40458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40460  fi
40461
40462    # Output is in $new_path
40463
40464  windows_path="$new_path"
40465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40466    unix_path=`$CYGPATH -u "$windows_path"`
40467    new_path="$unix_path"
40468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40470    new_path="$unix_path"
40471  fi
40472
40473    # remove trailing .exe if any
40474    new_path="${new_path/%.exe/}"
40475
40476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40478  fi
40479
40480    else
40481      # We're on a unix platform. Hooray! :)
40482      # First separate the path from the arguments. This will split at the first
40483      # space.
40484      complete="$BUILD_CXX"
40485      path="${complete%% *}"
40486      tmp="$complete EOL"
40487      arguments="${tmp#* }"
40488
40489      # Cannot rely on the command "which" here since it doesn't always work.
40490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40491      if test -z "$is_absolute_path"; then
40492        # Path to executable is not absolute. Find it.
40493        IFS_save="$IFS"
40494        IFS=:
40495        for p in $PATH; do
40496          if test -f "$p/$path" && test -x "$p/$path"; then
40497            new_path="$p/$path"
40498            break
40499          fi
40500        done
40501        IFS="$IFS_save"
40502      else
40503        # This is an absolute path, we can use it without further modifications.
40504        new_path="$path"
40505      fi
40506
40507      if test "x$new_path" = x; then
40508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40509$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40510        has_space=`$ECHO "$complete" | $GREP " "`
40511        if test "x$has_space" != x; then
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40514        fi
40515        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40516      fi
40517    fi
40518
40519    # Now join together the path and the arguments once again
40520    if test "x$arguments" != xEOL; then
40521      new_complete="$new_path ${arguments% *}"
40522    else
40523      new_complete="$new_path"
40524    fi
40525
40526    if test "x$complete" != "x$new_complete"; then
40527      BUILD_CXX="$new_complete"
40528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40529$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40530    fi
40531  fi
40532
40533
40534
40535  # Publish this variable in the help.
40536
40537
40538  if test "x$BUILD_LD" = x; then
40539    # The variable is not set by user, try to locate tool using the code snippet
40540    for ac_prog in ld
40541do
40542  # Extract the first word of "$ac_prog", so it can be a program name with args.
40543set dummy $ac_prog; ac_word=$2
40544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40545$as_echo_n "checking for $ac_word... " >&6; }
40546if ${ac_cv_path_BUILD_LD+:} false; then :
40547  $as_echo_n "(cached) " >&6
40548else
40549  case $BUILD_LD in
40550  [\\/]* | ?:[\\/]*)
40551  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40552  ;;
40553  *)
40554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40555for as_dir in $PATH
40556do
40557  IFS=$as_save_IFS
40558  test -z "$as_dir" && as_dir=.
40559    for ac_exec_ext in '' $ac_executable_extensions; do
40560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40561    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40563    break 2
40564  fi
40565done
40566  done
40567IFS=$as_save_IFS
40568
40569  ;;
40570esac
40571fi
40572BUILD_LD=$ac_cv_path_BUILD_LD
40573if test -n "$BUILD_LD"; then
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40575$as_echo "$BUILD_LD" >&6; }
40576else
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40578$as_echo "no" >&6; }
40579fi
40580
40581
40582  test -n "$BUILD_LD" && break
40583done
40584
40585  else
40586    # The variable is set, but is it from the command line or the environment?
40587
40588    # Try to remove the string !BUILD_LD! from our list.
40589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40591      # If it failed, the variable was not from the command line. Ignore it,
40592      # but warn the user (except for BASH, which is always set by the calling BASH).
40593      if test "xBUILD_LD" != xBASH; then
40594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40595$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40596      fi
40597      # Try to locate tool using the code snippet
40598      for ac_prog in ld
40599do
40600  # Extract the first word of "$ac_prog", so it can be a program name with args.
40601set dummy $ac_prog; ac_word=$2
40602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40603$as_echo_n "checking for $ac_word... " >&6; }
40604if ${ac_cv_path_BUILD_LD+:} false; then :
40605  $as_echo_n "(cached) " >&6
40606else
40607  case $BUILD_LD in
40608  [\\/]* | ?:[\\/]*)
40609  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40610  ;;
40611  *)
40612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40613for as_dir in $PATH
40614do
40615  IFS=$as_save_IFS
40616  test -z "$as_dir" && as_dir=.
40617    for ac_exec_ext in '' $ac_executable_extensions; do
40618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40619    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40621    break 2
40622  fi
40623done
40624  done
40625IFS=$as_save_IFS
40626
40627  ;;
40628esac
40629fi
40630BUILD_LD=$ac_cv_path_BUILD_LD
40631if test -n "$BUILD_LD"; then
40632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40633$as_echo "$BUILD_LD" >&6; }
40634else
40635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40636$as_echo "no" >&6; }
40637fi
40638
40639
40640  test -n "$BUILD_LD" && break
40641done
40642
40643    else
40644      # If it succeeded, then it was overridden by the user. We will use it
40645      # for the tool.
40646
40647      # First remove it from the list of overridden variables, so we can test
40648      # for unknown variables in the end.
40649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40650
40651      # Check if the provided tool contains a complete path.
40652      tool_specified="$BUILD_LD"
40653      tool_basename="${tool_specified##*/}"
40654      if test "x$tool_basename" = "x$tool_specified"; then
40655        # A command without a complete path is provided, search $PATH.
40656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40657$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40658        # Extract the first word of "$tool_basename", so it can be a program name with args.
40659set dummy $tool_basename; ac_word=$2
40660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40661$as_echo_n "checking for $ac_word... " >&6; }
40662if ${ac_cv_path_BUILD_LD+:} false; then :
40663  $as_echo_n "(cached) " >&6
40664else
40665  case $BUILD_LD in
40666  [\\/]* | ?:[\\/]*)
40667  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40668  ;;
40669  *)
40670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40671for as_dir in $PATH
40672do
40673  IFS=$as_save_IFS
40674  test -z "$as_dir" && as_dir=.
40675    for ac_exec_ext in '' $ac_executable_extensions; do
40676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40677    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40679    break 2
40680  fi
40681done
40682  done
40683IFS=$as_save_IFS
40684
40685  ;;
40686esac
40687fi
40688BUILD_LD=$ac_cv_path_BUILD_LD
40689if test -n "$BUILD_LD"; then
40690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40691$as_echo "$BUILD_LD" >&6; }
40692else
40693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40694$as_echo "no" >&6; }
40695fi
40696
40697
40698        if test "x$BUILD_LD" = x; then
40699          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40700        fi
40701      else
40702        # Otherwise we believe it is a complete path. Use it as it is.
40703        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40704$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40706$as_echo_n "checking for BUILD_LD... " >&6; }
40707        if test ! -x "$tool_specified"; then
40708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40709$as_echo "not found" >&6; }
40710          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40711        fi
40712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40713$as_echo "$tool_specified" >&6; }
40714      fi
40715    fi
40716  fi
40717
40718
40719
40720  # Only process if variable expands to non-empty
40721
40722  if test "x$BUILD_LD" != x; then
40723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40724
40725  # First separate the path from the arguments. This will split at the first
40726  # space.
40727  complete="$BUILD_LD"
40728  path="${complete%% *}"
40729  tmp="$complete EOL"
40730  arguments="${tmp#* }"
40731
40732  # Input might be given as Windows format, start by converting to
40733  # unix format.
40734  new_path=`$CYGPATH -u "$path"`
40735
40736  # Now try to locate executable using which
40737  new_path=`$WHICH "$new_path" 2> /dev/null`
40738  # bat and cmd files are not always considered executable in cygwin causing which
40739  # to not find them
40740  if test "x$new_path" = x \
40741      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40742      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40743    new_path=`$CYGPATH -u "$path"`
40744  fi
40745  if test "x$new_path" = x; then
40746    # Oops. Which didn't find the executable.
40747    # The splitting of arguments from the executable at a space might have been incorrect,
40748    # since paths with space are more likely in Windows. Give it another try with the whole
40749    # argument.
40750    path="$complete"
40751    arguments="EOL"
40752    new_path=`$CYGPATH -u "$path"`
40753    new_path=`$WHICH "$new_path" 2> /dev/null`
40754    # bat and cmd files are not always considered executable in cygwin causing which
40755    # to not find them
40756    if test "x$new_path" = x \
40757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40759      new_path=`$CYGPATH -u "$path"`
40760    fi
40761    if test "x$new_path" = x; then
40762      # It's still not found. Now this is an unrecoverable error.
40763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40764$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40765      has_space=`$ECHO "$complete" | $GREP " "`
40766      if test "x$has_space" != x; then
40767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40769      fi
40770      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40771    fi
40772  fi
40773
40774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40777  # "foo.exe" is OK but "foo" is an error.
40778  #
40779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40780  # It is also a way to make sure we got the proper file name for the real test later on.
40781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40782  if test "x$test_shortpath" = x; then
40783    # Short path failed, file does not exist as specified.
40784    # Try adding .exe or .cmd
40785    if test -f "${new_path}.exe"; then
40786      input_to_shortpath="${new_path}.exe"
40787    elif test -f "${new_path}.cmd"; then
40788      input_to_shortpath="${new_path}.cmd"
40789    else
40790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40791$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40794      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40795    fi
40796  else
40797    input_to_shortpath="$new_path"
40798  fi
40799
40800  # Call helper function which possibly converts this using DOS-style short mode.
40801  # If so, the updated path is stored in $new_path.
40802  new_path="$input_to_shortpath"
40803
40804  input_path="$input_to_shortpath"
40805  # Check if we need to convert this using DOS-style short mode. If the path
40806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40807  # take no chances and rewrite it.
40808  # Note: m4 eats our [], so we need to use [ and ] instead.
40809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40810  if test "x$has_forbidden_chars" != x; then
40811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40815      # Going to short mode and back again did indeed matter. Since short mode is
40816      # case insensitive, let's make it lowercase to improve readability.
40817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40818      # Now convert it back to Unix-style (cygpath)
40819      input_path=`$CYGPATH -u "$shortmode_path"`
40820      new_path="$input_path"
40821    fi
40822  fi
40823
40824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40825  if test "x$test_cygdrive_prefix" = x; then
40826    # As a simple fix, exclude /usr/bin since it's not a real path.
40827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40829      # a path prefixed by /cygdrive for fixpath to work.
40830      new_path="$CYGWIN_ROOT_PATH$input_path"
40831    fi
40832  fi
40833
40834  # remove trailing .exe if any
40835  new_path="${new_path/%.exe/}"
40836
40837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40838
40839  # First separate the path from the arguments. This will split at the first
40840  # space.
40841  complete="$BUILD_LD"
40842  path="${complete%% *}"
40843  tmp="$complete EOL"
40844  arguments="${tmp#* }"
40845
40846  # Input might be given as Windows format, start by converting to
40847  # unix format.
40848  new_path="$path"
40849
40850  windows_path="$new_path"
40851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40852    unix_path=`$CYGPATH -u "$windows_path"`
40853    new_path="$unix_path"
40854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40856    new_path="$unix_path"
40857  fi
40858
40859
40860  # Now try to locate executable using which
40861  new_path=`$WHICH "$new_path" 2> /dev/null`
40862
40863  if test "x$new_path" = x; then
40864    # Oops. Which didn't find the executable.
40865    # The splitting of arguments from the executable at a space might have been incorrect,
40866    # since paths with space are more likely in Windows. Give it another try with the whole
40867    # argument.
40868    path="$complete"
40869    arguments="EOL"
40870    new_path="$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
40882    new_path=`$WHICH "$new_path" 2> /dev/null`
40883    # bat and cmd files are not always considered executable in MSYS causing which
40884    # to not find them
40885    if test "x$new_path" = x \
40886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40888      new_path="$path"
40889
40890  windows_path="$new_path"
40891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40892    unix_path=`$CYGPATH -u "$windows_path"`
40893    new_path="$unix_path"
40894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40896    new_path="$unix_path"
40897  fi
40898
40899    fi
40900
40901    if test "x$new_path" = x; then
40902      # It's still not found. Now this is an unrecoverable error.
40903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40904$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40905      has_space=`$ECHO "$complete" | $GREP " "`
40906      if test "x$has_space" != x; then
40907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40909      fi
40910      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40911    fi
40912  fi
40913
40914  # Now new_path has a complete unix path to the binary
40915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40916    # Keep paths in /bin as-is, but remove trailing .exe if any
40917    new_path="${new_path/%.exe/}"
40918    # Do not save /bin paths to all_fixpath_prefixes!
40919  else
40920    # Not in mixed or Windows style, start by that.
40921    new_path=`cmd //c echo $new_path`
40922
40923  input_path="$new_path"
40924  # Check if we need to convert this using DOS-style short mode. If the path
40925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40926  # take no chances and rewrite it.
40927  # Note: m4 eats our [], so we need to use [ and ] instead.
40928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40929  if test "x$has_forbidden_chars" != x; then
40930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40932  fi
40933
40934    # Output is in $new_path
40935
40936  windows_path="$new_path"
40937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40938    unix_path=`$CYGPATH -u "$windows_path"`
40939    new_path="$unix_path"
40940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40942    new_path="$unix_path"
40943  fi
40944
40945    # remove trailing .exe if any
40946    new_path="${new_path/%.exe/}"
40947
40948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40950  fi
40951
40952    else
40953      # We're on a unix platform. Hooray! :)
40954      # First separate the path from the arguments. This will split at the first
40955      # space.
40956      complete="$BUILD_LD"
40957      path="${complete%% *}"
40958      tmp="$complete EOL"
40959      arguments="${tmp#* }"
40960
40961      # Cannot rely on the command "which" here since it doesn't always work.
40962      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40963      if test -z "$is_absolute_path"; then
40964        # Path to executable is not absolute. Find it.
40965        IFS_save="$IFS"
40966        IFS=:
40967        for p in $PATH; do
40968          if test -f "$p/$path" && test -x "$p/$path"; then
40969            new_path="$p/$path"
40970            break
40971          fi
40972        done
40973        IFS="$IFS_save"
40974      else
40975        # This is an absolute path, we can use it without further modifications.
40976        new_path="$path"
40977      fi
40978
40979      if test "x$new_path" = x; then
40980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40981$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40982        has_space=`$ECHO "$complete" | $GREP " "`
40983        if test "x$has_space" != x; then
40984          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40986        fi
40987        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40988      fi
40989    fi
40990
40991    # Now join together the path and the arguments once again
40992    if test "x$arguments" != xEOL; then
40993      new_complete="$new_path ${arguments% *}"
40994    else
40995      new_complete="$new_path"
40996    fi
40997
40998    if test "x$complete" != "x$new_complete"; then
40999      BUILD_LD="$new_complete"
41000      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
41001$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
41002    fi
41003  fi
41004
41005  else
41006    # If we are not cross compiling, use the normal target compilers for
41007    # building the build platform executables.
41008    BUILD_CC="$CC"
41009    BUILD_CXX="$CXX"
41010    BUILD_LD="$LD"
41011  fi
41012
41013
41014
41015
41016
41017
41018  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41019    # For hotspot, we need these in Windows mixed path,
41020    # so rewrite them all. Need added .exe suffix.
41021    HOTSPOT_CXX="$CXX.exe"
41022    HOTSPOT_LD="$LD.exe"
41023    HOTSPOT_MT="$MT.exe"
41024    HOTSPOT_RC="$RC.exe"
41025
41026  unix_path="$HOTSPOT_CXX"
41027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41028    windows_path=`$CYGPATH -m "$unix_path"`
41029    HOTSPOT_CXX="$windows_path"
41030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41031    windows_path=`cmd //c echo $unix_path`
41032    HOTSPOT_CXX="$windows_path"
41033  fi
41034
41035
41036  unix_path="$HOTSPOT_LD"
41037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41038    windows_path=`$CYGPATH -m "$unix_path"`
41039    HOTSPOT_LD="$windows_path"
41040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41041    windows_path=`cmd //c echo $unix_path`
41042    HOTSPOT_LD="$windows_path"
41043  fi
41044
41045
41046  unix_path="$HOTSPOT_MT"
41047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41048    windows_path=`$CYGPATH -m "$unix_path"`
41049    HOTSPOT_MT="$windows_path"
41050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41051    windows_path=`cmd //c echo $unix_path`
41052    HOTSPOT_MT="$windows_path"
41053  fi
41054
41055
41056  unix_path="$HOTSPOT_RC"
41057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41058    windows_path=`$CYGPATH -m "$unix_path"`
41059    HOTSPOT_RC="$windows_path"
41060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41061    windows_path=`cmd //c echo $unix_path`
41062    HOTSPOT_RC="$windows_path"
41063  fi
41064
41065
41066
41067  else
41068    HOTSPOT_CXX="$CXX"
41069    HOTSPOT_LD="$LD"
41070  fi
41071
41072
41073
41074  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41075    USE_CLANG=true
41076  fi
41077
41078
41079
41080
41081
41082  # The package path is used only on macosx?
41083  # FIXME: clean this up, and/or move it elsewhere.
41084  PACKAGE_PATH=/opt/local
41085
41086
41087  # Check for extra potential brokenness.
41088  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41089    # On Windows, double-check that we got the right compiler.
41090    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41091    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41092    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41093      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41094        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
41095      fi
41096    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41097      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41098        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41099      fi
41100    fi
41101  fi
41102
41103  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41104    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41105    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41106    # This is later checked when setting flags.
41107
41108    # "-Og" suppported for GCC 4.8 and later
41109    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41110
41111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41112$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41113  supports=yes
41114
41115  saved_cflags="$CFLAGS"
41116  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41117  ac_ext=c
41118ac_cpp='$CPP $CPPFLAGS'
41119ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41120ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41121ac_compiler_gnu=$ac_cv_c_compiler_gnu
41122
41123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41124/* end confdefs.h.  */
41125int i;
41126_ACEOF
41127if ac_fn_c_try_compile "$LINENO"; then :
41128
41129else
41130  supports=no
41131fi
41132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41133  ac_ext=cpp
41134ac_cpp='$CXXCPP $CPPFLAGS'
41135ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41136ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41137ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41138
41139  CFLAGS="$saved_cflags"
41140
41141  saved_cxxflags="$CXXFLAGS"
41142  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41150/* end confdefs.h.  */
41151int i;
41152_ACEOF
41153if ac_fn_cxx_try_compile "$LINENO"; then :
41154
41155else
41156  supports=no
41157fi
41158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41159  ac_ext=cpp
41160ac_cpp='$CXXCPP $CPPFLAGS'
41161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41164
41165  CXXFLAGS="$saved_cxxflags"
41166
41167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41168$as_echo "$supports" >&6; }
41169  if test "x$supports" = "xyes" ; then
41170    HAS_CFLAG_OPTIMIZE_DEBUG=true
41171  else
41172    HAS_CFLAG_OPTIMIZE_DEBUG=false
41173  fi
41174
41175
41176    # "-z relro" supported in GNU binutils 2.17 and later
41177    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41178
41179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41180$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41181  supports=yes
41182
41183  saved_ldflags="$LDFLAGS"
41184  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41185  ac_ext=c
41186ac_cpp='$CPP $CPPFLAGS'
41187ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41188ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41189ac_compiler_gnu=$ac_cv_c_compiler_gnu
41190
41191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41192/* end confdefs.h.  */
41193
41194int
41195main ()
41196{
41197
41198  ;
41199  return 0;
41200}
41201_ACEOF
41202if ac_fn_c_try_link "$LINENO"; then :
41203
41204else
41205  supports=no
41206fi
41207rm -f core conftest.err conftest.$ac_objext \
41208    conftest$ac_exeext conftest.$ac_ext
41209  ac_ext=cpp
41210ac_cpp='$CXXCPP $CPPFLAGS'
41211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41214
41215  LDFLAGS="$saved_ldflags"
41216
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41218$as_echo "$supports" >&6; }
41219  if test "x$supports" = "xyes" ; then
41220    HAS_LINKER_RELRO=true
41221  else
41222    HAS_LINKER_RELRO=false
41223  fi
41224
41225
41226    # "-z now" supported in GNU binutils 2.11 and later
41227    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41228
41229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41230$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41231  supports=yes
41232
41233  saved_ldflags="$LDFLAGS"
41234  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41235  ac_ext=c
41236ac_cpp='$CPP $CPPFLAGS'
41237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41239ac_compiler_gnu=$ac_cv_c_compiler_gnu
41240
41241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41242/* end confdefs.h.  */
41243
41244int
41245main ()
41246{
41247
41248  ;
41249  return 0;
41250}
41251_ACEOF
41252if ac_fn_c_try_link "$LINENO"; then :
41253
41254else
41255  supports=no
41256fi
41257rm -f core conftest.err conftest.$ac_objext \
41258    conftest$ac_exeext conftest.$ac_ext
41259  ac_ext=cpp
41260ac_cpp='$CXXCPP $CPPFLAGS'
41261ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41262ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41263ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41264
41265  LDFLAGS="$saved_ldflags"
41266
41267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41268$as_echo "$supports" >&6; }
41269  if test "x$supports" = "xyes" ; then
41270    HAS_LINKER_NOW=true
41271  else
41272    HAS_LINKER_NOW=false
41273  fi
41274
41275  fi
41276
41277  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41278  # in executable.'
41279  USING_BROKEN_SUSE_LD=no
41280  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41282$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41283    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41284    $ECHO "int main() { }" > main.c
41285    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41287$as_echo "no" >&6; }
41288      USING_BROKEN_SUSE_LD=no
41289    else
41290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41291$as_echo "yes" >&6; }
41292      USING_BROKEN_SUSE_LD=yes
41293    fi
41294    rm -rf version-script.map main.c a.out
41295  fi
41296
41297
41298
41299# Setup the JTReg Regression Test Harness.
41300
41301
41302# Check whether --with-jtreg was given.
41303if test "${with_jtreg+set}" = set; then :
41304  withval=$with_jtreg;
41305else
41306  with_jtreg=no
41307fi
41308
41309
41310  if test "x$with_jtreg" = xno; then
41311    # jtreg disabled
41312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41313$as_echo_n "checking for jtreg... " >&6; }
41314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41315$as_echo "no" >&6; }
41316  else
41317    if test "x$with_jtreg" != xyes; then
41318      # with path specified.
41319      JT_HOME="$with_jtreg"
41320    fi
41321
41322    if test "x$JT_HOME" != x; then
41323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41324$as_echo_n "checking for jtreg... " >&6; }
41325
41326      # use JT_HOME enviroment var.
41327
41328  # Only process if variable expands to non-empty
41329
41330  if test "x$JT_HOME" != x; then
41331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41332
41333  # Input might be given as Windows format, start by converting to
41334  # unix format.
41335  path="$JT_HOME"
41336  new_path=`$CYGPATH -u "$path"`
41337
41338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41341  # "foo.exe" is OK but "foo" is an error.
41342  #
41343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41344  # It is also a way to make sure we got the proper file name for the real test later on.
41345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41346  if test "x$test_shortpath" = x; then
41347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41348$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41349    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41350  fi
41351
41352  # Call helper function which possibly converts this using DOS-style short mode.
41353  # If so, the updated path is stored in $new_path.
41354
41355  input_path="$new_path"
41356  # Check if we need to convert this using DOS-style short mode. If the path
41357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41358  # take no chances and rewrite it.
41359  # Note: m4 eats our [], so we need to use [ and ] instead.
41360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41361  if test "x$has_forbidden_chars" != x; then
41362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41366      # Going to short mode and back again did indeed matter. Since short mode is
41367      # case insensitive, let's make it lowercase to improve readability.
41368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41369      # Now convert it back to Unix-style (cygpath)
41370      input_path=`$CYGPATH -u "$shortmode_path"`
41371      new_path="$input_path"
41372    fi
41373  fi
41374
41375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41376  if test "x$test_cygdrive_prefix" = x; then
41377    # As a simple fix, exclude /usr/bin since it's not a real path.
41378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41380      # a path prefixed by /cygdrive for fixpath to work.
41381      new_path="$CYGWIN_ROOT_PATH$input_path"
41382    fi
41383  fi
41384
41385
41386  if test "x$path" != "x$new_path"; then
41387    JT_HOME="$new_path"
41388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41389$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41390  fi
41391
41392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41393
41394  path="$JT_HOME"
41395  has_colon=`$ECHO $path | $GREP ^.:`
41396  new_path="$path"
41397  if test "x$has_colon" = x; then
41398    # Not in mixed or Windows style, start by that.
41399    new_path=`cmd //c echo $path`
41400  fi
41401
41402
41403  input_path="$new_path"
41404  # Check if we need to convert this using DOS-style short mode. If the path
41405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41406  # take no chances and rewrite it.
41407  # Note: m4 eats our [], so we need to use [ and ] instead.
41408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41409  if test "x$has_forbidden_chars" != x; then
41410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41412  fi
41413
41414
41415  windows_path="$new_path"
41416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41417    unix_path=`$CYGPATH -u "$windows_path"`
41418    new_path="$unix_path"
41419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41421    new_path="$unix_path"
41422  fi
41423
41424  if test "x$path" != "x$new_path"; then
41425    JT_HOME="$new_path"
41426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41427$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41428  fi
41429
41430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41432
41433    else
41434      # We're on a unix platform. Hooray! :)
41435      path="$JT_HOME"
41436      has_space=`$ECHO "$path" | $GREP " "`
41437      if test "x$has_space" != x; then
41438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41439$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41440        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41441      fi
41442
41443      # Use eval to expand a potential ~
41444      eval path="$path"
41445      if test ! -f "$path" && test ! -d "$path"; then
41446        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41447      fi
41448
41449      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41450    fi
41451  fi
41452
41453
41454      # jtreg win32 script works for everybody
41455      JTREGEXE="$JT_HOME/bin/jtreg"
41456
41457      if test ! -f "$JTREGEXE"; then
41458        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41459      fi
41460
41461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41462$as_echo "$JTREGEXE" >&6; }
41463    else
41464      # try to find jtreg on path
41465
41466
41467
41468  # Publish this variable in the help.
41469
41470
41471  if test "x$JTREGEXE" = x; then
41472    # The variable is not set by user, try to locate tool using the code snippet
41473    for ac_prog in jtreg
41474do
41475  # Extract the first word of "$ac_prog", so it can be a program name with args.
41476set dummy $ac_prog; ac_word=$2
41477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41478$as_echo_n "checking for $ac_word... " >&6; }
41479if ${ac_cv_path_JTREGEXE+:} false; then :
41480  $as_echo_n "(cached) " >&6
41481else
41482  case $JTREGEXE in
41483  [\\/]* | ?:[\\/]*)
41484  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41485  ;;
41486  *)
41487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41488for as_dir in $PATH
41489do
41490  IFS=$as_save_IFS
41491  test -z "$as_dir" && as_dir=.
41492    for ac_exec_ext in '' $ac_executable_extensions; do
41493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41494    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41496    break 2
41497  fi
41498done
41499  done
41500IFS=$as_save_IFS
41501
41502  ;;
41503esac
41504fi
41505JTREGEXE=$ac_cv_path_JTREGEXE
41506if test -n "$JTREGEXE"; then
41507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41508$as_echo "$JTREGEXE" >&6; }
41509else
41510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41511$as_echo "no" >&6; }
41512fi
41513
41514
41515  test -n "$JTREGEXE" && break
41516done
41517
41518  else
41519    # The variable is set, but is it from the command line or the environment?
41520
41521    # Try to remove the string !JTREGEXE! from our list.
41522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41524      # If it failed, the variable was not from the command line. Ignore it,
41525      # but warn the user (except for BASH, which is always set by the calling BASH).
41526      if test "xJTREGEXE" != xBASH; then
41527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41528$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41529      fi
41530      # Try to locate tool using the code snippet
41531      for ac_prog in jtreg
41532do
41533  # Extract the first word of "$ac_prog", so it can be a program name with args.
41534set dummy $ac_prog; ac_word=$2
41535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41536$as_echo_n "checking for $ac_word... " >&6; }
41537if ${ac_cv_path_JTREGEXE+:} false; then :
41538  $as_echo_n "(cached) " >&6
41539else
41540  case $JTREGEXE in
41541  [\\/]* | ?:[\\/]*)
41542  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41543  ;;
41544  *)
41545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41546for as_dir in $PATH
41547do
41548  IFS=$as_save_IFS
41549  test -z "$as_dir" && as_dir=.
41550    for ac_exec_ext in '' $ac_executable_extensions; do
41551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41552    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41554    break 2
41555  fi
41556done
41557  done
41558IFS=$as_save_IFS
41559
41560  ;;
41561esac
41562fi
41563JTREGEXE=$ac_cv_path_JTREGEXE
41564if test -n "$JTREGEXE"; then
41565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41566$as_echo "$JTREGEXE" >&6; }
41567else
41568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41569$as_echo "no" >&6; }
41570fi
41571
41572
41573  test -n "$JTREGEXE" && break
41574done
41575
41576    else
41577      # If it succeeded, then it was overridden by the user. We will use it
41578      # for the tool.
41579
41580      # First remove it from the list of overridden variables, so we can test
41581      # for unknown variables in the end.
41582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41583
41584      # Check if the provided tool contains a complete path.
41585      tool_specified="$JTREGEXE"
41586      tool_basename="${tool_specified##*/}"
41587      if test "x$tool_basename" = "x$tool_specified"; then
41588        # A command without a complete path is provided, search $PATH.
41589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41590$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41591        # Extract the first word of "$tool_basename", so it can be a program name with args.
41592set dummy $tool_basename; ac_word=$2
41593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41594$as_echo_n "checking for $ac_word... " >&6; }
41595if ${ac_cv_path_JTREGEXE+:} false; then :
41596  $as_echo_n "(cached) " >&6
41597else
41598  case $JTREGEXE in
41599  [\\/]* | ?:[\\/]*)
41600  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41601  ;;
41602  *)
41603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41604for as_dir in $PATH
41605do
41606  IFS=$as_save_IFS
41607  test -z "$as_dir" && as_dir=.
41608    for ac_exec_ext in '' $ac_executable_extensions; do
41609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41610    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41612    break 2
41613  fi
41614done
41615  done
41616IFS=$as_save_IFS
41617
41618  ;;
41619esac
41620fi
41621JTREGEXE=$ac_cv_path_JTREGEXE
41622if test -n "$JTREGEXE"; then
41623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41624$as_echo "$JTREGEXE" >&6; }
41625else
41626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41627$as_echo "no" >&6; }
41628fi
41629
41630
41631        if test "x$JTREGEXE" = x; then
41632          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41633        fi
41634      else
41635        # Otherwise we believe it is a complete path. Use it as it is.
41636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41637$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41639$as_echo_n "checking for JTREGEXE... " >&6; }
41640        if test ! -x "$tool_specified"; then
41641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41642$as_echo "not found" >&6; }
41643          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41644        fi
41645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41646$as_echo "$tool_specified" >&6; }
41647      fi
41648    fi
41649  fi
41650
41651
41652
41653  if test "x$JTREGEXE" = x; then
41654    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41655  fi
41656
41657
41658      JT_HOME="`$DIRNAME $JTREGEXE`"
41659    fi
41660  fi
41661
41662
41663
41664
41665
41666
41667  # Option used to tell the compiler whether to create 32- or 64-bit executables
41668  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41669    COMPILER_TARGET_BITS_FLAG="-q"
41670  else
41671    COMPILER_TARGET_BITS_FLAG="-m"
41672  fi
41673
41674
41675  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41676  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41677    ARFLAGS="-r"
41678  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41679    ARFLAGS="-X64"
41680  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41681    # lib.exe is used as AR to create static libraries.
41682    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41683  else
41684    ARFLAGS=""
41685  fi
41686
41687
41688  ## Setup strip.
41689  # FIXME: should this really be per platform, or should it be per toolchain type?
41690  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41691  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41692  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41693    STRIPFLAGS="-g"
41694  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41695    STRIPFLAGS="-x"
41696  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41697    STRIPFLAGS="-S"
41698  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41699    STRIPFLAGS="-X32_64"
41700  fi
41701
41702  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41703    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41704  fi
41705
41706
41707  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41708    CC_OUT_OPTION=-Fo
41709    EXE_OUT_OPTION=-out:
41710    LD_OUT_OPTION=-out:
41711    AR_OUT_OPTION=-out:
41712  else
41713    # The option used to specify the target .o,.a or .so file.
41714    # When compiling, how to specify the to be created object file.
41715    CC_OUT_OPTION='-o$(SPACE)'
41716    # When linking, how to specify the to be created executable.
41717    EXE_OUT_OPTION='-o$(SPACE)'
41718    # When linking, how to specify the to be created dynamically linkable library.
41719    LD_OUT_OPTION='-o$(SPACE)'
41720    # When archiving, how to specify the to be create static archive for object files.
41721    AR_OUT_OPTION='rcs$(SPACE)'
41722  fi
41723
41724
41725
41726
41727
41728  # On Windows, we need to set RC flags.
41729  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41730    RC_FLAGS="-nologo -l0x409"
41731    if test "x$VARIANT" = xOPT; then
41732      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41733    fi
41734
41735    # The version variables used to create RC_FLAGS may be overridden
41736    # in a custom configure script, or possibly the command line.
41737    # Let those variables be expanded at make time in spec.gmk.
41738    # The \$ are escaped to the shell, and the $(...) variables
41739    # are evaluated by make.
41740    RC_FLAGS="$RC_FLAGS \
41741        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41742        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41743        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41744        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
41745        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41746        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41747        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41748  fi
41749
41750
41751  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41752    # silence copyright notice and other headers.
41753    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41754  fi
41755
41756  if test "x$SYSROOT" != "x"; then
41757    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41758      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41759        # Solaris Studio does not have a concept of sysroot. Instead we must
41760        # make sure the default include and lib dirs are appended to each
41761        # compile and link command line.
41762        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41763        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41764            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41765            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41766      fi
41767    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41768      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41769      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41770      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41771    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41772      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41773      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41774    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41775      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41776      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41777    fi
41778    # Propagate the sysroot args to hotspot
41779    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41780    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41781    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41782  fi
41783
41784  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41785  # set this here so it doesn't have to be peppered throughout the forest
41786  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41787    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41788    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41789  fi
41790
41791
41792
41793
41794
41795# FIXME: Currently we must test this after toolchain but before flags. Fix!
41796
41797# Now we can test some aspects on the target using configure macros.
41798
41799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41800$as_echo_n "checking for ANSI C header files... " >&6; }
41801if ${ac_cv_header_stdc+:} false; then :
41802  $as_echo_n "(cached) " >&6
41803else
41804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41805/* end confdefs.h.  */
41806#include <stdlib.h>
41807#include <stdarg.h>
41808#include <string.h>
41809#include <float.h>
41810
41811int
41812main ()
41813{
41814
41815  ;
41816  return 0;
41817}
41818_ACEOF
41819if ac_fn_cxx_try_compile "$LINENO"; then :
41820  ac_cv_header_stdc=yes
41821else
41822  ac_cv_header_stdc=no
41823fi
41824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41825
41826if test $ac_cv_header_stdc = yes; then
41827  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41829/* end confdefs.h.  */
41830#include <string.h>
41831
41832_ACEOF
41833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41834  $EGREP "memchr" >/dev/null 2>&1; then :
41835
41836else
41837  ac_cv_header_stdc=no
41838fi
41839rm -f conftest*
41840
41841fi
41842
41843if test $ac_cv_header_stdc = yes; then
41844  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41846/* end confdefs.h.  */
41847#include <stdlib.h>
41848
41849_ACEOF
41850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41851  $EGREP "free" >/dev/null 2>&1; then :
41852
41853else
41854  ac_cv_header_stdc=no
41855fi
41856rm -f conftest*
41857
41858fi
41859
41860if test $ac_cv_header_stdc = yes; then
41861  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41862  if test "$cross_compiling" = yes; then :
41863  :
41864else
41865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41866/* end confdefs.h.  */
41867#include <ctype.h>
41868#include <stdlib.h>
41869#if ((' ' & 0x0FF) == 0x020)
41870# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41871# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41872#else
41873# define ISLOWER(c) \
41874		   (('a' <= (c) && (c) <= 'i') \
41875		     || ('j' <= (c) && (c) <= 'r') \
41876		     || ('s' <= (c) && (c) <= 'z'))
41877# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41878#endif
41879
41880#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41881int
41882main ()
41883{
41884  int i;
41885  for (i = 0; i < 256; i++)
41886    if (XOR (islower (i), ISLOWER (i))
41887	|| toupper (i) != TOUPPER (i))
41888      return 2;
41889  return 0;
41890}
41891_ACEOF
41892if ac_fn_cxx_try_run "$LINENO"; then :
41893
41894else
41895  ac_cv_header_stdc=no
41896fi
41897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41898  conftest.$ac_objext conftest.beam conftest.$ac_ext
41899fi
41900
41901fi
41902fi
41903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41904$as_echo "$ac_cv_header_stdc" >&6; }
41905if test $ac_cv_header_stdc = yes; then
41906
41907$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41908
41909fi
41910
41911# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41912for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41913		  inttypes.h stdint.h unistd.h
41914do :
41915  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41916ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41917"
41918if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41919  cat >>confdefs.h <<_ACEOF
41920#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41921_ACEOF
41922
41923fi
41924
41925done
41926
41927
41928
41929  ###############################################################################
41930  #
41931  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41932  # (The JVM can use 32 or 64 bit Java pointers but that decision
41933  # is made at runtime.)
41934  #
41935
41936  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41937    # Always specify -m flag on Solaris
41938    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41939
41940  # When we add flags to the "official" CFLAGS etc, we need to
41941  # keep track of these additions in ADDED_CFLAGS etc. These
41942  # will later be checked to make sure only controlled additions
41943  # have been made to CFLAGS etc.
41944  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41945  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41946  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41947
41948  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41949  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41950  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41951
41952  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41953  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41954  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41955
41956  elif test "x$COMPILE_TYPE" = xreduced; then
41957    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41958      # Specify -m if running reduced on unix platforms
41959
41960  # When we add flags to the "official" CFLAGS etc, we need to
41961  # keep track of these additions in ADDED_CFLAGS etc. These
41962  # will later be checked to make sure only controlled additions
41963  # have been made to CFLAGS etc.
41964  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41965  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41966  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41967
41968  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41969  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41970  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41971
41972  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41973  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41974  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41975
41976    fi
41977  fi
41978
41979  # Make compilation sanity check
41980  for ac_header in stdio.h
41981do :
41982  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41983if test "x$ac_cv_header_stdio_h" = xyes; then :
41984  cat >>confdefs.h <<_ACEOF
41985#define HAVE_STDIO_H 1
41986_ACEOF
41987
41988else
41989
41990    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41991$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41992    if test "x$COMPILE_TYPE" = xreduced; then
41993      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41994$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41995    elif test "x$COMPILE_TYPE" = xcross; then
41996      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41997$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41998    fi
41999    as_fn_error $? "Cannot continue." "$LINENO" 5
42000
42001fi
42002
42003done
42004
42005
42006  # The cast to long int works around a bug in the HP C Compiler
42007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42009# This bug is HP SR number 8606223364.
42010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42011$as_echo_n "checking size of int *... " >&6; }
42012if ${ac_cv_sizeof_int_p+:} false; then :
42013  $as_echo_n "(cached) " >&6
42014else
42015  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42016
42017else
42018  if test "$ac_cv_type_int_p" = yes; then
42019     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42021as_fn_error 77 "cannot compute sizeof (int *)
42022See \`config.log' for more details" "$LINENO" 5; }
42023   else
42024     ac_cv_sizeof_int_p=0
42025   fi
42026fi
42027
42028fi
42029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42030$as_echo "$ac_cv_sizeof_int_p" >&6; }
42031
42032
42033
42034cat >>confdefs.h <<_ACEOF
42035#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42036_ACEOF
42037
42038
42039
42040  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42041  if test "x$ac_cv_sizeof_int_p" = x; then
42042    # The test failed, lets stick to the assumed value.
42043    { $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
42044$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42045  else
42046    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42047
42048    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42049      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42050      # Let's try to implicitely set the compilers target architecture and retry the test
42051      { $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
42052$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;}
42053      { $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
42054$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;}
42055
42056  # When we add flags to the "official" CFLAGS etc, we need to
42057  # keep track of these additions in ADDED_CFLAGS etc. These
42058  # will later be checked to make sure only controlled additions
42059  # have been made to CFLAGS etc.
42060  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42061  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42062  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42063
42064  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42065  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42066  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42067
42068  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42069  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42070  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42071
42072
42073      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42074      unset ac_cv_sizeof_int_p
42075      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42076      cat >>confdefs.h <<_ACEOF
42077#undef SIZEOF_INT_P
42078_ACEOF
42079
42080      # The cast to long int works around a bug in the HP C Compiler
42081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42083# This bug is HP SR number 8606223364.
42084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42085$as_echo_n "checking size of int *... " >&6; }
42086if ${ac_cv_sizeof_int_p+:} false; then :
42087  $as_echo_n "(cached) " >&6
42088else
42089  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42090
42091else
42092  if test "$ac_cv_type_int_p" = yes; then
42093     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42095as_fn_error 77 "cannot compute sizeof (int *)
42096See \`config.log' for more details" "$LINENO" 5; }
42097   else
42098     ac_cv_sizeof_int_p=0
42099   fi
42100fi
42101
42102fi
42103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42104$as_echo "$ac_cv_sizeof_int_p" >&6; }
42105
42106
42107
42108cat >>confdefs.h <<_ACEOF
42109#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42110_ACEOF
42111
42112
42113
42114      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42115
42116      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42117        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
42118      fi
42119    fi
42120  fi
42121
42122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42123$as_echo_n "checking for target address size... " >&6; }
42124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42125$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42126
42127
42128  ###############################################################################
42129  #
42130  # Is the target little of big endian?
42131  #
42132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42133$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42134if ${ac_cv_c_bigendian+:} false; then :
42135  $as_echo_n "(cached) " >&6
42136else
42137  ac_cv_c_bigendian=unknown
42138    # See if we're dealing with a universal compiler.
42139    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42140/* end confdefs.h.  */
42141#ifndef __APPLE_CC__
42142	       not a universal capable compiler
42143	     #endif
42144	     typedef int dummy;
42145
42146_ACEOF
42147if ac_fn_cxx_try_compile "$LINENO"; then :
42148
42149	# Check for potential -arch flags.  It is not universal unless
42150	# there are at least two -arch flags with different values.
42151	ac_arch=
42152	ac_prev=
42153	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42154	 if test -n "$ac_prev"; then
42155	   case $ac_word in
42156	     i?86 | x86_64 | ppc | ppc64)
42157	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42158		 ac_arch=$ac_word
42159	       else
42160		 ac_cv_c_bigendian=universal
42161		 break
42162	       fi
42163	       ;;
42164	   esac
42165	   ac_prev=
42166	 elif test "x$ac_word" = "x-arch"; then
42167	   ac_prev=arch
42168	 fi
42169       done
42170fi
42171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42172    if test $ac_cv_c_bigendian = unknown; then
42173      # See if sys/param.h defines the BYTE_ORDER macro.
42174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42175/* end confdefs.h.  */
42176#include <sys/types.h>
42177	     #include <sys/param.h>
42178
42179int
42180main ()
42181{
42182#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42183		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42184		     && LITTLE_ENDIAN)
42185	      bogus endian macros
42186	     #endif
42187
42188  ;
42189  return 0;
42190}
42191_ACEOF
42192if ac_fn_cxx_try_compile "$LINENO"; then :
42193  # It does; now see whether it defined to BIG_ENDIAN or not.
42194	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42195/* end confdefs.h.  */
42196#include <sys/types.h>
42197		#include <sys/param.h>
42198
42199int
42200main ()
42201{
42202#if BYTE_ORDER != BIG_ENDIAN
42203		 not big endian
42204		#endif
42205
42206  ;
42207  return 0;
42208}
42209_ACEOF
42210if ac_fn_cxx_try_compile "$LINENO"; then :
42211  ac_cv_c_bigendian=yes
42212else
42213  ac_cv_c_bigendian=no
42214fi
42215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42216fi
42217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42218    fi
42219    if test $ac_cv_c_bigendian = unknown; then
42220      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42221      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42222/* end confdefs.h.  */
42223#include <limits.h>
42224
42225int
42226main ()
42227{
42228#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42229	      bogus endian macros
42230	     #endif
42231
42232  ;
42233  return 0;
42234}
42235_ACEOF
42236if ac_fn_cxx_try_compile "$LINENO"; then :
42237  # It does; now see whether it defined to _BIG_ENDIAN or not.
42238	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42239/* end confdefs.h.  */
42240#include <limits.h>
42241
42242int
42243main ()
42244{
42245#ifndef _BIG_ENDIAN
42246		 not big endian
42247		#endif
42248
42249  ;
42250  return 0;
42251}
42252_ACEOF
42253if ac_fn_cxx_try_compile "$LINENO"; then :
42254  ac_cv_c_bigendian=yes
42255else
42256  ac_cv_c_bigendian=no
42257fi
42258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42259fi
42260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42261    fi
42262    if test $ac_cv_c_bigendian = unknown; then
42263      # Compile a test program.
42264      if test "$cross_compiling" = yes; then :
42265  # Try to guess by grepping values from an object file.
42266	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42267/* end confdefs.h.  */
42268short int ascii_mm[] =
42269		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42270		short int ascii_ii[] =
42271		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42272		int use_ascii (int i) {
42273		  return ascii_mm[i] + ascii_ii[i];
42274		}
42275		short int ebcdic_ii[] =
42276		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42277		short int ebcdic_mm[] =
42278		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42279		int use_ebcdic (int i) {
42280		  return ebcdic_mm[i] + ebcdic_ii[i];
42281		}
42282		extern int foo;
42283
42284int
42285main ()
42286{
42287return use_ascii (foo) == use_ebcdic (foo);
42288  ;
42289  return 0;
42290}
42291_ACEOF
42292if ac_fn_cxx_try_compile "$LINENO"; then :
42293  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42294	      ac_cv_c_bigendian=yes
42295	    fi
42296	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42297	      if test "$ac_cv_c_bigendian" = unknown; then
42298		ac_cv_c_bigendian=no
42299	      else
42300		# finding both strings is unlikely to happen, but who knows?
42301		ac_cv_c_bigendian=unknown
42302	      fi
42303	    fi
42304fi
42305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42306else
42307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42308/* end confdefs.h.  */
42309$ac_includes_default
42310int
42311main ()
42312{
42313
42314	     /* Are we little or big endian?  From Harbison&Steele.  */
42315	     union
42316	     {
42317	       long int l;
42318	       char c[sizeof (long int)];
42319	     } u;
42320	     u.l = 1;
42321	     return u.c[sizeof (long int) - 1] == 1;
42322
42323  ;
42324  return 0;
42325}
42326_ACEOF
42327if ac_fn_cxx_try_run "$LINENO"; then :
42328  ac_cv_c_bigendian=no
42329else
42330  ac_cv_c_bigendian=yes
42331fi
42332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42333  conftest.$ac_objext conftest.beam conftest.$ac_ext
42334fi
42335
42336    fi
42337fi
42338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42339$as_echo "$ac_cv_c_bigendian" >&6; }
42340 case $ac_cv_c_bigendian in #(
42341   yes)
42342     ENDIAN="big";; #(
42343   no)
42344     ENDIAN="little" ;; #(
42345   universal)
42346     ENDIAN="universal_endianness"
42347     ;; #(
42348   *)
42349     ENDIAN="unknown" ;;
42350 esac
42351
42352
42353  if test "x$ENDIAN" = xuniversal_endianness; then
42354    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42355  fi
42356  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42357    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
42358  fi
42359
42360
42361# Configure flags for the tools
42362
42363  ###############################################################################
42364  #
42365  # How to compile shared libraries.
42366  #
42367
42368  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42369    PICFLAG="-fPIC"
42370    C_FLAG_REORDER=''
42371    CXX_FLAG_REORDER=''
42372
42373    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42374      # Linking is different on MacOSX
42375      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42376      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42377      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42378      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42379      SET_SHARED_LIBRARY_MAPFILE=''
42380    else
42381      # Default works for linux, might work on other platforms as well.
42382      SHARED_LIBRARY_FLAGS='-shared'
42383      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42384      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42385      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42386      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42387    fi
42388  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42389    PICFLAG=''
42390    C_FLAG_REORDER=''
42391    CXX_FLAG_REORDER=''
42392
42393    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42394      # Linking is different on MacOSX
42395      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42396      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42397      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42398      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42399      SET_SHARED_LIBRARY_MAPFILE=''
42400    else
42401      # Default works for linux, might work on other platforms as well.
42402      SHARED_LIBRARY_FLAGS='-shared'
42403      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42404      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42405      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42406      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42407    fi
42408  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42409    PICFLAG="-KPIC"
42410    C_FLAG_REORDER='-xF'
42411    CXX_FLAG_REORDER='-xF'
42412    SHARED_LIBRARY_FLAGS="-G"
42413    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42414    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42415    SET_SHARED_LIBRARY_NAME=''
42416    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42417  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42418    PICFLAG="-qpic=large"
42419    C_FLAG_REORDER=''
42420    CXX_FLAG_REORDER=''
42421    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42422    SET_EXECUTABLE_ORIGIN=""
42423    SET_SHARED_LIBRARY_ORIGIN=''
42424    SET_SHARED_LIBRARY_NAME=''
42425    SET_SHARED_LIBRARY_MAPFILE=''
42426  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42427    PICFLAG=""
42428    C_FLAG_REORDER=''
42429    CXX_FLAG_REORDER=''
42430    SHARED_LIBRARY_FLAGS="-LD"
42431    SET_EXECUTABLE_ORIGIN=''
42432    SET_SHARED_LIBRARY_ORIGIN=''
42433    SET_SHARED_LIBRARY_NAME=''
42434    SET_SHARED_LIBRARY_MAPFILE=''
42435  fi
42436
42437
42438
42439
42440
42441
42442
42443
42444  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42445    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42446    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42447    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42448  fi
42449  # The (cross) compiler is now configured, we can now test capabilities
42450  # of the target platform.
42451
42452
42453
42454  ###############################################################################
42455  #
42456  # Setup the opt flags for different compilers
42457  # and different operating systems.
42458  #
42459
42460  # FIXME: this was indirectly the old default, but just inherited.
42461  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42462  #   C_FLAG_DEPS="-MMD -MF"
42463  # fi
42464
42465  # Generate make dependency files
42466  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42467    C_FLAG_DEPS="-MMD -MF"
42468  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42469    C_FLAG_DEPS="-MMD -MF"
42470  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42471    C_FLAG_DEPS="-xMMD -xMF"
42472  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42473    C_FLAG_DEPS="-qmakedep=gcc -MF"
42474  fi
42475  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42476
42477
42478
42479  # Debug symbols
42480  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42481    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42482      # reduce from default "-g2" option to save space
42483      CFLAGS_DEBUG_SYMBOLS="-g1"
42484      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42485    else
42486      CFLAGS_DEBUG_SYMBOLS="-g"
42487      CXXFLAGS_DEBUG_SYMBOLS="-g"
42488    fi
42489  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42490    CFLAGS_DEBUG_SYMBOLS="-g"
42491    CXXFLAGS_DEBUG_SYMBOLS="-g"
42492  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42493    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42494    # FIXME: likely a bug, this disables debug symbols rather than enables them
42495    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42496  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42497    CFLAGS_DEBUG_SYMBOLS="-g"
42498    CXXFLAGS_DEBUG_SYMBOLS="-g"
42499  fi
42500
42501
42502
42503  # bounds, memory and behavior checking options
42504  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42505    case $DEBUG_LEVEL in
42506    release )
42507      # no adjustment
42508      ;;
42509    fastdebug )
42510      # no adjustment
42511      ;;
42512    slowdebug )
42513      # Add runtime stack smashing and undefined behavior checks.
42514      # Not all versions of gcc support -fstack-protector
42515      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42516
42517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42518$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42519  supports=yes
42520
42521  saved_cflags="$CFLAGS"
42522  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42523  ac_ext=c
42524ac_cpp='$CPP $CPPFLAGS'
42525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42527ac_compiler_gnu=$ac_cv_c_compiler_gnu
42528
42529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42530/* end confdefs.h.  */
42531int i;
42532_ACEOF
42533if ac_fn_c_try_compile "$LINENO"; then :
42534
42535else
42536  supports=no
42537fi
42538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42539  ac_ext=cpp
42540ac_cpp='$CXXCPP $CPPFLAGS'
42541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42544
42545  CFLAGS="$saved_cflags"
42546
42547  saved_cxxflags="$CXXFLAGS"
42548  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42549  ac_ext=cpp
42550ac_cpp='$CXXCPP $CPPFLAGS'
42551ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42552ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42553ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42554
42555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42556/* end confdefs.h.  */
42557int i;
42558_ACEOF
42559if ac_fn_cxx_try_compile "$LINENO"; then :
42560
42561else
42562  supports=no
42563fi
42564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42565  ac_ext=cpp
42566ac_cpp='$CXXCPP $CPPFLAGS'
42567ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42568ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42569ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42570
42571  CXXFLAGS="$saved_cxxflags"
42572
42573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42574$as_echo "$supports" >&6; }
42575  if test "x$supports" = "xyes" ; then
42576    :
42577  else
42578    STACK_PROTECTOR_CFLAG=""
42579  fi
42580
42581
42582      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42583      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42584      ;;
42585    esac
42586  fi
42587
42588  # Optimization levels
42589  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42590    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42591
42592    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42593      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42594      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42595      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42596      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42597      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42598      C_O_FLAG_NONE="-xregs=no%frameptr"
42599      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42600      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42601      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42602      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42603      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42604      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42605        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42606        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42607      fi
42608    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42609      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42610      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42611      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42612      C_O_FLAG_DEBUG=""
42613      C_O_FLAG_NONE=""
42614      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42615      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42616      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42617      C_O_FLAG_DEBUG=""
42618      CXX_O_FLAG_NONE=""
42619    fi
42620  else
42621    # The remaining toolchains share opt flags between CC and CXX;
42622    # setup for C and duplicate afterwards.
42623    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42624      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42625        # On MacOSX we optimize for size, something
42626        # we should do for all platforms?
42627        C_O_FLAG_HIGHEST="-Os"
42628        C_O_FLAG_HI="-Os"
42629        C_O_FLAG_NORM="-Os"
42630      else
42631        C_O_FLAG_HIGHEST="-O3"
42632        C_O_FLAG_HI="-O3"
42633        C_O_FLAG_NORM="-O2"
42634      fi
42635      C_O_FLAG_DEBUG="-O0"
42636      C_O_FLAG_NONE="-O0"
42637    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42638      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42639        # On MacOSX we optimize for size, something
42640        # we should do for all platforms?
42641        C_O_FLAG_HIGHEST="-Os"
42642        C_O_FLAG_HI="-Os"
42643        C_O_FLAG_NORM="-Os"
42644      else
42645        C_O_FLAG_HIGHEST="-O3"
42646        C_O_FLAG_HI="-O3"
42647        C_O_FLAG_NORM="-O2"
42648      fi
42649      C_O_FLAG_DEBUG="-O0"
42650      C_O_FLAG_NONE="-O0"
42651    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42652      C_O_FLAG_HIGHEST="-O3"
42653      C_O_FLAG_HI="-O3 -qstrict"
42654      C_O_FLAG_NORM="-O2"
42655      C_O_FLAG_DEBUG="-qnoopt"
42656      C_O_FLAG_NONE="-qnoop"
42657    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42658      C_O_FLAG_HIGHEST="-O2"
42659      C_O_FLAG_HI="-O1"
42660      C_O_FLAG_NORM="-O1"
42661      C_O_FLAG_DEBUG="-Od"
42662      C_O_FLAG_NONE="-Od"
42663    fi
42664    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42665    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42666    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42667    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42668    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42669  fi
42670
42671  # Adjust optimization flags according to debug level.
42672  case $DEBUG_LEVEL in
42673    release )
42674      # no adjustment
42675      ;;
42676    fastdebug )
42677      # Not quite so much optimization
42678      C_O_FLAG_HI="$C_O_FLAG_NORM"
42679      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42680      ;;
42681    slowdebug )
42682      # Disable optimization
42683      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42684      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42685      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42686      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42687      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42688      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42689      ;;
42690  esac
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704  # Special extras...
42705  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42706    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42707      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42708      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42709    fi
42710    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42711    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42712  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42713    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42714    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42715  fi
42716
42717  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42719$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42720  fi
42721
42722  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42723    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42724$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42725  fi
42726
42727  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42728    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42729$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42730  fi
42731
42732
42733# Check whether --with-extra-cflags was given.
42734if test "${with_extra_cflags+set}" = set; then :
42735  withval=$with_extra_cflags;
42736fi
42737
42738
42739
42740# Check whether --with-extra-cxxflags was given.
42741if test "${with_extra_cxxflags+set}" = set; then :
42742  withval=$with_extra_cxxflags;
42743fi
42744
42745
42746
42747# Check whether --with-extra-ldflags was given.
42748if test "${with_extra_ldflags+set}" = set; then :
42749  withval=$with_extra_ldflags;
42750fi
42751
42752
42753  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42754  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42755  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42756
42757  # Hotspot needs these set in their legacy form
42758  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42759  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42760  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42761
42762
42763
42764
42765
42766  ###############################################################################
42767  #
42768  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42769  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42770  #
42771
42772  # Setup compiler/platform specific flags into
42773  #    CFLAGS_JDK    - C Compiler flags
42774  #    CXXFLAGS_JDK  - C++ Compiler flags
42775  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42776  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42777    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42778      # Force compatibility with i586 on 32 bit intel platforms.
42779      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42780    fi
42781    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42782        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42783    case $OPENJDK_TARGET_CPU_ARCH in
42784      arm )
42785        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42786        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42787        ;;
42788      ppc )
42789        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42790        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42791        ;;
42792      * )
42793        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42794        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42795        ;;
42796    esac
42797  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42798    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42799    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42800      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42801    fi
42802
42803    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42804    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42805  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42806    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42807    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42808  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42809    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42810        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42811        -DWIN32_LEAN_AND_MEAN \
42812        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42813        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42814        -DWIN32 -DIAL"
42815    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42816      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42817    else
42818      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42819    fi
42820    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42821    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42822    # studio.
42823    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42824      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42825          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42826    fi
42827  fi
42828
42829  ###############################################################################
42830
42831  # Adjust flags according to debug level.
42832  case $DEBUG_LEVEL in
42833    fastdebug | slowdebug )
42834      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42835      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42836      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42837      ;;
42838    release )
42839      ;;
42840    * )
42841      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42842      ;;
42843  esac
42844
42845  # Setup LP64
42846  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42847
42848  # Set some common defines. These works for all compilers, but assume
42849  # -D is universally accepted.
42850
42851  # Setup endianness
42852  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42853    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42854    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42855    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42856    #   Note: -Dmacro         is the same as    #define macro 1
42857    #         -Dmacro=        is the same as    #define macro
42858    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42859      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42860    else
42861      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42862    fi
42863  else
42864    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42865    # are defined in the system?
42866    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42867      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42868    else
42869      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42870    fi
42871  fi
42872
42873  # Setup target OS define. Use OS target name but in upper case.
42874  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42875  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42876
42877  # Setup target CPU
42878  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42879
42880  # Setup debug/release defines
42881  if test "x$DEBUG_LEVEL" = xrelease; then
42882    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42883    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42884      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42885    fi
42886  else
42887    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42888  fi
42889
42890  # Set some additional per-OS defines.
42891  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42892    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42893  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42894    # FIXME: PPC64 should not be here.
42895    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42896  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42897    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42898  fi
42899
42900  # Additional macosx handling
42901  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42902    # Setting these parameters makes it an error to link to macosx APIs that are
42903    # newer than the given OS version and makes the linked binaries compatible
42904    # even if built on a newer version of the OS.
42905    # The expected format is X.Y.Z
42906    MACOSX_VERSION_MIN=10.7.0
42907
42908
42909    # The macro takes the version with no dots, ex: 1070
42910    # Let the flags variables get resolved in make for easier override on make
42911    # command line.
42912    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42913    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42914  fi
42915
42916  # Setup some hard coded includes
42917  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42918      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42919      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42920      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42921
42922  # The shared libraries are compiled using the picflag.
42923  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42924  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42925
42926  # Executable flags
42927  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42928  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42929
42930
42931
42932
42933
42934
42935  # Flags for compiling test libraries
42936  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42937  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42938
42939  # Flags for compiling test executables
42940  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42941  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42942
42943
42944
42945
42946
42947
42948  # Setup LDFLAGS et al.
42949  #
42950
42951  # Now this is odd. The JDK native libraries have to link against libjvm.so
42952  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42953  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42954  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42955  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42956  # libraries will link to whatever is in memory. Yuck.
42957  #
42958  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42959  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42960    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42961    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42962      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42963    fi
42964    # TODO: make -debug optional "--disable-full-debug-symbols"
42965    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42966  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42967    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42968    # We have previously set HAS_GNU_HASH if this is the case
42969    if test -n "$HAS_GNU_HASH"; then
42970      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42971    fi
42972    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42973      # And since we now know that the linker is gnu, then add -z defs, to forbid
42974      # undefined symbols in object files.
42975      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42976      case $DEBUG_LEVEL in
42977        release )
42978          # tell linker to optimize libraries.
42979          # Should this be supplied to the OSS linker as well?
42980          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42981          ;;
42982        slowdebug )
42983          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42984            # do relocations at load
42985            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42986            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42987          fi
42988          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42989            # mark relocations read only
42990            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42991            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42992          fi
42993          ;;
42994        fastdebug )
42995          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42996            # mark relocations read only
42997            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42998            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42999          fi
43000          ;;
43001        * )
43002          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43003          ;;
43004        esac
43005    fi
43006  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43007    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43008    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43009  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43010    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
43011  fi
43012
43013  # Customize LDFLAGS for executables
43014
43015  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43016
43017  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43018    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43019      LDFLAGS_STACK_SIZE=1048576
43020    else
43021      LDFLAGS_STACK_SIZE=327680
43022    fi
43023    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43024  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43025    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43026  fi
43027
43028  # Customize LDFLAGS for libs
43029  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43030
43031  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43032    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43033    LDFLAGS_JDKLIB_SUFFIX=""
43034  else
43035    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43036        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43037
43038    # On some platforms (mac) the linker warns about non existing -L dirs.
43039    # Add server first if available. Linking aginst client does not always produce the same results.
43040    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43041    # Default to server for other variants.
43042    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43043      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43044    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43045      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43046    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43047      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43048    else
43049      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43050    fi
43051
43052    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43053    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43054      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43055    fi
43056  fi
43057
43058
43059
43060
43061
43062
43063
43064  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
43065  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
43066  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
43067  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
43068
43069
43070
43071
43072
43073
43074
43075  # Some Zero and Shark settings.
43076  # ZERO_ARCHFLAG tells the compiler which mode to build for
43077  case "${OPENJDK_TARGET_CPU}" in
43078    s390)
43079      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43080      ;;
43081    *)
43082      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43083  esac
43084
43085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43086$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43087  supports=yes
43088
43089  saved_cflags="$CFLAGS"
43090  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43091  ac_ext=c
43092ac_cpp='$CPP $CPPFLAGS'
43093ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43094ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43095ac_compiler_gnu=$ac_cv_c_compiler_gnu
43096
43097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43098/* end confdefs.h.  */
43099int i;
43100_ACEOF
43101if ac_fn_c_try_compile "$LINENO"; then :
43102
43103else
43104  supports=no
43105fi
43106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43107  ac_ext=cpp
43108ac_cpp='$CXXCPP $CPPFLAGS'
43109ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43110ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43111ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43112
43113  CFLAGS="$saved_cflags"
43114
43115  saved_cxxflags="$CXXFLAGS"
43116  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43117  ac_ext=cpp
43118ac_cpp='$CXXCPP $CPPFLAGS'
43119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43122
43123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43124/* end confdefs.h.  */
43125int i;
43126_ACEOF
43127if ac_fn_cxx_try_compile "$LINENO"; then :
43128
43129else
43130  supports=no
43131fi
43132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43133  ac_ext=cpp
43134ac_cpp='$CXXCPP $CPPFLAGS'
43135ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43136ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43137ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43138
43139  CXXFLAGS="$saved_cxxflags"
43140
43141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43142$as_echo "$supports" >&6; }
43143  if test "x$supports" = "xyes" ; then
43144    :
43145  else
43146    ZERO_ARCHFLAG=""
43147  fi
43148
43149
43150
43151  # Check that the compiler supports -mX (or -qX on AIX) flags
43152  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43153
43154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43155$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43156  supports=yes
43157
43158  saved_cflags="$CFLAGS"
43159  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43160  ac_ext=c
43161ac_cpp='$CPP $CPPFLAGS'
43162ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43163ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43164ac_compiler_gnu=$ac_cv_c_compiler_gnu
43165
43166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43167/* end confdefs.h.  */
43168int i;
43169_ACEOF
43170if ac_fn_c_try_compile "$LINENO"; then :
43171
43172else
43173  supports=no
43174fi
43175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43176  ac_ext=cpp
43177ac_cpp='$CXXCPP $CPPFLAGS'
43178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43181
43182  CFLAGS="$saved_cflags"
43183
43184  saved_cxxflags="$CXXFLAGS"
43185  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43186  ac_ext=cpp
43187ac_cpp='$CXXCPP $CPPFLAGS'
43188ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43189ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43190ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43191
43192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43193/* end confdefs.h.  */
43194int i;
43195_ACEOF
43196if ac_fn_cxx_try_compile "$LINENO"; then :
43197
43198else
43199  supports=no
43200fi
43201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43202  ac_ext=cpp
43203ac_cpp='$CXXCPP $CPPFLAGS'
43204ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43205ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43206ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43207
43208  CXXFLAGS="$saved_cxxflags"
43209
43210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43211$as_echo "$supports" >&6; }
43212  if test "x$supports" = "xyes" ; then
43213    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43214  else
43215    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43216  fi
43217
43218
43219
43220  # Check whether --enable-warnings-as-errors was given.
43221if test "${enable_warnings_as_errors+set}" = set; then :
43222  enableval=$enable_warnings_as_errors;
43223fi
43224
43225
43226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43227$as_echo_n "checking if native warnings are errors... " >&6; }
43228  if test "x$enable_warnings_as_errors" = "xyes"; then
43229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43230$as_echo "yes (explicitely set)" >&6; }
43231    WARNINGS_AS_ERRORS=true
43232  elif test "x$enable_warnings_as_errors" = "xno"; then
43233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43234$as_echo "no" >&6; }
43235    WARNINGS_AS_ERRORS=false
43236  elif test "x$enable_warnings_as_errors" = "x"; then
43237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43238$as_echo "yes (default)" >&6; }
43239    WARNINGS_AS_ERRORS=true
43240  else
43241    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43242  fi
43243
43244
43245  case "${TOOLCHAIN_TYPE}" in
43246    microsoft)
43247      DISABLE_WARNING_PREFIX="-wd"
43248      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43249      ;;
43250    solstudio)
43251      DISABLE_WARNING_PREFIX="-erroff="
43252      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43253      ;;
43254    gcc)
43255      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43256
43257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43258$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43259  supports=yes
43260
43261  saved_cflags="$CFLAGS"
43262  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43263  ac_ext=c
43264ac_cpp='$CPP $CPPFLAGS'
43265ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43266ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43267ac_compiler_gnu=$ac_cv_c_compiler_gnu
43268
43269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43270/* end confdefs.h.  */
43271int i;
43272_ACEOF
43273if ac_fn_c_try_compile "$LINENO"; then :
43274
43275else
43276  supports=no
43277fi
43278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43279  ac_ext=cpp
43280ac_cpp='$CXXCPP $CPPFLAGS'
43281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43284
43285  CFLAGS="$saved_cflags"
43286
43287  saved_cxxflags="$CXXFLAGS"
43288  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43289  ac_ext=cpp
43290ac_cpp='$CXXCPP $CPPFLAGS'
43291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43294
43295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43296/* end confdefs.h.  */
43297int i;
43298_ACEOF
43299if ac_fn_cxx_try_compile "$LINENO"; then :
43300
43301else
43302  supports=no
43303fi
43304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43305  ac_ext=cpp
43306ac_cpp='$CXXCPP $CPPFLAGS'
43307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43310
43311  CXXFLAGS="$saved_cxxflags"
43312
43313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43314$as_echo "$supports" >&6; }
43315  if test "x$supports" = "xyes" ; then
43316    GCC_CAN_DISABLE_WARNINGS=true
43317  else
43318    GCC_CAN_DISABLE_WARNINGS=false
43319
43320  fi
43321
43322      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43323        DISABLE_WARNING_PREFIX="-Wno-"
43324      else
43325        DISABLE_WARNING_PREFIX=
43326      fi
43327      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43328      ;;
43329    clang)
43330      DISABLE_WARNING_PREFIX="-Wno-"
43331      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43332      ;;
43333  esac
43334
43335
43336
43337
43338# Setup debug symbols (need objcopy from the toolchain for that)
43339
43340  #
43341  # ENABLE_DEBUG_SYMBOLS
43342  # This must be done after the toolchain is setup, since we're looking at objcopy.
43343  #
43344  # Check whether --enable-debug-symbols was given.
43345if test "${enable_debug_symbols+set}" = set; then :
43346  enableval=$enable_debug_symbols;
43347fi
43348
43349
43350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43351$as_echo_n "checking if we should generate debug symbols... " >&6; }
43352
43353  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43354    # explicit enabling of enable-debug-symbols and can't find objcopy
43355    #   this is an error
43356    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43357  fi
43358
43359  if test "x$enable_debug_symbols" = "xyes"; then
43360    ENABLE_DEBUG_SYMBOLS=true
43361  elif test "x$enable_debug_symbols" = "xno"; then
43362    ENABLE_DEBUG_SYMBOLS=false
43363  else
43364    # Default is on if objcopy is found
43365    if test "x$OBJCOPY" != x; then
43366      ENABLE_DEBUG_SYMBOLS=true
43367    # MacOS X and Windows don't use objcopy but default is on for those OSes
43368    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43369      ENABLE_DEBUG_SYMBOLS=true
43370    else
43371      ENABLE_DEBUG_SYMBOLS=false
43372    fi
43373  fi
43374
43375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43376$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43377
43378  #
43379  # ZIP_DEBUGINFO_FILES
43380  #
43381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43382$as_echo_n "checking if we should zip debug-info files... " >&6; }
43383  # Check whether --enable-zip-debug-info was given.
43384if test "${enable_zip_debug_info+set}" = set; then :
43385  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43386else
43387  enable_zip_debug_info="yes"
43388fi
43389
43390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43391$as_echo "${enable_zip_debug_info}" >&6; }
43392
43393  if test "x${enable_zip_debug_info}" = "xno"; then
43394    ZIP_DEBUGINFO_FILES=false
43395  else
43396    ZIP_DEBUGINFO_FILES=true
43397  fi
43398
43399
43400
43401
43402
43403  # Check whether --enable-native-coverage was given.
43404if test "${enable_native_coverage+set}" = set; then :
43405  enableval=$enable_native_coverage;
43406fi
43407
43408  GCOV_ENABLED="false"
43409  if test "x$enable_native_coverage" = "xyes"; then
43410    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43412$as_echo_n "checking if native coverage is enabled... " >&6; }
43413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43414$as_echo "yes" >&6; }
43415      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43416      GCOV_LDFLAGS="-fprofile-arcs"
43417      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43418      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43419      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43420      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43421      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43422      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43423      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43424      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43425      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43426      GCOV_ENABLED="true"
43427    else
43428      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43429    fi
43430  elif test "x$enable_native_coverage" = "xno"; then
43431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43432$as_echo_n "checking if native coverage is enabled... " >&6; }
43433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43434$as_echo "no" >&6; }
43435  elif test "x$enable_native_coverage" != "x"; then
43436    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43437  fi
43438
43439
43440
43441
43442###############################################################################
43443#
43444# Check dependencies for external and internal libraries.
43445#
43446###############################################################################
43447
43448# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43449
43450  # When using cygwin or msys, we need a wrapper binary that renames
43451  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43452  # @files and rewrites these too! This wrapper binary is
43453  # called fixpath.
43454  FIXPATH=
43455  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43457$as_echo_n "checking if fixpath can be created... " >&6; }
43458    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43459    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43460    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43461    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43462      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43463      FIXPATH="$FIXPATH_BIN -c"
43464    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43465      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43466      # @ was chosen as separator to minimize risk of other tools messing around with it
43467      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43468          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43469      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43470      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43471    fi
43472    FIXPATH_SRC_W="$FIXPATH_SRC"
43473    FIXPATH_BIN_W="$FIXPATH_BIN"
43474
43475  unix_path="$FIXPATH_SRC_W"
43476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43477    windows_path=`$CYGPATH -m "$unix_path"`
43478    FIXPATH_SRC_W="$windows_path"
43479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43480    windows_path=`cmd //c echo $unix_path`
43481    FIXPATH_SRC_W="$windows_path"
43482  fi
43483
43484
43485  unix_path="$FIXPATH_BIN_W"
43486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43487    windows_path=`$CYGPATH -m "$unix_path"`
43488    FIXPATH_BIN_W="$windows_path"
43489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43490    windows_path=`cmd //c echo $unix_path`
43491    FIXPATH_BIN_W="$windows_path"
43492  fi
43493
43494    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43495    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43496    cd $FIXPATH_DIR
43497    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43498    cd $CURDIR
43499
43500    if test ! -x $FIXPATH_BIN; then
43501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43502$as_echo "no" >&6; }
43503      cat $FIXPATH_DIR/fixpath1.log
43504      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43505    fi
43506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43507$as_echo "yes" >&6; }
43508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43509$as_echo_n "checking if fixpath.exe works... " >&6; }
43510    cd $FIXPATH_DIR
43511    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43512        > $FIXPATH_DIR/fixpath2.log 2>&1
43513    cd $CURDIR
43514    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43516$as_echo "no" >&6; }
43517      cat $FIXPATH_DIR/fixpath2.log
43518      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43519    fi
43520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43521$as_echo "yes" >&6; }
43522  fi
43523
43524
43525
43526
43527
43528
43529  ###############################################################################
43530  #
43531  # OS specific settings that we never will need to probe.
43532  #
43533  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43535$as_echo_n "checking what is not needed on Linux?... " >&6; }
43536    PULSE_NOT_NEEDED=yes
43537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43538$as_echo "pulse" >&6; }
43539  fi
43540
43541  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43543$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43544    ALSA_NOT_NEEDED=yes
43545    PULSE_NOT_NEEDED=yes
43546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43547$as_echo "alsa pulse" >&6; }
43548  fi
43549
43550  if test "x$OPENJDK_TARGET_OS" = xaix; then
43551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43552$as_echo_n "checking what is not needed on AIX?... " >&6; }
43553    ALSA_NOT_NEEDED=yes
43554    PULSE_NOT_NEEDED=yes
43555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43556$as_echo "alsa pulse" >&6; }
43557  fi
43558
43559
43560  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43562$as_echo_n "checking what is not needed on Windows?... " >&6; }
43563    CUPS_NOT_NEEDED=yes
43564    ALSA_NOT_NEEDED=yes
43565    PULSE_NOT_NEEDED=yes
43566    X11_NOT_NEEDED=yes
43567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43568$as_echo "alsa cups pulse x11" >&6; }
43569  fi
43570
43571  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43573$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43574    ALSA_NOT_NEEDED=yes
43575    PULSE_NOT_NEEDED=yes
43576    X11_NOT_NEEDED=yes
43577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43578$as_echo "alsa pulse x11" >&6; }
43579  fi
43580
43581  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43583$as_echo_n "checking what is not needed on bsd?... " >&6; }
43584    ALSA_NOT_NEEDED=yes
43585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43586$as_echo "alsa" >&6; }
43587  fi
43588
43589  if test "x$OPENJDK" = "xfalse"; then
43590    FREETYPE_NOT_NEEDED=yes
43591  fi
43592
43593  if test "x$SUPPORT_HEADFUL" = xno; then
43594    X11_NOT_NEEDED=yes
43595  fi
43596
43597
43598
43599  ###############################################################################
43600  #
43601  # Check for X Windows
43602  #
43603
43604  if test "x$X11_NOT_NEEDED" = xyes; then
43605    if test "x${with_x}" != x; then
43606      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43607$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43608    fi
43609    X_CFLAGS=
43610    X_LIBS=
43611  else
43612    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43613    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43614    # --x-libraries for the sysroot, if that seems to be correct.
43615    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43616      if test "x$SYSROOT" != "x"; then
43617        if test "x$x_includes" = xNONE; then
43618          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43619            x_includes="$SYSROOT/usr/X11R6/include"
43620          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43621            x_includes="$SYSROOT/usr/include"
43622          fi
43623        fi
43624        if test "x$x_libraries" = xNONE; then
43625          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43626            x_libraries="$SYSROOT/usr/X11R6/lib"
43627          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43628            x_libraries="$SYSROOT/usr/lib64"
43629          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43630            x_libraries="$SYSROOT/usr/lib"
43631          fi
43632        fi
43633      fi
43634    fi
43635
43636    # Now let autoconf do it's magic
43637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43638$as_echo_n "checking for X... " >&6; }
43639
43640
43641# Check whether --with-x was given.
43642if test "${with_x+set}" = set; then :
43643  withval=$with_x;
43644fi
43645
43646# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43647if test "x$with_x" = xno; then
43648  # The user explicitly disabled X.
43649  have_x=disabled
43650else
43651  case $x_includes,$x_libraries in #(
43652    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43653    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43654  $as_echo_n "(cached) " >&6
43655else
43656  # One or both of the vars are not set, and there is no cached value.
43657ac_x_includes=no ac_x_libraries=no
43658rm -f -r conftest.dir
43659if mkdir conftest.dir; then
43660  cd conftest.dir
43661  cat >Imakefile <<'_ACEOF'
43662incroot:
43663	@echo incroot='${INCROOT}'
43664usrlibdir:
43665	@echo usrlibdir='${USRLIBDIR}'
43666libdir:
43667	@echo libdir='${LIBDIR}'
43668_ACEOF
43669  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43670    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43671    for ac_var in incroot usrlibdir libdir; do
43672      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43673    done
43674    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43675    for ac_extension in a so sl dylib la dll; do
43676      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43677	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43678	ac_im_usrlibdir=$ac_im_libdir; break
43679      fi
43680    done
43681    # Screen out bogus values from the imake configuration.  They are
43682    # bogus both because they are the default anyway, and because
43683    # using them would break gcc on systems where it needs fixed includes.
43684    case $ac_im_incroot in
43685	/usr/include) ac_x_includes= ;;
43686	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43687    esac
43688    case $ac_im_usrlibdir in
43689	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43690	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43691    esac
43692  fi
43693  cd ..
43694  rm -f -r conftest.dir
43695fi
43696
43697# Standard set of common directories for X headers.
43698# Check X11 before X11Rn because it is often a symlink to the current release.
43699ac_x_header_dirs='
43700/usr/X11/include
43701/usr/X11R7/include
43702/usr/X11R6/include
43703/usr/X11R5/include
43704/usr/X11R4/include
43705
43706/usr/include/X11
43707/usr/include/X11R7
43708/usr/include/X11R6
43709/usr/include/X11R5
43710/usr/include/X11R4
43711
43712/usr/local/X11/include
43713/usr/local/X11R7/include
43714/usr/local/X11R6/include
43715/usr/local/X11R5/include
43716/usr/local/X11R4/include
43717
43718/usr/local/include/X11
43719/usr/local/include/X11R7
43720/usr/local/include/X11R6
43721/usr/local/include/X11R5
43722/usr/local/include/X11R4
43723
43724/usr/X386/include
43725/usr/x386/include
43726/usr/XFree86/include/X11
43727
43728/usr/include
43729/usr/local/include
43730/usr/unsupported/include
43731/usr/athena/include
43732/usr/local/x11r5/include
43733/usr/lpp/Xamples/include
43734
43735/usr/openwin/include
43736/usr/openwin/share/include'
43737
43738if test "$ac_x_includes" = no; then
43739  # Guess where to find include files, by looking for Xlib.h.
43740  # First, try using that file with no special directory specified.
43741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43742/* end confdefs.h.  */
43743#include <X11/Xlib.h>
43744_ACEOF
43745if ac_fn_cxx_try_cpp "$LINENO"; then :
43746  # We can compile using X headers with no special include directory.
43747ac_x_includes=
43748else
43749  for ac_dir in $ac_x_header_dirs; do
43750  if test -r "$ac_dir/X11/Xlib.h"; then
43751    ac_x_includes=$ac_dir
43752    break
43753  fi
43754done
43755fi
43756rm -f conftest.err conftest.i conftest.$ac_ext
43757fi # $ac_x_includes = no
43758
43759if test "$ac_x_libraries" = no; then
43760  # Check for the libraries.
43761  # See if we find them without any special options.
43762  # Don't add to $LIBS permanently.
43763  ac_save_LIBS=$LIBS
43764  LIBS="-lX11 $LIBS"
43765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43766/* end confdefs.h.  */
43767#include <X11/Xlib.h>
43768int
43769main ()
43770{
43771XrmInitialize ()
43772  ;
43773  return 0;
43774}
43775_ACEOF
43776if ac_fn_cxx_try_link "$LINENO"; then :
43777  LIBS=$ac_save_LIBS
43778# We can link X programs with no special library path.
43779ac_x_libraries=
43780else
43781  LIBS=$ac_save_LIBS
43782for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43783do
43784  # Don't even attempt the hair of trying to link an X program!
43785  for ac_extension in a so sl dylib la dll; do
43786    if test -r "$ac_dir/libX11.$ac_extension"; then
43787      ac_x_libraries=$ac_dir
43788      break 2
43789    fi
43790  done
43791done
43792fi
43793rm -f core conftest.err conftest.$ac_objext \
43794    conftest$ac_exeext conftest.$ac_ext
43795fi # $ac_x_libraries = no
43796
43797case $ac_x_includes,$ac_x_libraries in #(
43798  no,* | *,no | *\'*)
43799    # Didn't find X, or a directory has "'" in its name.
43800    ac_cv_have_x="have_x=no";; #(
43801  *)
43802    # Record where we found X for the cache.
43803    ac_cv_have_x="have_x=yes\
43804	ac_x_includes='$ac_x_includes'\
43805	ac_x_libraries='$ac_x_libraries'"
43806esac
43807fi
43808;; #(
43809    *) have_x=yes;;
43810  esac
43811  eval "$ac_cv_have_x"
43812fi # $with_x != no
43813
43814if test "$have_x" != yes; then
43815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43816$as_echo "$have_x" >&6; }
43817  no_x=yes
43818else
43819  # If each of the values was on the command line, it overrides each guess.
43820  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43821  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43822  # Update the cache value to reflect the command line values.
43823  ac_cv_have_x="have_x=yes\
43824	ac_x_includes='$x_includes'\
43825	ac_x_libraries='$x_libraries'"
43826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43827$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43828fi
43829
43830    if test "$no_x" = yes; then
43831  # Not all programs may use this symbol, but it does not hurt to define it.
43832
43833$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43834
43835  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43836else
43837  if test -n "$x_includes"; then
43838    X_CFLAGS="$X_CFLAGS -I$x_includes"
43839  fi
43840
43841  # It would also be nice to do this for all -L options, not just this one.
43842  if test -n "$x_libraries"; then
43843    X_LIBS="$X_LIBS -L$x_libraries"
43844    # For Solaris; some versions of Sun CC require a space after -R and
43845    # others require no space.  Words are not sufficient . . . .
43846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43847$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43848    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43849    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43850    ac_cxx_werror_flag=yes
43851    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43852/* end confdefs.h.  */
43853
43854int
43855main ()
43856{
43857
43858  ;
43859  return 0;
43860}
43861_ACEOF
43862if ac_fn_cxx_try_link "$LINENO"; then :
43863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43864$as_echo "no" >&6; }
43865       X_LIBS="$X_LIBS -R$x_libraries"
43866else
43867  LIBS="$ac_xsave_LIBS -R $x_libraries"
43868       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43869/* end confdefs.h.  */
43870
43871int
43872main ()
43873{
43874
43875  ;
43876  return 0;
43877}
43878_ACEOF
43879if ac_fn_cxx_try_link "$LINENO"; then :
43880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43881$as_echo "yes" >&6; }
43882	  X_LIBS="$X_LIBS -R $x_libraries"
43883else
43884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43885$as_echo "neither works" >&6; }
43886fi
43887rm -f core conftest.err conftest.$ac_objext \
43888    conftest$ac_exeext conftest.$ac_ext
43889fi
43890rm -f core conftest.err conftest.$ac_objext \
43891    conftest$ac_exeext conftest.$ac_ext
43892    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43893    LIBS=$ac_xsave_LIBS
43894  fi
43895
43896  # Check for system-dependent libraries X programs must link with.
43897  # Do this before checking for the system-independent R6 libraries
43898  # (-lICE), since we may need -lsocket or whatever for X linking.
43899
43900  if test "$ISC" = yes; then
43901    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43902  else
43903    # Martyn Johnson says this is needed for Ultrix, if the X
43904    # libraries were built with DECnet support.  And Karl Berry says
43905    # the Alpha needs dnet_stub (dnet does not exist).
43906    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43907    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43908/* end confdefs.h.  */
43909
43910/* Override any GCC internal prototype to avoid an error.
43911   Use char because int might match the return type of a GCC
43912   builtin and then its argument prototype would still apply.  */
43913#ifdef __cplusplus
43914extern "C"
43915#endif
43916char XOpenDisplay ();
43917int
43918main ()
43919{
43920return XOpenDisplay ();
43921  ;
43922  return 0;
43923}
43924_ACEOF
43925if ac_fn_cxx_try_link "$LINENO"; then :
43926
43927else
43928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43929$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43930if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43931  $as_echo_n "(cached) " >&6
43932else
43933  ac_check_lib_save_LIBS=$LIBS
43934LIBS="-ldnet  $LIBS"
43935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43936/* end confdefs.h.  */
43937
43938/* Override any GCC internal prototype to avoid an error.
43939   Use char because int might match the return type of a GCC
43940   builtin and then its argument prototype would still apply.  */
43941#ifdef __cplusplus
43942extern "C"
43943#endif
43944char dnet_ntoa ();
43945int
43946main ()
43947{
43948return dnet_ntoa ();
43949  ;
43950  return 0;
43951}
43952_ACEOF
43953if ac_fn_cxx_try_link "$LINENO"; then :
43954  ac_cv_lib_dnet_dnet_ntoa=yes
43955else
43956  ac_cv_lib_dnet_dnet_ntoa=no
43957fi
43958rm -f core conftest.err conftest.$ac_objext \
43959    conftest$ac_exeext conftest.$ac_ext
43960LIBS=$ac_check_lib_save_LIBS
43961fi
43962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43963$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43964if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43965  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43966fi
43967
43968    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43970$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43971if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43972  $as_echo_n "(cached) " >&6
43973else
43974  ac_check_lib_save_LIBS=$LIBS
43975LIBS="-ldnet_stub  $LIBS"
43976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43977/* end confdefs.h.  */
43978
43979/* Override any GCC internal prototype to avoid an error.
43980   Use char because int might match the return type of a GCC
43981   builtin and then its argument prototype would still apply.  */
43982#ifdef __cplusplus
43983extern "C"
43984#endif
43985char dnet_ntoa ();
43986int
43987main ()
43988{
43989return dnet_ntoa ();
43990  ;
43991  return 0;
43992}
43993_ACEOF
43994if ac_fn_cxx_try_link "$LINENO"; then :
43995  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43996else
43997  ac_cv_lib_dnet_stub_dnet_ntoa=no
43998fi
43999rm -f core conftest.err conftest.$ac_objext \
44000    conftest$ac_exeext conftest.$ac_ext
44001LIBS=$ac_check_lib_save_LIBS
44002fi
44003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
44004$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
44005if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
44006  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
44007fi
44008
44009    fi
44010fi
44011rm -f core conftest.err conftest.$ac_objext \
44012    conftest$ac_exeext conftest.$ac_ext
44013    LIBS="$ac_xsave_LIBS"
44014
44015    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
44016    # to get the SysV transport functions.
44017    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
44018    # needs -lnsl.
44019    # The nsl library prevents programs from opening the X display
44020    # on Irix 5.2, according to T.E. Dickey.
44021    # The functions gethostbyname, getservbyname, and inet_addr are
44022    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
44023    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
44024if test "x$ac_cv_func_gethostbyname" = xyes; then :
44025
44026fi
44027
44028    if test $ac_cv_func_gethostbyname = no; then
44029      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
44030$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
44031if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
44032  $as_echo_n "(cached) " >&6
44033else
44034  ac_check_lib_save_LIBS=$LIBS
44035LIBS="-lnsl  $LIBS"
44036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44037/* end confdefs.h.  */
44038
44039/* Override any GCC internal prototype to avoid an error.
44040   Use char because int might match the return type of a GCC
44041   builtin and then its argument prototype would still apply.  */
44042#ifdef __cplusplus
44043extern "C"
44044#endif
44045char gethostbyname ();
44046int
44047main ()
44048{
44049return gethostbyname ();
44050  ;
44051  return 0;
44052}
44053_ACEOF
44054if ac_fn_cxx_try_link "$LINENO"; then :
44055  ac_cv_lib_nsl_gethostbyname=yes
44056else
44057  ac_cv_lib_nsl_gethostbyname=no
44058fi
44059rm -f core conftest.err conftest.$ac_objext \
44060    conftest$ac_exeext conftest.$ac_ext
44061LIBS=$ac_check_lib_save_LIBS
44062fi
44063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
44064$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
44065if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
44066  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
44067fi
44068
44069      if test $ac_cv_lib_nsl_gethostbyname = no; then
44070	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
44071$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
44072if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
44073  $as_echo_n "(cached) " >&6
44074else
44075  ac_check_lib_save_LIBS=$LIBS
44076LIBS="-lbsd  $LIBS"
44077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44078/* end confdefs.h.  */
44079
44080/* Override any GCC internal prototype to avoid an error.
44081   Use char because int might match the return type of a GCC
44082   builtin and then its argument prototype would still apply.  */
44083#ifdef __cplusplus
44084extern "C"
44085#endif
44086char gethostbyname ();
44087int
44088main ()
44089{
44090return gethostbyname ();
44091  ;
44092  return 0;
44093}
44094_ACEOF
44095if ac_fn_cxx_try_link "$LINENO"; then :
44096  ac_cv_lib_bsd_gethostbyname=yes
44097else
44098  ac_cv_lib_bsd_gethostbyname=no
44099fi
44100rm -f core conftest.err conftest.$ac_objext \
44101    conftest$ac_exeext conftest.$ac_ext
44102LIBS=$ac_check_lib_save_LIBS
44103fi
44104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
44105$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
44106if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
44107  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
44108fi
44109
44110      fi
44111    fi
44112
44113    # lieder@skyler.mavd.honeywell.com says without -lsocket,
44114    # socket/setsockopt and other routines are undefined under SCO ODT
44115    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
44116    # on later versions), says Simon Leinen: it contains gethostby*
44117    # variants that don't use the name server (or something).  -lsocket
44118    # must be given before -lnsl if both are needed.  We assume that
44119    # if connect needs -lnsl, so does gethostbyname.
44120    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
44121if test "x$ac_cv_func_connect" = xyes; then :
44122
44123fi
44124
44125    if test $ac_cv_func_connect = no; then
44126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
44127$as_echo_n "checking for connect in -lsocket... " >&6; }
44128if ${ac_cv_lib_socket_connect+:} false; then :
44129  $as_echo_n "(cached) " >&6
44130else
44131  ac_check_lib_save_LIBS=$LIBS
44132LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
44133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44134/* end confdefs.h.  */
44135
44136/* Override any GCC internal prototype to avoid an error.
44137   Use char because int might match the return type of a GCC
44138   builtin and then its argument prototype would still apply.  */
44139#ifdef __cplusplus
44140extern "C"
44141#endif
44142char connect ();
44143int
44144main ()
44145{
44146return connect ();
44147  ;
44148  return 0;
44149}
44150_ACEOF
44151if ac_fn_cxx_try_link "$LINENO"; then :
44152  ac_cv_lib_socket_connect=yes
44153else
44154  ac_cv_lib_socket_connect=no
44155fi
44156rm -f core conftest.err conftest.$ac_objext \
44157    conftest$ac_exeext conftest.$ac_ext
44158LIBS=$ac_check_lib_save_LIBS
44159fi
44160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
44161$as_echo "$ac_cv_lib_socket_connect" >&6; }
44162if test "x$ac_cv_lib_socket_connect" = xyes; then :
44163  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
44164fi
44165
44166    fi
44167
44168    # Guillermo Gomez says -lposix is necessary on A/UX.
44169    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
44170if test "x$ac_cv_func_remove" = xyes; then :
44171
44172fi
44173
44174    if test $ac_cv_func_remove = no; then
44175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
44176$as_echo_n "checking for remove in -lposix... " >&6; }
44177if ${ac_cv_lib_posix_remove+:} false; then :
44178  $as_echo_n "(cached) " >&6
44179else
44180  ac_check_lib_save_LIBS=$LIBS
44181LIBS="-lposix  $LIBS"
44182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44183/* end confdefs.h.  */
44184
44185/* Override any GCC internal prototype to avoid an error.
44186   Use char because int might match the return type of a GCC
44187   builtin and then its argument prototype would still apply.  */
44188#ifdef __cplusplus
44189extern "C"
44190#endif
44191char remove ();
44192int
44193main ()
44194{
44195return remove ();
44196  ;
44197  return 0;
44198}
44199_ACEOF
44200if ac_fn_cxx_try_link "$LINENO"; then :
44201  ac_cv_lib_posix_remove=yes
44202else
44203  ac_cv_lib_posix_remove=no
44204fi
44205rm -f core conftest.err conftest.$ac_objext \
44206    conftest$ac_exeext conftest.$ac_ext
44207LIBS=$ac_check_lib_save_LIBS
44208fi
44209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44210$as_echo "$ac_cv_lib_posix_remove" >&6; }
44211if test "x$ac_cv_lib_posix_remove" = xyes; then :
44212  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44213fi
44214
44215    fi
44216
44217    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44218    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44219if test "x$ac_cv_func_shmat" = xyes; then :
44220
44221fi
44222
44223    if test $ac_cv_func_shmat = no; then
44224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44225$as_echo_n "checking for shmat in -lipc... " >&6; }
44226if ${ac_cv_lib_ipc_shmat+:} false; then :
44227  $as_echo_n "(cached) " >&6
44228else
44229  ac_check_lib_save_LIBS=$LIBS
44230LIBS="-lipc  $LIBS"
44231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44232/* end confdefs.h.  */
44233
44234/* Override any GCC internal prototype to avoid an error.
44235   Use char because int might match the return type of a GCC
44236   builtin and then its argument prototype would still apply.  */
44237#ifdef __cplusplus
44238extern "C"
44239#endif
44240char shmat ();
44241int
44242main ()
44243{
44244return shmat ();
44245  ;
44246  return 0;
44247}
44248_ACEOF
44249if ac_fn_cxx_try_link "$LINENO"; then :
44250  ac_cv_lib_ipc_shmat=yes
44251else
44252  ac_cv_lib_ipc_shmat=no
44253fi
44254rm -f core conftest.err conftest.$ac_objext \
44255    conftest$ac_exeext conftest.$ac_ext
44256LIBS=$ac_check_lib_save_LIBS
44257fi
44258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44259$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44260if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44261  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44262fi
44263
44264    fi
44265  fi
44266
44267  # Check for libraries that X11R6 Xt/Xaw programs need.
44268  ac_save_LDFLAGS=$LDFLAGS
44269  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44270  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44271  # check for ICE first), but we must link in the order -lSM -lICE or
44272  # we get undefined symbols.  So assume we have SM if we have ICE.
44273  # These have to be linked with before -lX11, unlike the other
44274  # libraries we check for below, so use a different variable.
44275  # John Interrante, Karl Berry
44276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44277$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44278if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44279  $as_echo_n "(cached) " >&6
44280else
44281  ac_check_lib_save_LIBS=$LIBS
44282LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44284/* end confdefs.h.  */
44285
44286/* Override any GCC internal prototype to avoid an error.
44287   Use char because int might match the return type of a GCC
44288   builtin and then its argument prototype would still apply.  */
44289#ifdef __cplusplus
44290extern "C"
44291#endif
44292char IceConnectionNumber ();
44293int
44294main ()
44295{
44296return IceConnectionNumber ();
44297  ;
44298  return 0;
44299}
44300_ACEOF
44301if ac_fn_cxx_try_link "$LINENO"; then :
44302  ac_cv_lib_ICE_IceConnectionNumber=yes
44303else
44304  ac_cv_lib_ICE_IceConnectionNumber=no
44305fi
44306rm -f core conftest.err conftest.$ac_objext \
44307    conftest$ac_exeext conftest.$ac_ext
44308LIBS=$ac_check_lib_save_LIBS
44309fi
44310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44311$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44312if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44313  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44314fi
44315
44316  LDFLAGS=$ac_save_LDFLAGS
44317
44318fi
44319
44320
44321    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44322    # this doesn't make sense so we remove it.
44323    if test "x$COMPILE_TYPE" = xcross; then
44324      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44325    fi
44326
44327    if test "x$no_x" = xyes; then
44328
44329  # Print a helpful message on how to acquire the necessary build dependency.
44330  # x11 is the help tag: freetype, cups, pulse, alsa etc
44331  MISSING_DEPENDENCY=x11
44332
44333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44334    cygwin_help $MISSING_DEPENDENCY
44335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44336    msys_help $MISSING_DEPENDENCY
44337  else
44338    PKGHANDLER_COMMAND=
44339
44340    case $PKGHANDLER in
44341      apt-get)
44342        apt_help     $MISSING_DEPENDENCY ;;
44343      yum)
44344        yum_help     $MISSING_DEPENDENCY ;;
44345      port)
44346        port_help    $MISSING_DEPENDENCY ;;
44347      pkgutil)
44348        pkgutil_help $MISSING_DEPENDENCY ;;
44349      pkgadd)
44350        pkgadd_help  $MISSING_DEPENDENCY ;;
44351    esac
44352
44353    if test "x$PKGHANDLER_COMMAND" != x; then
44354      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44355    fi
44356  fi
44357
44358      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44359    fi
44360
44361    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44362      OPENWIN_HOME="/usr/openwin"
44363      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44364      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44365          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44366          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44367          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44368    fi
44369
44370    ac_ext=c
44371ac_cpp='$CPP $CPPFLAGS'
44372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44374ac_compiler_gnu=$ac_cv_c_compiler_gnu
44375
44376    OLD_CFLAGS="$CFLAGS"
44377    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44378
44379    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44380    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44381do :
44382  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44383ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44384          # include <X11/Xlib.h>
44385          # include <X11/Xutil.h>
44386
44387
44388"
44389if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44390  cat >>confdefs.h <<_ACEOF
44391#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44392_ACEOF
44393 X11_HEADERS_OK=yes
44394else
44395  X11_HEADERS_OK=no; break
44396fi
44397
44398done
44399
44400
44401    if test "x$X11_HEADERS_OK" = xno; then
44402
44403  # Print a helpful message on how to acquire the necessary build dependency.
44404  # x11 is the help tag: freetype, cups, pulse, alsa etc
44405  MISSING_DEPENDENCY=x11
44406
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    cygwin_help $MISSING_DEPENDENCY
44409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44410    msys_help $MISSING_DEPENDENCY
44411  else
44412    PKGHANDLER_COMMAND=
44413
44414    case $PKGHANDLER in
44415      apt-get)
44416        apt_help     $MISSING_DEPENDENCY ;;
44417      yum)
44418        yum_help     $MISSING_DEPENDENCY ;;
44419      port)
44420        port_help    $MISSING_DEPENDENCY ;;
44421      pkgutil)
44422        pkgutil_help $MISSING_DEPENDENCY ;;
44423      pkgadd)
44424        pkgadd_help  $MISSING_DEPENDENCY ;;
44425    esac
44426
44427    if test "x$PKGHANDLER_COMMAND" != x; then
44428      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44429    fi
44430  fi
44431
44432      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44433    fi
44434
44435    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44436    # defined in libawt_xawt.
44437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44438$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44439    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44440/* end confdefs.h.  */
44441#include <X11/extensions/Xrender.h>
44442int
44443main ()
44444{
44445XLinearGradient x;
44446  ;
44447  return 0;
44448}
44449_ACEOF
44450if ac_fn_c_try_compile "$LINENO"; then :
44451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44452$as_echo "yes" >&6; }
44453else
44454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44455$as_echo "no" >&6; }
44456         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44457fi
44458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44459
44460    CFLAGS="$OLD_CFLAGS"
44461    ac_ext=cpp
44462ac_cpp='$CXXCPP $CPPFLAGS'
44463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44466
44467  fi # X11_NOT_NEEDED
44468
44469
44470
44471
44472
44473
44474  ###############################################################################
44475  #
44476  # The common unix printing system cups is used to print from java.
44477  #
44478
44479# Check whether --with-cups was given.
44480if test "${with_cups+set}" = set; then :
44481  withval=$with_cups;
44482fi
44483
44484
44485# Check whether --with-cups-include was given.
44486if test "${with_cups_include+set}" = set; then :
44487  withval=$with_cups_include;
44488fi
44489
44490
44491  if test "x$CUPS_NOT_NEEDED" = xyes; then
44492    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44493      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44494$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44495    fi
44496    CUPS_CFLAGS=
44497  else
44498    CUPS_FOUND=no
44499
44500    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44501      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44502    fi
44503
44504    if test "x${with_cups}" != x; then
44505      CUPS_CFLAGS="-I${with_cups}/include"
44506      CUPS_FOUND=yes
44507    fi
44508    if test "x${with_cups_include}" != x; then
44509      CUPS_CFLAGS="-I${with_cups_include}"
44510      CUPS_FOUND=yes
44511    fi
44512    if test "x$CUPS_FOUND" = xno; then
44513
44514
44515  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44516    # Source the builddeps file again, to make sure it uses the latest variables!
44517    . $builddepsfile
44518    # Look for a target and build machine specific resource!
44519    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44520    if test "x$resource" = x; then
44521      # Ok, lets instead look for a target specific resource
44522      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44523    fi
44524    if test "x$resource" = x; then
44525      # Ok, lets instead look for a build specific resource
44526      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44527    fi
44528    if test "x$resource" = x; then
44529      # Ok, lets instead look for a generic resource
44530      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44531      resource=${builddep_cups}
44532    fi
44533    if test "x$resource" != x; then
44534      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44535$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44536      # If the resource in the builddeps.conf file is an existing directory,
44537      # for example /java/linux/cups
44538      if test -d ${resource}; then
44539        depdir=${resource}
44540      else
44541
44542  # cups is for example mymodule
44543  # $resource is for example libs/general/libmymod_1_2_3.zip
44544  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44545  # $with_builddeps_dir is for example /localhome/builddeps
44546  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44547  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44548  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44549  filename=`basename $resource`
44550  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44551  filebase=${filename%%.*}
44552  extension=${filename#*.}
44553  installdir=$with_builddeps_dir/$filebase
44554  if test ! -f $installdir/$filename.unpacked; then
44555    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44556$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44557    if test ! -d $installdir; then
44558      mkdir -p $installdir
44559    fi
44560    if test ! -d $installdir; then
44561      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44562    fi
44563    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44564    touch $tmpfile
44565    if test ! -f $tmpfile; then
44566      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44567    fi
44568
44569  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44570  # $tmpfile is the local file name for the downloaded file.
44571  VALID_TOOL=no
44572  if test "x$BDEPS_FTP" = xwget; then
44573    VALID_TOOL=yes
44574    wget -O $tmpfile $with_builddeps_server/$resource
44575  fi
44576  if test "x$BDEPS_FTP" = xlftp; then
44577    VALID_TOOL=yes
44578    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44579  fi
44580  if test "x$BDEPS_FTP" = xftp; then
44581    VALID_TOOL=yes
44582    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44583    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44584    FTPUSERPWD=${FTPSERVER%%@*}
44585    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44586      FTPUSER=${userpwd%%:*}
44587      FTPPWD=${userpwd#*@}
44588      FTPSERVER=${FTPSERVER#*@}
44589    else
44590      FTPUSER=ftp
44591      FTPPWD=ftp
44592    fi
44593    # the "pass" command does not work on some
44594    # ftp clients (read ftp.exe) but if it works,
44595    # passive mode is better!
44596    ( \
44597        echo "user $FTPUSER $FTPPWD"        ; \
44598        echo "pass"                         ; \
44599        echo "bin"                          ; \
44600        echo "get $FTPPATH $tmpfile"              ; \
44601    ) | ftp -in $FTPSERVER
44602  fi
44603  if test "x$VALID_TOOL" != xyes; then
44604    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44605  fi
44606
44607    mv $tmpfile $installdir/$filename
44608    if test ! -s $installdir/$filename; then
44609      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44610    fi
44611    case "$extension" in
44612      zip)  echo "Unzipping $installdir/$filename..."
44613        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44614        ;;
44615      tar.gz) echo "Untaring $installdir/$filename..."
44616        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44617        ;;
44618      tgz) echo "Untaring $installdir/$filename..."
44619        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44620        ;;
44621      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44622        ;;
44623    esac
44624  fi
44625  if test -f $installdir/$filename.unpacked; then
44626    depdir=$installdir
44627  fi
44628
44629      fi
44630      # Source the builddeps file again, because in the previous command, the depdir
44631      # was updated to point at the current build dependency install directory.
44632      . $builddepsfile
44633      # Now extract variables from the builddeps.conf files.
44634      theroot=${builddep_cups_ROOT}
44635      thecflags=${builddep_cups_CFLAGS}
44636      thelibs=${builddep_cups_LIBS}
44637      if test "x$depdir" = x; then
44638        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44639      fi
44640      CUPS=$depdir
44641      if test "x$theroot" != x; then
44642        CUPS="$theroot"
44643      fi
44644      if test "x$thecflags" != x; then
44645        CUPS_CFLAGS="$thecflags"
44646      fi
44647      if test "x$thelibs" != x; then
44648        CUPS_LIBS="$thelibs"
44649      fi
44650      CUPS_FOUND=yes
44651
44652    fi
44653
44654  fi
44655
44656    fi
44657    if test "x$CUPS_FOUND" = xno; then
44658      # Are the cups headers installed in the default /usr/include location?
44659      for ac_header in cups/cups.h cups/ppd.h
44660do :
44661  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44662ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44663if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44664  cat >>confdefs.h <<_ACEOF
44665#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44666_ACEOF
44667
44668            CUPS_FOUND=yes
44669            CUPS_CFLAGS=
44670            DEFAULT_CUPS=yes
44671
44672
44673fi
44674
44675done
44676
44677    fi
44678    if test "x$CUPS_FOUND" = xno; then
44679      # Getting nervous now? Lets poke around for standard Solaris third-party
44680      # package installation locations.
44681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44682$as_echo_n "checking for cups headers... " >&6; }
44683      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44684        # An SFW package seems to be installed!
44685        CUPS_FOUND=yes
44686        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44687      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44688        # A CSW package seems to be installed!
44689        CUPS_FOUND=yes
44690        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44691      fi
44692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44693$as_echo "$CUPS_FOUND" >&6; }
44694    fi
44695    if test "x$CUPS_FOUND" = xno; then
44696
44697  # Print a helpful message on how to acquire the necessary build dependency.
44698  # cups is the help tag: freetype, cups, pulse, alsa etc
44699  MISSING_DEPENDENCY=cups
44700
44701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44702    cygwin_help $MISSING_DEPENDENCY
44703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44704    msys_help $MISSING_DEPENDENCY
44705  else
44706    PKGHANDLER_COMMAND=
44707
44708    case $PKGHANDLER in
44709      apt-get)
44710        apt_help     $MISSING_DEPENDENCY ;;
44711      yum)
44712        yum_help     $MISSING_DEPENDENCY ;;
44713      port)
44714        port_help    $MISSING_DEPENDENCY ;;
44715      pkgutil)
44716        pkgutil_help $MISSING_DEPENDENCY ;;
44717      pkgadd)
44718        pkgadd_help  $MISSING_DEPENDENCY ;;
44719    esac
44720
44721    if test "x$PKGHANDLER_COMMAND" != x; then
44722      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44723    fi
44724  fi
44725
44726      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44727    fi
44728  fi
44729
44730
44731
44732
44733
44734
44735  ###############################################################################
44736  #
44737  # The ubiquitous freetype library is used to render fonts.
44738  #
44739
44740# Check whether --with-freetype was given.
44741if test "${with_freetype+set}" = set; then :
44742  withval=$with_freetype;
44743fi
44744
44745
44746# Check whether --with-freetype-include was given.
44747if test "${with_freetype_include+set}" = set; then :
44748  withval=$with_freetype_include;
44749fi
44750
44751
44752# Check whether --with-freetype-lib was given.
44753if test "${with_freetype_lib+set}" = set; then :
44754  withval=$with_freetype_lib;
44755fi
44756
44757
44758# Check whether --with-freetype-src was given.
44759if test "${with_freetype_src+set}" = set; then :
44760  withval=$with_freetype_src;
44761fi
44762
44763  # Check whether --enable-freetype-bundling was given.
44764if test "${enable_freetype_bundling+set}" = set; then :
44765  enableval=$enable_freetype_bundling;
44766fi
44767
44768
44769  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44770  FREETYPE_BASE_NAME=freetype
44771  FREETYPE_CFLAGS=
44772  FREETYPE_LIBS=
44773  FREETYPE_BUNDLE_LIB_PATH=
44774
44775  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44776    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44777      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44778$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44779    fi
44780    if test "x$enable_freetype_bundling" != x; then
44781      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44782$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44783    fi
44784  else
44785    # freetype is needed to build; go get it!
44786
44787    BUNDLE_FREETYPE="$enable_freetype_bundling"
44788
44789    if  test "x$with_freetype_src" != x; then
44790      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44791        # Try to build freetype if --with-freetype-src was given on Windows
44792
44793  FREETYPE_SRC_PATH="$with_freetype_src"
44794  BUILD_FREETYPE=yes
44795
44796  # Check if the freetype sources are acessible..
44797  if ! test -d $FREETYPE_SRC_PATH; then
44798    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44799$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44800    BUILD_FREETYPE=no
44801  fi
44802  # ..and contain a vc2010 project file
44803  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44804  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44805    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44806$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44807    BUILD_FREETYPE=no
44808  fi
44809  # Now check if configure found a version of 'msbuild.exe'
44810  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44811    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44812$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44813    BUILD_FREETYPE=no
44814  fi
44815
44816  # Ready to go..
44817  if test "x$BUILD_FREETYPE" = xyes; then
44818
44819    # msbuild requires trailing slashes for output directories
44820    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44821    freetype_lib_path_unix="$freetype_lib_path"
44822    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44823
44824  unix_path="$vcxproj_path"
44825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44826    windows_path=`$CYGPATH -m "$unix_path"`
44827    vcxproj_path="$windows_path"
44828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44829    windows_path=`cmd //c echo $unix_path`
44830    vcxproj_path="$windows_path"
44831  fi
44832
44833
44834  unix_path="$freetype_lib_path"
44835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44836    windows_path=`$CYGPATH -m "$unix_path"`
44837    freetype_lib_path="$windows_path"
44838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44839    windows_path=`cmd //c echo $unix_path`
44840    freetype_lib_path="$windows_path"
44841  fi
44842
44843
44844  unix_path="$freetype_obj_path"
44845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44846    windows_path=`$CYGPATH -m "$unix_path"`
44847    freetype_obj_path="$windows_path"
44848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44849    windows_path=`cmd //c echo $unix_path`
44850    freetype_obj_path="$windows_path"
44851  fi
44852
44853    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44854      freetype_platform=x64
44855    else
44856      freetype_platform=win32
44857    fi
44858
44859    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44860    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44861    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44862    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44863    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44864$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44865
44866    # First we try to build the freetype.dll
44867    $ECHO -e "@echo off\n"\
44868	     "$MSBUILD $vcxproj_path "\
44869		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44870		       "/p:Configuration=\"Release Multithreaded\" "\
44871		       "/p:Platform=$freetype_platform "\
44872		       "/p:ConfigurationType=DynamicLibrary "\
44873		       "/p:TargetName=freetype "\
44874		       "/p:OutDir=\"$freetype_lib_path\" "\
44875		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44876    cmd /c freetype.bat
44877
44878    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44879      # If that succeeds we also build freetype.lib
44880      $ECHO -e "@echo off\n"\
44881	       "$MSBUILD $vcxproj_path "\
44882			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44883			 "/p:Configuration=\"Release Multithreaded\" "\
44884			 "/p:Platform=$freetype_platform "\
44885			 "/p:ConfigurationType=StaticLibrary "\
44886			 "/p:TargetName=freetype "\
44887			 "/p:OutDir=\"$freetype_lib_path\" "\
44888			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44889      cmd /c freetype.bat
44890
44891      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44892	# Once we build both, lib and dll, set freetype lib and include path appropriately
44893	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44894	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44895	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44896$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44897      else
44898	BUILD_FREETYPE=no
44899      fi
44900    else
44901      BUILD_FREETYPE=no
44902    fi
44903  fi
44904
44905        if test "x$BUILD_FREETYPE" = xyes; then
44906          # Okay, we built it. Check that it works.
44907
44908  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44909  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44910  METHOD="--with-freetype-src"
44911
44912  # Let's start with an optimistic view of the world :-)
44913  FOUND_FREETYPE=yes
44914
44915  # First look for the canonical freetype main include file ft2build.h.
44916  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44917    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44918    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44919    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44920      # Fail.
44921      FOUND_FREETYPE=no
44922    fi
44923  fi
44924
44925  if test "x$FOUND_FREETYPE" = xyes; then
44926    # Include file found, let's continue the sanity check.
44927    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44928$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44929
44930    # Reset to default value
44931    FREETYPE_BASE_NAME=freetype
44932    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44933    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44934      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44935          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44936        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44937        # for the .6 version explicitly.
44938        FREETYPE_BASE_NAME=freetype.6
44939        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44940        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44941$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44942      else
44943        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44944$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44945        FOUND_FREETYPE=no
44946      fi
44947    else
44948      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44949        # On Windows, we will need both .lib and .dll file.
44950        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44951          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44952$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44953          FOUND_FREETYPE=no
44954        fi
44955      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44956          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44957        # Found lib in isa dir, use that instead.
44958        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44959        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44960$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44961      fi
44962    fi
44963  fi
44964
44965  if test "x$FOUND_FREETYPE" = xyes; then
44966
44967  # Only process if variable expands to non-empty
44968
44969  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44970    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44971
44972  # Input might be given as Windows format, start by converting to
44973  # unix format.
44974  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44975  new_path=`$CYGPATH -u "$path"`
44976
44977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44980  # "foo.exe" is OK but "foo" is an error.
44981  #
44982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44983  # It is also a way to make sure we got the proper file name for the real test later on.
44984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44985  if test "x$test_shortpath" = x; then
44986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44988    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44989  fi
44990
44991  # Call helper function which possibly converts this using DOS-style short mode.
44992  # If so, the updated path is stored in $new_path.
44993
44994  input_path="$new_path"
44995  # Check if we need to convert this using DOS-style short mode. If the path
44996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44997  # take no chances and rewrite it.
44998  # Note: m4 eats our [], so we need to use [ and ] instead.
44999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45000  if test "x$has_forbidden_chars" != x; then
45001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45005      # Going to short mode and back again did indeed matter. Since short mode is
45006      # case insensitive, let's make it lowercase to improve readability.
45007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45008      # Now convert it back to Unix-style (cygpath)
45009      input_path=`$CYGPATH -u "$shortmode_path"`
45010      new_path="$input_path"
45011    fi
45012  fi
45013
45014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45015  if test "x$test_cygdrive_prefix" = x; then
45016    # As a simple fix, exclude /usr/bin since it's not a real path.
45017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45019      # a path prefixed by /cygdrive for fixpath to work.
45020      new_path="$CYGWIN_ROOT_PATH$input_path"
45021    fi
45022  fi
45023
45024
45025  if test "x$path" != "x$new_path"; then
45026    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45029  fi
45030
45031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45032
45033  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45034  has_colon=`$ECHO $path | $GREP ^.:`
45035  new_path="$path"
45036  if test "x$has_colon" = x; then
45037    # Not in mixed or Windows style, start by that.
45038    new_path=`cmd //c echo $path`
45039  fi
45040
45041
45042  input_path="$new_path"
45043  # Check if we need to convert this using DOS-style short mode. If the path
45044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45045  # take no chances and rewrite it.
45046  # Note: m4 eats our [], so we need to use [ and ] instead.
45047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45048  if test "x$has_forbidden_chars" != x; then
45049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45051  fi
45052
45053
45054  windows_path="$new_path"
45055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45056    unix_path=`$CYGPATH -u "$windows_path"`
45057    new_path="$unix_path"
45058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45060    new_path="$unix_path"
45061  fi
45062
45063  if test "x$path" != "x$new_path"; then
45064    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45067  fi
45068
45069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45071
45072    else
45073      # We're on a unix platform. Hooray! :)
45074      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45075      has_space=`$ECHO "$path" | $GREP " "`
45076      if test "x$has_space" != x; then
45077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45078$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45079        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45080      fi
45081
45082      # Use eval to expand a potential ~
45083      eval path="$path"
45084      if test ! -f "$path" && test ! -d "$path"; then
45085        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45086      fi
45087
45088      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45089    fi
45090  fi
45091
45092
45093  # Only process if variable expands to non-empty
45094
45095  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45097
45098  # Input might be given as Windows format, start by converting to
45099  # unix format.
45100  path="$POTENTIAL_FREETYPE_LIB_PATH"
45101  new_path=`$CYGPATH -u "$path"`
45102
45103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45106  # "foo.exe" is OK but "foo" is an error.
45107  #
45108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45109  # It is also a way to make sure we got the proper file name for the real test later on.
45110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45111  if test "x$test_shortpath" = x; then
45112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45114    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45115  fi
45116
45117  # Call helper function which possibly converts this using DOS-style short mode.
45118  # If so, the updated path is stored in $new_path.
45119
45120  input_path="$new_path"
45121  # Check if we need to convert this using DOS-style short mode. If the path
45122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45123  # take no chances and rewrite it.
45124  # Note: m4 eats our [], so we need to use [ and ] instead.
45125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45126  if test "x$has_forbidden_chars" != x; then
45127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45131      # Going to short mode and back again did indeed matter. Since short mode is
45132      # case insensitive, let's make it lowercase to improve readability.
45133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45134      # Now convert it back to Unix-style (cygpath)
45135      input_path=`$CYGPATH -u "$shortmode_path"`
45136      new_path="$input_path"
45137    fi
45138  fi
45139
45140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45141  if test "x$test_cygdrive_prefix" = x; then
45142    # As a simple fix, exclude /usr/bin since it's not a real path.
45143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45145      # a path prefixed by /cygdrive for fixpath to work.
45146      new_path="$CYGWIN_ROOT_PATH$input_path"
45147    fi
45148  fi
45149
45150
45151  if test "x$path" != "x$new_path"; then
45152    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45155  fi
45156
45157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45158
45159  path="$POTENTIAL_FREETYPE_LIB_PATH"
45160  has_colon=`$ECHO $path | $GREP ^.:`
45161  new_path="$path"
45162  if test "x$has_colon" = x; then
45163    # Not in mixed or Windows style, start by that.
45164    new_path=`cmd //c echo $path`
45165  fi
45166
45167
45168  input_path="$new_path"
45169  # Check if we need to convert this using DOS-style short mode. If the path
45170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45171  # take no chances and rewrite it.
45172  # Note: m4 eats our [], so we need to use [ and ] instead.
45173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45174  if test "x$has_forbidden_chars" != x; then
45175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45177  fi
45178
45179
45180  windows_path="$new_path"
45181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45182    unix_path=`$CYGPATH -u "$windows_path"`
45183    new_path="$unix_path"
45184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45186    new_path="$unix_path"
45187  fi
45188
45189  if test "x$path" != "x$new_path"; then
45190    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45193  fi
45194
45195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45197
45198    else
45199      # We're on a unix platform. Hooray! :)
45200      path="$POTENTIAL_FREETYPE_LIB_PATH"
45201      has_space=`$ECHO "$path" | $GREP " "`
45202      if test "x$has_space" != x; then
45203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45206      fi
45207
45208      # Use eval to expand a potential ~
45209      eval path="$path"
45210      if test ! -f "$path" && test ! -d "$path"; then
45211        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45212      fi
45213
45214      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45215    fi
45216  fi
45217
45218
45219    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45221$as_echo_n "checking for freetype includes... " >&6; }
45222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45223$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45224    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45226$as_echo_n "checking for freetype libraries... " >&6; }
45227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45228$as_echo "$FREETYPE_LIB_PATH" >&6; }
45229  fi
45230
45231          if test "x$FOUND_FREETYPE" != xyes; then
45232            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45233          fi
45234        else
45235          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45236$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45237          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45238        fi
45239      else
45240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45241$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45242      fi
45243    fi
45244
45245    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45246      # User has specified settings
45247
45248      if test "x$BUNDLE_FREETYPE" = x; then
45249        # If not specified, default is to bundle freetype
45250        BUNDLE_FREETYPE=yes
45251      fi
45252
45253      if test "x$with_freetype" != x; then
45254        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45255        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45256      fi
45257
45258      # Allow --with-freetype-lib and --with-freetype-include to override
45259      if test "x$with_freetype_include" != x; then
45260        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45261      fi
45262      if test "x$with_freetype_lib" != x; then
45263        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45264      fi
45265
45266      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45267        # Okay, we got it. Check that it works.
45268
45269  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45270  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45271  METHOD="--with-freetype"
45272
45273  # Let's start with an optimistic view of the world :-)
45274  FOUND_FREETYPE=yes
45275
45276  # First look for the canonical freetype main include file ft2build.h.
45277  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45278    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45279    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45280    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45281      # Fail.
45282      FOUND_FREETYPE=no
45283    fi
45284  fi
45285
45286  if test "x$FOUND_FREETYPE" = xyes; then
45287    # Include file found, let's continue the sanity check.
45288    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45289$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45290
45291    # Reset to default value
45292    FREETYPE_BASE_NAME=freetype
45293    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45294    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45295      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45296          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45297        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45298        # for the .6 version explicitly.
45299        FREETYPE_BASE_NAME=freetype.6
45300        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45301        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45302$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45303      else
45304        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45305$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45306        FOUND_FREETYPE=no
45307      fi
45308    else
45309      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45310        # On Windows, we will need both .lib and .dll file.
45311        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45312          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45313$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45314          FOUND_FREETYPE=no
45315        fi
45316      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45317          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45318        # Found lib in isa dir, use that instead.
45319        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45320        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45321$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45322      fi
45323    fi
45324  fi
45325
45326  if test "x$FOUND_FREETYPE" = xyes; then
45327
45328  # Only process if variable expands to non-empty
45329
45330  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45332
45333  # Input might be given as Windows format, start by converting to
45334  # unix format.
45335  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45336  new_path=`$CYGPATH -u "$path"`
45337
45338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45341  # "foo.exe" is OK but "foo" is an error.
45342  #
45343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45344  # It is also a way to make sure we got the proper file name for the real test later on.
45345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45346  if test "x$test_shortpath" = x; then
45347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45348$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45349    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45350  fi
45351
45352  # Call helper function which possibly converts this using DOS-style short mode.
45353  # If so, the updated path is stored in $new_path.
45354
45355  input_path="$new_path"
45356  # Check if we need to convert this using DOS-style short mode. If the path
45357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45358  # take no chances and rewrite it.
45359  # Note: m4 eats our [], so we need to use [ and ] instead.
45360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45361  if test "x$has_forbidden_chars" != x; then
45362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45366      # Going to short mode and back again did indeed matter. Since short mode is
45367      # case insensitive, let's make it lowercase to improve readability.
45368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45369      # Now convert it back to Unix-style (cygpath)
45370      input_path=`$CYGPATH -u "$shortmode_path"`
45371      new_path="$input_path"
45372    fi
45373  fi
45374
45375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45376  if test "x$test_cygdrive_prefix" = x; then
45377    # As a simple fix, exclude /usr/bin since it's not a real path.
45378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45380      # a path prefixed by /cygdrive for fixpath to work.
45381      new_path="$CYGWIN_ROOT_PATH$input_path"
45382    fi
45383  fi
45384
45385
45386  if test "x$path" != "x$new_path"; then
45387    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45390  fi
45391
45392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45393
45394  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45395  has_colon=`$ECHO $path | $GREP ^.:`
45396  new_path="$path"
45397  if test "x$has_colon" = x; then
45398    # Not in mixed or Windows style, start by that.
45399    new_path=`cmd //c echo $path`
45400  fi
45401
45402
45403  input_path="$new_path"
45404  # Check if we need to convert this using DOS-style short mode. If the path
45405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45406  # take no chances and rewrite it.
45407  # Note: m4 eats our [], so we need to use [ and ] instead.
45408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45409  if test "x$has_forbidden_chars" != x; then
45410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45412  fi
45413
45414
45415  windows_path="$new_path"
45416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45417    unix_path=`$CYGPATH -u "$windows_path"`
45418    new_path="$unix_path"
45419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45421    new_path="$unix_path"
45422  fi
45423
45424  if test "x$path" != "x$new_path"; then
45425    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45428  fi
45429
45430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45432
45433    else
45434      # We're on a unix platform. Hooray! :)
45435      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45436      has_space=`$ECHO "$path" | $GREP " "`
45437      if test "x$has_space" != x; then
45438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45439$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45440        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45441      fi
45442
45443      # Use eval to expand a potential ~
45444      eval path="$path"
45445      if test ! -f "$path" && test ! -d "$path"; then
45446        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45447      fi
45448
45449      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45450    fi
45451  fi
45452
45453
45454  # Only process if variable expands to non-empty
45455
45456  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458
45459  # Input might be given as Windows format, start by converting to
45460  # unix format.
45461  path="$POTENTIAL_FREETYPE_LIB_PATH"
45462  new_path=`$CYGPATH -u "$path"`
45463
45464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45467  # "foo.exe" is OK but "foo" is an error.
45468  #
45469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45470  # It is also a way to make sure we got the proper file name for the real test later on.
45471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45472  if test "x$test_shortpath" = x; then
45473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45475    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45476  fi
45477
45478  # Call helper function which possibly converts this using DOS-style short mode.
45479  # If so, the updated path is stored in $new_path.
45480
45481  input_path="$new_path"
45482  # Check if we need to convert this using DOS-style short mode. If the path
45483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45484  # take no chances and rewrite it.
45485  # Note: m4 eats our [], so we need to use [ and ] instead.
45486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45487  if test "x$has_forbidden_chars" != x; then
45488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45492      # Going to short mode and back again did indeed matter. Since short mode is
45493      # case insensitive, let's make it lowercase to improve readability.
45494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45495      # Now convert it back to Unix-style (cygpath)
45496      input_path=`$CYGPATH -u "$shortmode_path"`
45497      new_path="$input_path"
45498    fi
45499  fi
45500
45501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45502  if test "x$test_cygdrive_prefix" = x; then
45503    # As a simple fix, exclude /usr/bin since it's not a real path.
45504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45506      # a path prefixed by /cygdrive for fixpath to work.
45507      new_path="$CYGWIN_ROOT_PATH$input_path"
45508    fi
45509  fi
45510
45511
45512  if test "x$path" != "x$new_path"; then
45513    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45515$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45516  fi
45517
45518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45519
45520  path="$POTENTIAL_FREETYPE_LIB_PATH"
45521  has_colon=`$ECHO $path | $GREP ^.:`
45522  new_path="$path"
45523  if test "x$has_colon" = x; then
45524    # Not in mixed or Windows style, start by that.
45525    new_path=`cmd //c echo $path`
45526  fi
45527
45528
45529  input_path="$new_path"
45530  # Check if we need to convert this using DOS-style short mode. If the path
45531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45532  # take no chances and rewrite it.
45533  # Note: m4 eats our [], so we need to use [ and ] instead.
45534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45535  if test "x$has_forbidden_chars" != x; then
45536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45538  fi
45539
45540
45541  windows_path="$new_path"
45542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45543    unix_path=`$CYGPATH -u "$windows_path"`
45544    new_path="$unix_path"
45545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45547    new_path="$unix_path"
45548  fi
45549
45550  if test "x$path" != "x$new_path"; then
45551    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45554  fi
45555
45556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45558
45559    else
45560      # We're on a unix platform. Hooray! :)
45561      path="$POTENTIAL_FREETYPE_LIB_PATH"
45562      has_space=`$ECHO "$path" | $GREP " "`
45563      if test "x$has_space" != x; then
45564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45567      fi
45568
45569      # Use eval to expand a potential ~
45570      eval path="$path"
45571      if test ! -f "$path" && test ! -d "$path"; then
45572        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45573      fi
45574
45575      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45576    fi
45577  fi
45578
45579
45580    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45582$as_echo_n "checking for freetype includes... " >&6; }
45583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45584$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45585    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45587$as_echo_n "checking for freetype libraries... " >&6; }
45588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45589$as_echo "$FREETYPE_LIB_PATH" >&6; }
45590  fi
45591
45592        if test "x$FOUND_FREETYPE" != xyes; then
45593          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45594        fi
45595      else
45596        # User specified only one of lib or include. This is an error.
45597        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45598          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45599$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45600          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45601        else
45602          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45603$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45604          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45605        fi
45606      fi
45607    else
45608      # User did not specify settings, but we need freetype. Try to locate it.
45609
45610      if test "x$BUNDLE_FREETYPE" = x; then
45611        # If not specified, default is to bundle freetype only on windows
45612        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45613          BUNDLE_FREETYPE=yes
45614        else
45615          BUNDLE_FREETYPE=no
45616        fi
45617      fi
45618
45619      if test "x$FOUND_FREETYPE" != xyes; then
45620        # Check builddeps
45621
45622
45623  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45624    # Source the builddeps file again, to make sure it uses the latest variables!
45625    . $builddepsfile
45626    # Look for a target and build machine specific resource!
45627    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45628    if test "x$resource" = x; then
45629      # Ok, lets instead look for a target specific resource
45630      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45631    fi
45632    if test "x$resource" = x; then
45633      # Ok, lets instead look for a build specific resource
45634      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45635    fi
45636    if test "x$resource" = x; then
45637      # Ok, lets instead look for a generic resource
45638      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45639      resource=${builddep_freetype2}
45640    fi
45641    if test "x$resource" != x; then
45642      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45643$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45644      # If the resource in the builddeps.conf file is an existing directory,
45645      # for example /java/linux/cups
45646      if test -d ${resource}; then
45647        depdir=${resource}
45648      else
45649
45650  # freetype2 is for example mymodule
45651  # $resource is for example libs/general/libmymod_1_2_3.zip
45652  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45653  # $with_builddeps_dir is for example /localhome/builddeps
45654  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45655  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45656  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45657  filename=`basename $resource`
45658  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45659  filebase=${filename%%.*}
45660  extension=${filename#*.}
45661  installdir=$with_builddeps_dir/$filebase
45662  if test ! -f $installdir/$filename.unpacked; then
45663    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45664$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45665    if test ! -d $installdir; then
45666      mkdir -p $installdir
45667    fi
45668    if test ! -d $installdir; then
45669      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45670    fi
45671    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45672    touch $tmpfile
45673    if test ! -f $tmpfile; then
45674      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45675    fi
45676
45677  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45678  # $tmpfile is the local file name for the downloaded file.
45679  VALID_TOOL=no
45680  if test "x$BDEPS_FTP" = xwget; then
45681    VALID_TOOL=yes
45682    wget -O $tmpfile $with_builddeps_server/$resource
45683  fi
45684  if test "x$BDEPS_FTP" = xlftp; then
45685    VALID_TOOL=yes
45686    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45687  fi
45688  if test "x$BDEPS_FTP" = xftp; then
45689    VALID_TOOL=yes
45690    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45691    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45692    FTPUSERPWD=${FTPSERVER%%@*}
45693    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45694      FTPUSER=${userpwd%%:*}
45695      FTPPWD=${userpwd#*@}
45696      FTPSERVER=${FTPSERVER#*@}
45697    else
45698      FTPUSER=ftp
45699      FTPPWD=ftp
45700    fi
45701    # the "pass" command does not work on some
45702    # ftp clients (read ftp.exe) but if it works,
45703    # passive mode is better!
45704    ( \
45705        echo "user $FTPUSER $FTPPWD"        ; \
45706        echo "pass"                         ; \
45707        echo "bin"                          ; \
45708        echo "get $FTPPATH $tmpfile"              ; \
45709    ) | ftp -in $FTPSERVER
45710  fi
45711  if test "x$VALID_TOOL" != xyes; then
45712    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45713  fi
45714
45715    mv $tmpfile $installdir/$filename
45716    if test ! -s $installdir/$filename; then
45717      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45718    fi
45719    case "$extension" in
45720      zip)  echo "Unzipping $installdir/$filename..."
45721        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45722        ;;
45723      tar.gz) echo "Untaring $installdir/$filename..."
45724        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45725        ;;
45726      tgz) echo "Untaring $installdir/$filename..."
45727        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45728        ;;
45729      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45730        ;;
45731    esac
45732  fi
45733  if test -f $installdir/$filename.unpacked; then
45734    depdir=$installdir
45735  fi
45736
45737      fi
45738      # Source the builddeps file again, because in the previous command, the depdir
45739      # was updated to point at the current build dependency install directory.
45740      . $builddepsfile
45741      # Now extract variables from the builddeps.conf files.
45742      theroot=${builddep_freetype2_ROOT}
45743      thecflags=${builddep_freetype2_CFLAGS}
45744      thelibs=${builddep_freetype2_LIBS}
45745      if test "x$depdir" = x; then
45746        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45747      fi
45748      FREETYPE=$depdir
45749      if test "x$theroot" != x; then
45750        FREETYPE="$theroot"
45751      fi
45752      if test "x$thecflags" != x; then
45753        FREETYPE_CFLAGS="$thecflags"
45754      fi
45755      if test "x$thelibs" != x; then
45756        FREETYPE_LIBS="$thelibs"
45757      fi
45758      FOUND_FREETYPE=yes
45759      else FOUND_FREETYPE=no
45760
45761    fi
45762    else FOUND_FREETYPE=no
45763
45764  fi
45765
45766        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45767        if test "x$FOUND_FREETYPE" = xyes; then
45768          if test "x$BUNDLE_FREETYPE" = xyes; then
45769            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45770$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45771            FOUND_FREETYPE=no
45772          else
45773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45774$as_echo_n "checking for freetype... " >&6; }
45775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45776$as_echo "yes (using builddeps)" >&6; }
45777          fi
45778        fi
45779      fi
45780
45781      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45782      if test "x$SYSROOT" = x; then
45783        if test "x$FOUND_FREETYPE" != xyes; then
45784          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45785          if test "x$PKG_CONFIG" != x; then
45786
45787pkg_failed=no
45788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45789$as_echo_n "checking for FREETYPE... " >&6; }
45790
45791if test -n "$FREETYPE_CFLAGS"; then
45792    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45793 elif test -n "$PKG_CONFIG"; then
45794    if test -n "$PKG_CONFIG" && \
45795    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45796  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45797  ac_status=$?
45798  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45799  test $ac_status = 0; }; then
45800  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45801else
45802  pkg_failed=yes
45803fi
45804 else
45805    pkg_failed=untried
45806fi
45807if test -n "$FREETYPE_LIBS"; then
45808    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45809 elif test -n "$PKG_CONFIG"; then
45810    if test -n "$PKG_CONFIG" && \
45811    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45812  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45813  ac_status=$?
45814  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45815  test $ac_status = 0; }; then
45816  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45817else
45818  pkg_failed=yes
45819fi
45820 else
45821    pkg_failed=untried
45822fi
45823
45824
45825
45826if test $pkg_failed = yes; then
45827
45828if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45829        _pkg_short_errors_supported=yes
45830else
45831        _pkg_short_errors_supported=no
45832fi
45833        if test $_pkg_short_errors_supported = yes; then
45834	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45835        else
45836	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45837        fi
45838	# Put the nasty error message in config.log where it belongs
45839	echo "$FREETYPE_PKG_ERRORS" >&5
45840
45841	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45842$as_echo "no" >&6; }
45843                FOUND_FREETYPE=no
45844elif test $pkg_failed = untried; then
45845	FOUND_FREETYPE=no
45846else
45847	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45848	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45850$as_echo "yes" >&6; }
45851	FOUND_FREETYPE=yes
45852fi
45853            if test "x$FOUND_FREETYPE" = xyes; then
45854              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45855              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45856              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45857              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45858                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45859              fi
45860              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45861              if test "x$BUNDLE_FREETYPE" = xyes; then
45862                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45863$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45864                FOUND_FREETYPE=no
45865              else
45866                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45867$as_echo_n "checking for freetype... " >&6; }
45868                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45869$as_echo "yes (using pkg-config)" >&6; }
45870              fi
45871            fi
45872          fi
45873        fi
45874      fi
45875
45876      if test "x$FOUND_FREETYPE" != xyes; then
45877        # Check in well-known locations
45878        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45879          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45880
45881  windows_path="$FREETYPE_BASE_DIR"
45882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45883    unix_path=`$CYGPATH -u "$windows_path"`
45884    FREETYPE_BASE_DIR="$unix_path"
45885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45887    FREETYPE_BASE_DIR="$unix_path"
45888  fi
45889
45890
45891  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45892  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45893  METHOD="well-known location"
45894
45895  # Let's start with an optimistic view of the world :-)
45896  FOUND_FREETYPE=yes
45897
45898  # First look for the canonical freetype main include file ft2build.h.
45899  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45900    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45901    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45902    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45903      # Fail.
45904      FOUND_FREETYPE=no
45905    fi
45906  fi
45907
45908  if test "x$FOUND_FREETYPE" = xyes; then
45909    # Include file found, let's continue the sanity check.
45910    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45911$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45912
45913    # Reset to default value
45914    FREETYPE_BASE_NAME=freetype
45915    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45916    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45917      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45918          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45919        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45920        # for the .6 version explicitly.
45921        FREETYPE_BASE_NAME=freetype.6
45922        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45923        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45924$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45925      else
45926        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45927$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45928        FOUND_FREETYPE=no
45929      fi
45930    else
45931      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45932        # On Windows, we will need both .lib and .dll file.
45933        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45934          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45935$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45936          FOUND_FREETYPE=no
45937        fi
45938      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45939          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45940        # Found lib in isa dir, use that instead.
45941        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45942        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45943$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45944      fi
45945    fi
45946  fi
45947
45948  if test "x$FOUND_FREETYPE" = xyes; then
45949
45950  # Only process if variable expands to non-empty
45951
45952  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45954
45955  # Input might be given as Windows format, start by converting to
45956  # unix format.
45957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45958  new_path=`$CYGPATH -u "$path"`
45959
45960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45963  # "foo.exe" is OK but "foo" is an error.
45964  #
45965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45966  # It is also a way to make sure we got the proper file name for the real test later on.
45967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45968  if test "x$test_shortpath" = x; then
45969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45972  fi
45973
45974  # Call helper function which possibly converts this using DOS-style short mode.
45975  # If so, the updated path is stored in $new_path.
45976
45977  input_path="$new_path"
45978  # Check if we need to convert this using DOS-style short mode. If the path
45979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45980  # take no chances and rewrite it.
45981  # Note: m4 eats our [], so we need to use [ and ] instead.
45982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45983  if test "x$has_forbidden_chars" != x; then
45984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45988      # Going to short mode and back again did indeed matter. Since short mode is
45989      # case insensitive, let's make it lowercase to improve readability.
45990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45991      # Now convert it back to Unix-style (cygpath)
45992      input_path=`$CYGPATH -u "$shortmode_path"`
45993      new_path="$input_path"
45994    fi
45995  fi
45996
45997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45998  if test "x$test_cygdrive_prefix" = x; then
45999    # As a simple fix, exclude /usr/bin since it's not a real path.
46000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46002      # a path prefixed by /cygdrive for fixpath to work.
46003      new_path="$CYGWIN_ROOT_PATH$input_path"
46004    fi
46005  fi
46006
46007
46008  if test "x$path" != "x$new_path"; then
46009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46012  fi
46013
46014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46015
46016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46017  has_colon=`$ECHO $path | $GREP ^.:`
46018  new_path="$path"
46019  if test "x$has_colon" = x; then
46020    # Not in mixed or Windows style, start by that.
46021    new_path=`cmd //c echo $path`
46022  fi
46023
46024
46025  input_path="$new_path"
46026  # Check if we need to convert this using DOS-style short mode. If the path
46027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46028  # take no chances and rewrite it.
46029  # Note: m4 eats our [], so we need to use [ and ] instead.
46030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46031  if test "x$has_forbidden_chars" != x; then
46032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46034  fi
46035
46036
46037  windows_path="$new_path"
46038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46039    unix_path=`$CYGPATH -u "$windows_path"`
46040    new_path="$unix_path"
46041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46043    new_path="$unix_path"
46044  fi
46045
46046  if test "x$path" != "x$new_path"; then
46047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46050  fi
46051
46052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46054
46055    else
46056      # We're on a unix platform. Hooray! :)
46057      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46058      has_space=`$ECHO "$path" | $GREP " "`
46059      if test "x$has_space" != x; then
46060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46063      fi
46064
46065      # Use eval to expand a potential ~
46066      eval path="$path"
46067      if test ! -f "$path" && test ! -d "$path"; then
46068        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46069      fi
46070
46071      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46072    fi
46073  fi
46074
46075
46076  # Only process if variable expands to non-empty
46077
46078  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46080
46081  # Input might be given as Windows format, start by converting to
46082  # unix format.
46083  path="$POTENTIAL_FREETYPE_LIB_PATH"
46084  new_path=`$CYGPATH -u "$path"`
46085
46086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46089  # "foo.exe" is OK but "foo" is an error.
46090  #
46091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46092  # It is also a way to make sure we got the proper file name for the real test later on.
46093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46094  if test "x$test_shortpath" = x; then
46095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46098  fi
46099
46100  # Call helper function which possibly converts this using DOS-style short mode.
46101  # If so, the updated path is stored in $new_path.
46102
46103  input_path="$new_path"
46104  # Check if we need to convert this using DOS-style short mode. If the path
46105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46106  # take no chances and rewrite it.
46107  # Note: m4 eats our [], so we need to use [ and ] instead.
46108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46109  if test "x$has_forbidden_chars" != x; then
46110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46114      # Going to short mode and back again did indeed matter. Since short mode is
46115      # case insensitive, let's make it lowercase to improve readability.
46116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46117      # Now convert it back to Unix-style (cygpath)
46118      input_path=`$CYGPATH -u "$shortmode_path"`
46119      new_path="$input_path"
46120    fi
46121  fi
46122
46123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46124  if test "x$test_cygdrive_prefix" = x; then
46125    # As a simple fix, exclude /usr/bin since it's not a real path.
46126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46128      # a path prefixed by /cygdrive for fixpath to work.
46129      new_path="$CYGWIN_ROOT_PATH$input_path"
46130    fi
46131  fi
46132
46133
46134  if test "x$path" != "x$new_path"; then
46135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46138  fi
46139
46140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46141
46142  path="$POTENTIAL_FREETYPE_LIB_PATH"
46143  has_colon=`$ECHO $path | $GREP ^.:`
46144  new_path="$path"
46145  if test "x$has_colon" = x; then
46146    # Not in mixed or Windows style, start by that.
46147    new_path=`cmd //c echo $path`
46148  fi
46149
46150
46151  input_path="$new_path"
46152  # Check if we need to convert this using DOS-style short mode. If the path
46153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46154  # take no chances and rewrite it.
46155  # Note: m4 eats our [], so we need to use [ and ] instead.
46156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46157  if test "x$has_forbidden_chars" != x; then
46158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46160  fi
46161
46162
46163  windows_path="$new_path"
46164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46165    unix_path=`$CYGPATH -u "$windows_path"`
46166    new_path="$unix_path"
46167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46169    new_path="$unix_path"
46170  fi
46171
46172  if test "x$path" != "x$new_path"; then
46173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46176  fi
46177
46178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46180
46181    else
46182      # We're on a unix platform. Hooray! :)
46183      path="$POTENTIAL_FREETYPE_LIB_PATH"
46184      has_space=`$ECHO "$path" | $GREP " "`
46185      if test "x$has_space" != x; then
46186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46189      fi
46190
46191      # Use eval to expand a potential ~
46192      eval path="$path"
46193      if test ! -f "$path" && test ! -d "$path"; then
46194        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46195      fi
46196
46197      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46198    fi
46199  fi
46200
46201
46202    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46204$as_echo_n "checking for freetype includes... " >&6; }
46205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46206$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46207    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46209$as_echo_n "checking for freetype libraries... " >&6; }
46210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46211$as_echo "$FREETYPE_LIB_PATH" >&6; }
46212  fi
46213
46214          if test "x$FOUND_FREETYPE" != xyes; then
46215            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
46216
46217  windows_path="$FREETYPE_BASE_DIR"
46218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46219    unix_path=`$CYGPATH -u "$windows_path"`
46220    FREETYPE_BASE_DIR="$unix_path"
46221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46223    FREETYPE_BASE_DIR="$unix_path"
46224  fi
46225
46226
46227  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46228  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46229  METHOD="well-known location"
46230
46231  # Let's start with an optimistic view of the world :-)
46232  FOUND_FREETYPE=yes
46233
46234  # First look for the canonical freetype main include file ft2build.h.
46235  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46236    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46237    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46238    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46239      # Fail.
46240      FOUND_FREETYPE=no
46241    fi
46242  fi
46243
46244  if test "x$FOUND_FREETYPE" = xyes; then
46245    # Include file found, let's continue the sanity check.
46246    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46247$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46248
46249    # Reset to default value
46250    FREETYPE_BASE_NAME=freetype
46251    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46252    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46253      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46254          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46255        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46256        # for the .6 version explicitly.
46257        FREETYPE_BASE_NAME=freetype.6
46258        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46259        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46260$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46261      else
46262        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46263$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46264        FOUND_FREETYPE=no
46265      fi
46266    else
46267      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46268        # On Windows, we will need both .lib and .dll file.
46269        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46270          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46271$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46272          FOUND_FREETYPE=no
46273        fi
46274      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46275          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46276        # Found lib in isa dir, use that instead.
46277        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46278        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46279$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46280      fi
46281    fi
46282  fi
46283
46284  if test "x$FOUND_FREETYPE" = xyes; then
46285
46286  # Only process if variable expands to non-empty
46287
46288  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46290
46291  # Input might be given as Windows format, start by converting to
46292  # unix format.
46293  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46294  new_path=`$CYGPATH -u "$path"`
46295
46296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46299  # "foo.exe" is OK but "foo" is an error.
46300  #
46301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46302  # It is also a way to make sure we got the proper file name for the real test later on.
46303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46304  if test "x$test_shortpath" = x; then
46305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46307    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46308  fi
46309
46310  # Call helper function which possibly converts this using DOS-style short mode.
46311  # If so, the updated path is stored in $new_path.
46312
46313  input_path="$new_path"
46314  # Check if we need to convert this using DOS-style short mode. If the path
46315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46316  # take no chances and rewrite it.
46317  # Note: m4 eats our [], so we need to use [ and ] instead.
46318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46319  if test "x$has_forbidden_chars" != x; then
46320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46324      # Going to short mode and back again did indeed matter. Since short mode is
46325      # case insensitive, let's make it lowercase to improve readability.
46326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46327      # Now convert it back to Unix-style (cygpath)
46328      input_path=`$CYGPATH -u "$shortmode_path"`
46329      new_path="$input_path"
46330    fi
46331  fi
46332
46333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46334  if test "x$test_cygdrive_prefix" = x; then
46335    # As a simple fix, exclude /usr/bin since it's not a real path.
46336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46338      # a path prefixed by /cygdrive for fixpath to work.
46339      new_path="$CYGWIN_ROOT_PATH$input_path"
46340    fi
46341  fi
46342
46343
46344  if test "x$path" != "x$new_path"; then
46345    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46347$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46348  fi
46349
46350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351
46352  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46353  has_colon=`$ECHO $path | $GREP ^.:`
46354  new_path="$path"
46355  if test "x$has_colon" = x; then
46356    # Not in mixed or Windows style, start by that.
46357    new_path=`cmd //c echo $path`
46358  fi
46359
46360
46361  input_path="$new_path"
46362  # Check if we need to convert this using DOS-style short mode. If the path
46363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46364  # take no chances and rewrite it.
46365  # Note: m4 eats our [], so we need to use [ and ] instead.
46366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46367  if test "x$has_forbidden_chars" != x; then
46368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46370  fi
46371
46372
46373  windows_path="$new_path"
46374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375    unix_path=`$CYGPATH -u "$windows_path"`
46376    new_path="$unix_path"
46377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46379    new_path="$unix_path"
46380  fi
46381
46382  if test "x$path" != "x$new_path"; then
46383    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46386  fi
46387
46388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46390
46391    else
46392      # We're on a unix platform. Hooray! :)
46393      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46394      has_space=`$ECHO "$path" | $GREP " "`
46395      if test "x$has_space" != x; then
46396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46399      fi
46400
46401      # Use eval to expand a potential ~
46402      eval path="$path"
46403      if test ! -f "$path" && test ! -d "$path"; then
46404        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46405      fi
46406
46407      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46408    fi
46409  fi
46410
46411
46412  # Only process if variable expands to non-empty
46413
46414  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46416
46417  # Input might be given as Windows format, start by converting to
46418  # unix format.
46419  path="$POTENTIAL_FREETYPE_LIB_PATH"
46420  new_path=`$CYGPATH -u "$path"`
46421
46422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46425  # "foo.exe" is OK but "foo" is an error.
46426  #
46427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46428  # It is also a way to make sure we got the proper file name for the real test later on.
46429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46430  if test "x$test_shortpath" = x; then
46431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46433    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46434  fi
46435
46436  # Call helper function which possibly converts this using DOS-style short mode.
46437  # If so, the updated path is stored in $new_path.
46438
46439  input_path="$new_path"
46440  # Check if we need to convert this using DOS-style short mode. If the path
46441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46442  # take no chances and rewrite it.
46443  # Note: m4 eats our [], so we need to use [ and ] instead.
46444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46445  if test "x$has_forbidden_chars" != x; then
46446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46450      # Going to short mode and back again did indeed matter. Since short mode is
46451      # case insensitive, let's make it lowercase to improve readability.
46452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46453      # Now convert it back to Unix-style (cygpath)
46454      input_path=`$CYGPATH -u "$shortmode_path"`
46455      new_path="$input_path"
46456    fi
46457  fi
46458
46459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46460  if test "x$test_cygdrive_prefix" = x; then
46461    # As a simple fix, exclude /usr/bin since it's not a real path.
46462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46464      # a path prefixed by /cygdrive for fixpath to work.
46465      new_path="$CYGWIN_ROOT_PATH$input_path"
46466    fi
46467  fi
46468
46469
46470  if test "x$path" != "x$new_path"; then
46471    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46474  fi
46475
46476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46477
46478  path="$POTENTIAL_FREETYPE_LIB_PATH"
46479  has_colon=`$ECHO $path | $GREP ^.:`
46480  new_path="$path"
46481  if test "x$has_colon" = x; then
46482    # Not in mixed or Windows style, start by that.
46483    new_path=`cmd //c echo $path`
46484  fi
46485
46486
46487  input_path="$new_path"
46488  # Check if we need to convert this using DOS-style short mode. If the path
46489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46490  # take no chances and rewrite it.
46491  # Note: m4 eats our [], so we need to use [ and ] instead.
46492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46493  if test "x$has_forbidden_chars" != x; then
46494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46496  fi
46497
46498
46499  windows_path="$new_path"
46500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46501    unix_path=`$CYGPATH -u "$windows_path"`
46502    new_path="$unix_path"
46503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46505    new_path="$unix_path"
46506  fi
46507
46508  if test "x$path" != "x$new_path"; then
46509    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46512  fi
46513
46514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46516
46517    else
46518      # We're on a unix platform. Hooray! :)
46519      path="$POTENTIAL_FREETYPE_LIB_PATH"
46520      has_space=`$ECHO "$path" | $GREP " "`
46521      if test "x$has_space" != x; then
46522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46525      fi
46526
46527      # Use eval to expand a potential ~
46528      eval path="$path"
46529      if test ! -f "$path" && test ! -d "$path"; then
46530        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46531      fi
46532
46533      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46534    fi
46535  fi
46536
46537
46538    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46540$as_echo_n "checking for freetype includes... " >&6; }
46541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46542$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46543    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46545$as_echo_n "checking for freetype libraries... " >&6; }
46546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46547$as_echo "$FREETYPE_LIB_PATH" >&6; }
46548  fi
46549
46550          fi
46551        else
46552          FREETYPE_BASE_DIR="$SYSROOT/usr"
46553
46554  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46555  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46556  METHOD="well-known location"
46557
46558  # Let's start with an optimistic view of the world :-)
46559  FOUND_FREETYPE=yes
46560
46561  # First look for the canonical freetype main include file ft2build.h.
46562  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46563    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46564    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46565    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46566      # Fail.
46567      FOUND_FREETYPE=no
46568    fi
46569  fi
46570
46571  if test "x$FOUND_FREETYPE" = xyes; then
46572    # Include file found, let's continue the sanity check.
46573    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46574$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46575
46576    # Reset to default value
46577    FREETYPE_BASE_NAME=freetype
46578    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46579    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46580      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46581          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46582        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46583        # for the .6 version explicitly.
46584        FREETYPE_BASE_NAME=freetype.6
46585        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46586        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46587$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46588      else
46589        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46590$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46591        FOUND_FREETYPE=no
46592      fi
46593    else
46594      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46595        # On Windows, we will need both .lib and .dll file.
46596        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46597          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46598$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46599          FOUND_FREETYPE=no
46600        fi
46601      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46602          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46603        # Found lib in isa dir, use that instead.
46604        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46605        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46606$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46607      fi
46608    fi
46609  fi
46610
46611  if test "x$FOUND_FREETYPE" = xyes; then
46612
46613  # Only process if variable expands to non-empty
46614
46615  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46617
46618  # Input might be given as Windows format, start by converting to
46619  # unix format.
46620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46621  new_path=`$CYGPATH -u "$path"`
46622
46623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46626  # "foo.exe" is OK but "foo" is an error.
46627  #
46628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46629  # It is also a way to make sure we got the proper file name for the real test later on.
46630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46631  if test "x$test_shortpath" = x; then
46632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46634    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46635  fi
46636
46637  # Call helper function which possibly converts this using DOS-style short mode.
46638  # If so, the updated path is stored in $new_path.
46639
46640  input_path="$new_path"
46641  # Check if we need to convert this using DOS-style short mode. If the path
46642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46643  # take no chances and rewrite it.
46644  # Note: m4 eats our [], so we need to use [ and ] instead.
46645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46646  if test "x$has_forbidden_chars" != x; then
46647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46651      # Going to short mode and back again did indeed matter. Since short mode is
46652      # case insensitive, let's make it lowercase to improve readability.
46653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46654      # Now convert it back to Unix-style (cygpath)
46655      input_path=`$CYGPATH -u "$shortmode_path"`
46656      new_path="$input_path"
46657    fi
46658  fi
46659
46660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46661  if test "x$test_cygdrive_prefix" = x; then
46662    # As a simple fix, exclude /usr/bin since it's not a real path.
46663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46665      # a path prefixed by /cygdrive for fixpath to work.
46666      new_path="$CYGWIN_ROOT_PATH$input_path"
46667    fi
46668  fi
46669
46670
46671  if test "x$path" != "x$new_path"; then
46672    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46675  fi
46676
46677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46678
46679  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46680  has_colon=`$ECHO $path | $GREP ^.:`
46681  new_path="$path"
46682  if test "x$has_colon" = x; then
46683    # Not in mixed or Windows style, start by that.
46684    new_path=`cmd //c echo $path`
46685  fi
46686
46687
46688  input_path="$new_path"
46689  # Check if we need to convert this using DOS-style short mode. If the path
46690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46691  # take no chances and rewrite it.
46692  # Note: m4 eats our [], so we need to use [ and ] instead.
46693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46694  if test "x$has_forbidden_chars" != x; then
46695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46697  fi
46698
46699
46700  windows_path="$new_path"
46701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46702    unix_path=`$CYGPATH -u "$windows_path"`
46703    new_path="$unix_path"
46704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46706    new_path="$unix_path"
46707  fi
46708
46709  if test "x$path" != "x$new_path"; then
46710    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46713  fi
46714
46715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46717
46718    else
46719      # We're on a unix platform. Hooray! :)
46720      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46721      has_space=`$ECHO "$path" | $GREP " "`
46722      if test "x$has_space" != x; then
46723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46726      fi
46727
46728      # Use eval to expand a potential ~
46729      eval path="$path"
46730      if test ! -f "$path" && test ! -d "$path"; then
46731        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46732      fi
46733
46734      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46735    fi
46736  fi
46737
46738
46739  # Only process if variable expands to non-empty
46740
46741  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46743
46744  # Input might be given as Windows format, start by converting to
46745  # unix format.
46746  path="$POTENTIAL_FREETYPE_LIB_PATH"
46747  new_path=`$CYGPATH -u "$path"`
46748
46749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46752  # "foo.exe" is OK but "foo" is an error.
46753  #
46754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46755  # It is also a way to make sure we got the proper file name for the real test later on.
46756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46757  if test "x$test_shortpath" = x; then
46758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46760    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46761  fi
46762
46763  # Call helper function which possibly converts this using DOS-style short mode.
46764  # If so, the updated path is stored in $new_path.
46765
46766  input_path="$new_path"
46767  # Check if we need to convert this using DOS-style short mode. If the path
46768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46769  # take no chances and rewrite it.
46770  # Note: m4 eats our [], so we need to use [ and ] instead.
46771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46772  if test "x$has_forbidden_chars" != x; then
46773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46777      # Going to short mode and back again did indeed matter. Since short mode is
46778      # case insensitive, let's make it lowercase to improve readability.
46779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46780      # Now convert it back to Unix-style (cygpath)
46781      input_path=`$CYGPATH -u "$shortmode_path"`
46782      new_path="$input_path"
46783    fi
46784  fi
46785
46786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46787  if test "x$test_cygdrive_prefix" = x; then
46788    # As a simple fix, exclude /usr/bin since it's not a real path.
46789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46791      # a path prefixed by /cygdrive for fixpath to work.
46792      new_path="$CYGWIN_ROOT_PATH$input_path"
46793    fi
46794  fi
46795
46796
46797  if test "x$path" != "x$new_path"; then
46798    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46801  fi
46802
46803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46804
46805  path="$POTENTIAL_FREETYPE_LIB_PATH"
46806  has_colon=`$ECHO $path | $GREP ^.:`
46807  new_path="$path"
46808  if test "x$has_colon" = x; then
46809    # Not in mixed or Windows style, start by that.
46810    new_path=`cmd //c echo $path`
46811  fi
46812
46813
46814  input_path="$new_path"
46815  # Check if we need to convert this using DOS-style short mode. If the path
46816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46817  # take no chances and rewrite it.
46818  # Note: m4 eats our [], so we need to use [ and ] instead.
46819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46820  if test "x$has_forbidden_chars" != x; then
46821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46823  fi
46824
46825
46826  windows_path="$new_path"
46827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46828    unix_path=`$CYGPATH -u "$windows_path"`
46829    new_path="$unix_path"
46830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46832    new_path="$unix_path"
46833  fi
46834
46835  if test "x$path" != "x$new_path"; then
46836    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46839  fi
46840
46841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46843
46844    else
46845      # We're on a unix platform. Hooray! :)
46846      path="$POTENTIAL_FREETYPE_LIB_PATH"
46847      has_space=`$ECHO "$path" | $GREP " "`
46848      if test "x$has_space" != x; then
46849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46852      fi
46853
46854      # Use eval to expand a potential ~
46855      eval path="$path"
46856      if test ! -f "$path" && test ! -d "$path"; then
46857        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46858      fi
46859
46860      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46861    fi
46862  fi
46863
46864
46865    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46867$as_echo_n "checking for freetype includes... " >&6; }
46868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46869$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46870    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46872$as_echo_n "checking for freetype libraries... " >&6; }
46873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46874$as_echo "$FREETYPE_LIB_PATH" >&6; }
46875  fi
46876
46877
46878          if test "x$FOUND_FREETYPE" != xyes; then
46879            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46880
46881  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46882  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46883  METHOD="well-known location"
46884
46885  # Let's start with an optimistic view of the world :-)
46886  FOUND_FREETYPE=yes
46887
46888  # First look for the canonical freetype main include file ft2build.h.
46889  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46890    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46891    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46892    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46893      # Fail.
46894      FOUND_FREETYPE=no
46895    fi
46896  fi
46897
46898  if test "x$FOUND_FREETYPE" = xyes; then
46899    # Include file found, let's continue the sanity check.
46900    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46901$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46902
46903    # Reset to default value
46904    FREETYPE_BASE_NAME=freetype
46905    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46906    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46907      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46908          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46909        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46910        # for the .6 version explicitly.
46911        FREETYPE_BASE_NAME=freetype.6
46912        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46913        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46914$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46915      else
46916        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46917$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46918        FOUND_FREETYPE=no
46919      fi
46920    else
46921      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46922        # On Windows, we will need both .lib and .dll file.
46923        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46924          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46926          FOUND_FREETYPE=no
46927        fi
46928      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46929          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46930        # Found lib in isa dir, use that instead.
46931        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46932        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46933$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46934      fi
46935    fi
46936  fi
46937
46938  if test "x$FOUND_FREETYPE" = xyes; then
46939
46940  # Only process if variable expands to non-empty
46941
46942  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46944
46945  # Input might be given as Windows format, start by converting to
46946  # unix format.
46947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46948  new_path=`$CYGPATH -u "$path"`
46949
46950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46953  # "foo.exe" is OK but "foo" is an error.
46954  #
46955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46956  # It is also a way to make sure we got the proper file name for the real test later on.
46957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46958  if test "x$test_shortpath" = x; then
46959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46961    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46962  fi
46963
46964  # Call helper function which possibly converts this using DOS-style short mode.
46965  # If so, the updated path is stored in $new_path.
46966
46967  input_path="$new_path"
46968  # Check if we need to convert this using DOS-style short mode. If the path
46969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46970  # take no chances and rewrite it.
46971  # Note: m4 eats our [], so we need to use [ and ] instead.
46972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46973  if test "x$has_forbidden_chars" != x; then
46974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46978      # Going to short mode and back again did indeed matter. Since short mode is
46979      # case insensitive, let's make it lowercase to improve readability.
46980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46981      # Now convert it back to Unix-style (cygpath)
46982      input_path=`$CYGPATH -u "$shortmode_path"`
46983      new_path="$input_path"
46984    fi
46985  fi
46986
46987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46988  if test "x$test_cygdrive_prefix" = x; then
46989    # As a simple fix, exclude /usr/bin since it's not a real path.
46990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46992      # a path prefixed by /cygdrive for fixpath to work.
46993      new_path="$CYGWIN_ROOT_PATH$input_path"
46994    fi
46995  fi
46996
46997
46998  if test "x$path" != "x$new_path"; then
46999    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47002  fi
47003
47004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47005
47006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47007  has_colon=`$ECHO $path | $GREP ^.:`
47008  new_path="$path"
47009  if test "x$has_colon" = x; then
47010    # Not in mixed or Windows style, start by that.
47011    new_path=`cmd //c echo $path`
47012  fi
47013
47014
47015  input_path="$new_path"
47016  # Check if we need to convert this using DOS-style short mode. If the path
47017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47018  # take no chances and rewrite it.
47019  # Note: m4 eats our [], so we need to use [ and ] instead.
47020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47021  if test "x$has_forbidden_chars" != x; then
47022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47024  fi
47025
47026
47027  windows_path="$new_path"
47028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47029    unix_path=`$CYGPATH -u "$windows_path"`
47030    new_path="$unix_path"
47031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47033    new_path="$unix_path"
47034  fi
47035
47036  if test "x$path" != "x$new_path"; then
47037    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47040  fi
47041
47042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47044
47045    else
47046      # We're on a unix platform. Hooray! :)
47047      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47048      has_space=`$ECHO "$path" | $GREP " "`
47049      if test "x$has_space" != x; then
47050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47053      fi
47054
47055      # Use eval to expand a potential ~
47056      eval path="$path"
47057      if test ! -f "$path" && test ! -d "$path"; then
47058        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47059      fi
47060
47061      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47062    fi
47063  fi
47064
47065
47066  # Only process if variable expands to non-empty
47067
47068  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47070
47071  # Input might be given as Windows format, start by converting to
47072  # unix format.
47073  path="$POTENTIAL_FREETYPE_LIB_PATH"
47074  new_path=`$CYGPATH -u "$path"`
47075
47076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47079  # "foo.exe" is OK but "foo" is an error.
47080  #
47081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47082  # It is also a way to make sure we got the proper file name for the real test later on.
47083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47084  if test "x$test_shortpath" = x; then
47085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47088  fi
47089
47090  # Call helper function which possibly converts this using DOS-style short mode.
47091  # If so, the updated path is stored in $new_path.
47092
47093  input_path="$new_path"
47094  # Check if we need to convert this using DOS-style short mode. If the path
47095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47096  # take no chances and rewrite it.
47097  # Note: m4 eats our [], so we need to use [ and ] instead.
47098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47099  if test "x$has_forbidden_chars" != x; then
47100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47104      # Going to short mode and back again did indeed matter. Since short mode is
47105      # case insensitive, let's make it lowercase to improve readability.
47106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47107      # Now convert it back to Unix-style (cygpath)
47108      input_path=`$CYGPATH -u "$shortmode_path"`
47109      new_path="$input_path"
47110    fi
47111  fi
47112
47113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47114  if test "x$test_cygdrive_prefix" = x; then
47115    # As a simple fix, exclude /usr/bin since it's not a real path.
47116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47118      # a path prefixed by /cygdrive for fixpath to work.
47119      new_path="$CYGWIN_ROOT_PATH$input_path"
47120    fi
47121  fi
47122
47123
47124  if test "x$path" != "x$new_path"; then
47125    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47128  fi
47129
47130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47131
47132  path="$POTENTIAL_FREETYPE_LIB_PATH"
47133  has_colon=`$ECHO $path | $GREP ^.:`
47134  new_path="$path"
47135  if test "x$has_colon" = x; then
47136    # Not in mixed or Windows style, start by that.
47137    new_path=`cmd //c echo $path`
47138  fi
47139
47140
47141  input_path="$new_path"
47142  # Check if we need to convert this using DOS-style short mode. If the path
47143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47144  # take no chances and rewrite it.
47145  # Note: m4 eats our [], so we need to use [ and ] instead.
47146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47147  if test "x$has_forbidden_chars" != x; then
47148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47150  fi
47151
47152
47153  windows_path="$new_path"
47154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47155    unix_path=`$CYGPATH -u "$windows_path"`
47156    new_path="$unix_path"
47157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47159    new_path="$unix_path"
47160  fi
47161
47162  if test "x$path" != "x$new_path"; then
47163    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47166  fi
47167
47168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47170
47171    else
47172      # We're on a unix platform. Hooray! :)
47173      path="$POTENTIAL_FREETYPE_LIB_PATH"
47174      has_space=`$ECHO "$path" | $GREP " "`
47175      if test "x$has_space" != x; then
47176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47179      fi
47180
47181      # Use eval to expand a potential ~
47182      eval path="$path"
47183      if test ! -f "$path" && test ! -d "$path"; then
47184        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47185      fi
47186
47187      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47188    fi
47189  fi
47190
47191
47192    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47194$as_echo_n "checking for freetype includes... " >&6; }
47195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47196$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47197    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47199$as_echo_n "checking for freetype libraries... " >&6; }
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47201$as_echo "$FREETYPE_LIB_PATH" >&6; }
47202  fi
47203
47204          fi
47205
47206          if test "x$FOUND_FREETYPE" != xyes; then
47207            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
47208
47209  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47210  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
47211  METHOD="well-known location"
47212
47213  # Let's start with an optimistic view of the world :-)
47214  FOUND_FREETYPE=yes
47215
47216  # First look for the canonical freetype main include file ft2build.h.
47217  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47218    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47219    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47220    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47221      # Fail.
47222      FOUND_FREETYPE=no
47223    fi
47224  fi
47225
47226  if test "x$FOUND_FREETYPE" = xyes; then
47227    # Include file found, let's continue the sanity check.
47228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47229$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47230
47231    # Reset to default value
47232    FREETYPE_BASE_NAME=freetype
47233    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47234    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47235      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47236          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47237        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47238        # for the .6 version explicitly.
47239        FREETYPE_BASE_NAME=freetype.6
47240        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47241        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47242$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47243      else
47244        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47245$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47246        FOUND_FREETYPE=no
47247      fi
47248    else
47249      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47250        # On Windows, we will need both .lib and .dll file.
47251        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47252          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47253$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47254          FOUND_FREETYPE=no
47255        fi
47256      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47257          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47258        # Found lib in isa dir, use that instead.
47259        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47260        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47261$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47262      fi
47263    fi
47264  fi
47265
47266  if test "x$FOUND_FREETYPE" = xyes; then
47267
47268  # Only process if variable expands to non-empty
47269
47270  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47272
47273  # Input might be given as Windows format, start by converting to
47274  # unix format.
47275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47276  new_path=`$CYGPATH -u "$path"`
47277
47278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47281  # "foo.exe" is OK but "foo" is an error.
47282  #
47283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47284  # It is also a way to make sure we got the proper file name for the real test later on.
47285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47286  if test "x$test_shortpath" = x; then
47287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47289    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47290  fi
47291
47292  # Call helper function which possibly converts this using DOS-style short mode.
47293  # If so, the updated path is stored in $new_path.
47294
47295  input_path="$new_path"
47296  # Check if we need to convert this using DOS-style short mode. If the path
47297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47298  # take no chances and rewrite it.
47299  # Note: m4 eats our [], so we need to use [ and ] instead.
47300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47301  if test "x$has_forbidden_chars" != x; then
47302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47306      # Going to short mode and back again did indeed matter. Since short mode is
47307      # case insensitive, let's make it lowercase to improve readability.
47308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47309      # Now convert it back to Unix-style (cygpath)
47310      input_path=`$CYGPATH -u "$shortmode_path"`
47311      new_path="$input_path"
47312    fi
47313  fi
47314
47315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47316  if test "x$test_cygdrive_prefix" = x; then
47317    # As a simple fix, exclude /usr/bin since it's not a real path.
47318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47320      # a path prefixed by /cygdrive for fixpath to work.
47321      new_path="$CYGWIN_ROOT_PATH$input_path"
47322    fi
47323  fi
47324
47325
47326  if test "x$path" != "x$new_path"; then
47327    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47330  fi
47331
47332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47333
47334  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47335  has_colon=`$ECHO $path | $GREP ^.:`
47336  new_path="$path"
47337  if test "x$has_colon" = x; then
47338    # Not in mixed or Windows style, start by that.
47339    new_path=`cmd //c echo $path`
47340  fi
47341
47342
47343  input_path="$new_path"
47344  # Check if we need to convert this using DOS-style short mode. If the path
47345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47346  # take no chances and rewrite it.
47347  # Note: m4 eats our [], so we need to use [ and ] instead.
47348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47349  if test "x$has_forbidden_chars" != x; then
47350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47352  fi
47353
47354
47355  windows_path="$new_path"
47356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47357    unix_path=`$CYGPATH -u "$windows_path"`
47358    new_path="$unix_path"
47359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47361    new_path="$unix_path"
47362  fi
47363
47364  if test "x$path" != "x$new_path"; then
47365    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47368  fi
47369
47370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47372
47373    else
47374      # We're on a unix platform. Hooray! :)
47375      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47376      has_space=`$ECHO "$path" | $GREP " "`
47377      if test "x$has_space" != x; then
47378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47380        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47381      fi
47382
47383      # Use eval to expand a potential ~
47384      eval path="$path"
47385      if test ! -f "$path" && test ! -d "$path"; then
47386        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47387      fi
47388
47389      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47390    fi
47391  fi
47392
47393
47394  # Only process if variable expands to non-empty
47395
47396  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47398
47399  # Input might be given as Windows format, start by converting to
47400  # unix format.
47401  path="$POTENTIAL_FREETYPE_LIB_PATH"
47402  new_path=`$CYGPATH -u "$path"`
47403
47404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47407  # "foo.exe" is OK but "foo" is an error.
47408  #
47409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47410  # It is also a way to make sure we got the proper file name for the real test later on.
47411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47412  if test "x$test_shortpath" = x; then
47413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47414$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47415    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47416  fi
47417
47418  # Call helper function which possibly converts this using DOS-style short mode.
47419  # If so, the updated path is stored in $new_path.
47420
47421  input_path="$new_path"
47422  # Check if we need to convert this using DOS-style short mode. If the path
47423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47424  # take no chances and rewrite it.
47425  # Note: m4 eats our [], so we need to use [ and ] instead.
47426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47427  if test "x$has_forbidden_chars" != x; then
47428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47432      # Going to short mode and back again did indeed matter. Since short mode is
47433      # case insensitive, let's make it lowercase to improve readability.
47434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47435      # Now convert it back to Unix-style (cygpath)
47436      input_path=`$CYGPATH -u "$shortmode_path"`
47437      new_path="$input_path"
47438    fi
47439  fi
47440
47441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47442  if test "x$test_cygdrive_prefix" = x; then
47443    # As a simple fix, exclude /usr/bin since it's not a real path.
47444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47446      # a path prefixed by /cygdrive for fixpath to work.
47447      new_path="$CYGWIN_ROOT_PATH$input_path"
47448    fi
47449  fi
47450
47451
47452  if test "x$path" != "x$new_path"; then
47453    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47456  fi
47457
47458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47459
47460  path="$POTENTIAL_FREETYPE_LIB_PATH"
47461  has_colon=`$ECHO $path | $GREP ^.:`
47462  new_path="$path"
47463  if test "x$has_colon" = x; then
47464    # Not in mixed or Windows style, start by that.
47465    new_path=`cmd //c echo $path`
47466  fi
47467
47468
47469  input_path="$new_path"
47470  # Check if we need to convert this using DOS-style short mode. If the path
47471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47472  # take no chances and rewrite it.
47473  # Note: m4 eats our [], so we need to use [ and ] instead.
47474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47475  if test "x$has_forbidden_chars" != x; then
47476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47478  fi
47479
47480
47481  windows_path="$new_path"
47482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47483    unix_path=`$CYGPATH -u "$windows_path"`
47484    new_path="$unix_path"
47485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47487    new_path="$unix_path"
47488  fi
47489
47490  if test "x$path" != "x$new_path"; then
47491    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47494  fi
47495
47496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47498
47499    else
47500      # We're on a unix platform. Hooray! :)
47501      path="$POTENTIAL_FREETYPE_LIB_PATH"
47502      has_space=`$ECHO "$path" | $GREP " "`
47503      if test "x$has_space" != x; then
47504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47507      fi
47508
47509      # Use eval to expand a potential ~
47510      eval path="$path"
47511      if test ! -f "$path" && test ! -d "$path"; then
47512        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47513      fi
47514
47515      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47516    fi
47517  fi
47518
47519
47520    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47522$as_echo_n "checking for freetype includes... " >&6; }
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47524$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47525    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47527$as_echo_n "checking for freetype libraries... " >&6; }
47528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47529$as_echo "$FREETYPE_LIB_PATH" >&6; }
47530  fi
47531
47532          fi
47533
47534          if test "x$FOUND_FREETYPE" != xyes; then
47535            FREETYPE_BASE_DIR="$SYSROOT/usr"
47536            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47537
47538  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47539  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47540  METHOD="well-known location"
47541
47542  # Let's start with an optimistic view of the world :-)
47543  FOUND_FREETYPE=yes
47544
47545  # First look for the canonical freetype main include file ft2build.h.
47546  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47547    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47548    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47549    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47550      # Fail.
47551      FOUND_FREETYPE=no
47552    fi
47553  fi
47554
47555  if test "x$FOUND_FREETYPE" = xyes; then
47556    # Include file found, let's continue the sanity check.
47557    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47558$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47559
47560    # Reset to default value
47561    FREETYPE_BASE_NAME=freetype
47562    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47563    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47564      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47565          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47566        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47567        # for the .6 version explicitly.
47568        FREETYPE_BASE_NAME=freetype.6
47569        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47570        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47571$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47572      else
47573        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47574$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47575        FOUND_FREETYPE=no
47576      fi
47577    else
47578      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47579        # On Windows, we will need both .lib and .dll file.
47580        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47581          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47582$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47583          FOUND_FREETYPE=no
47584        fi
47585      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47586          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47587        # Found lib in isa dir, use that instead.
47588        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47589        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47590$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47591      fi
47592    fi
47593  fi
47594
47595  if test "x$FOUND_FREETYPE" = xyes; then
47596
47597  # Only process if variable expands to non-empty
47598
47599  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47601
47602  # Input might be given as Windows format, start by converting to
47603  # unix format.
47604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47605  new_path=`$CYGPATH -u "$path"`
47606
47607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47610  # "foo.exe" is OK but "foo" is an error.
47611  #
47612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47613  # It is also a way to make sure we got the proper file name for the real test later on.
47614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47615  if test "x$test_shortpath" = x; then
47616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47618    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47619  fi
47620
47621  # Call helper function which possibly converts this using DOS-style short mode.
47622  # If so, the updated path is stored in $new_path.
47623
47624  input_path="$new_path"
47625  # Check if we need to convert this using DOS-style short mode. If the path
47626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47627  # take no chances and rewrite it.
47628  # Note: m4 eats our [], so we need to use [ and ] instead.
47629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47630  if test "x$has_forbidden_chars" != x; then
47631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47635      # Going to short mode and back again did indeed matter. Since short mode is
47636      # case insensitive, let's make it lowercase to improve readability.
47637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47638      # Now convert it back to Unix-style (cygpath)
47639      input_path=`$CYGPATH -u "$shortmode_path"`
47640      new_path="$input_path"
47641    fi
47642  fi
47643
47644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47645  if test "x$test_cygdrive_prefix" = x; then
47646    # As a simple fix, exclude /usr/bin since it's not a real path.
47647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47649      # a path prefixed by /cygdrive for fixpath to work.
47650      new_path="$CYGWIN_ROOT_PATH$input_path"
47651    fi
47652  fi
47653
47654
47655  if test "x$path" != "x$new_path"; then
47656    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47659  fi
47660
47661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47662
47663  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47664  has_colon=`$ECHO $path | $GREP ^.:`
47665  new_path="$path"
47666  if test "x$has_colon" = x; then
47667    # Not in mixed or Windows style, start by that.
47668    new_path=`cmd //c echo $path`
47669  fi
47670
47671
47672  input_path="$new_path"
47673  # Check if we need to convert this using DOS-style short mode. If the path
47674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47675  # take no chances and rewrite it.
47676  # Note: m4 eats our [], so we need to use [ and ] instead.
47677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47678  if test "x$has_forbidden_chars" != x; then
47679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47681  fi
47682
47683
47684  windows_path="$new_path"
47685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47686    unix_path=`$CYGPATH -u "$windows_path"`
47687    new_path="$unix_path"
47688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47690    new_path="$unix_path"
47691  fi
47692
47693  if test "x$path" != "x$new_path"; then
47694    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47697  fi
47698
47699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47701
47702    else
47703      # We're on a unix platform. Hooray! :)
47704      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47705      has_space=`$ECHO "$path" | $GREP " "`
47706      if test "x$has_space" != x; then
47707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47710      fi
47711
47712      # Use eval to expand a potential ~
47713      eval path="$path"
47714      if test ! -f "$path" && test ! -d "$path"; then
47715        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47716      fi
47717
47718      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47719    fi
47720  fi
47721
47722
47723  # Only process if variable expands to non-empty
47724
47725  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47727
47728  # Input might be given as Windows format, start by converting to
47729  # unix format.
47730  path="$POTENTIAL_FREETYPE_LIB_PATH"
47731  new_path=`$CYGPATH -u "$path"`
47732
47733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47736  # "foo.exe" is OK but "foo" is an error.
47737  #
47738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47739  # It is also a way to make sure we got the proper file name for the real test later on.
47740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47741  if test "x$test_shortpath" = x; then
47742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47744    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47745  fi
47746
47747  # Call helper function which possibly converts this using DOS-style short mode.
47748  # If so, the updated path is stored in $new_path.
47749
47750  input_path="$new_path"
47751  # Check if we need to convert this using DOS-style short mode. If the path
47752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47753  # take no chances and rewrite it.
47754  # Note: m4 eats our [], so we need to use [ and ] instead.
47755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47756  if test "x$has_forbidden_chars" != x; then
47757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47761      # Going to short mode and back again did indeed matter. Since short mode is
47762      # case insensitive, let's make it lowercase to improve readability.
47763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47764      # Now convert it back to Unix-style (cygpath)
47765      input_path=`$CYGPATH -u "$shortmode_path"`
47766      new_path="$input_path"
47767    fi
47768  fi
47769
47770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47771  if test "x$test_cygdrive_prefix" = x; then
47772    # As a simple fix, exclude /usr/bin since it's not a real path.
47773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47775      # a path prefixed by /cygdrive for fixpath to work.
47776      new_path="$CYGWIN_ROOT_PATH$input_path"
47777    fi
47778  fi
47779
47780
47781  if test "x$path" != "x$new_path"; then
47782    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47785  fi
47786
47787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47788
47789  path="$POTENTIAL_FREETYPE_LIB_PATH"
47790  has_colon=`$ECHO $path | $GREP ^.:`
47791  new_path="$path"
47792  if test "x$has_colon" = x; then
47793    # Not in mixed or Windows style, start by that.
47794    new_path=`cmd //c echo $path`
47795  fi
47796
47797
47798  input_path="$new_path"
47799  # Check if we need to convert this using DOS-style short mode. If the path
47800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47801  # take no chances and rewrite it.
47802  # Note: m4 eats our [], so we need to use [ and ] instead.
47803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47804  if test "x$has_forbidden_chars" != x; then
47805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47807  fi
47808
47809
47810  windows_path="$new_path"
47811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47812    unix_path=`$CYGPATH -u "$windows_path"`
47813    new_path="$unix_path"
47814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47816    new_path="$unix_path"
47817  fi
47818
47819  if test "x$path" != "x$new_path"; then
47820    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47823  fi
47824
47825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47827
47828    else
47829      # We're on a unix platform. Hooray! :)
47830      path="$POTENTIAL_FREETYPE_LIB_PATH"
47831      has_space=`$ECHO "$path" | $GREP " "`
47832      if test "x$has_space" != x; then
47833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47835        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47836      fi
47837
47838      # Use eval to expand a potential ~
47839      eval path="$path"
47840      if test ! -f "$path" && test ! -d "$path"; then
47841        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47842      fi
47843
47844      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47845    fi
47846  fi
47847
47848
47849    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47851$as_echo_n "checking for freetype includes... " >&6; }
47852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47853$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47854    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47856$as_echo_n "checking for freetype libraries... " >&6; }
47857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47858$as_echo "$FREETYPE_LIB_PATH" >&6; }
47859  fi
47860
47861            else
47862
47863  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47864  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47865  METHOD="well-known location"
47866
47867  # Let's start with an optimistic view of the world :-)
47868  FOUND_FREETYPE=yes
47869
47870  # First look for the canonical freetype main include file ft2build.h.
47871  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47872    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47873    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47874    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47875      # Fail.
47876      FOUND_FREETYPE=no
47877    fi
47878  fi
47879
47880  if test "x$FOUND_FREETYPE" = xyes; then
47881    # Include file found, let's continue the sanity check.
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47883$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47884
47885    # Reset to default value
47886    FREETYPE_BASE_NAME=freetype
47887    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47888    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47889      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47890          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47891        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47892        # for the .6 version explicitly.
47893        FREETYPE_BASE_NAME=freetype.6
47894        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47895        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47896$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47897      else
47898        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47899$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47900        FOUND_FREETYPE=no
47901      fi
47902    else
47903      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47904        # On Windows, we will need both .lib and .dll file.
47905        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47906          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47907$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47908          FOUND_FREETYPE=no
47909        fi
47910      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47911          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47912        # Found lib in isa dir, use that instead.
47913        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47914        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47915$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47916      fi
47917    fi
47918  fi
47919
47920  if test "x$FOUND_FREETYPE" = xyes; then
47921
47922  # Only process if variable expands to non-empty
47923
47924  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47926
47927  # Input might be given as Windows format, start by converting to
47928  # unix format.
47929  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47930  new_path=`$CYGPATH -u "$path"`
47931
47932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47935  # "foo.exe" is OK but "foo" is an error.
47936  #
47937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47938  # It is also a way to make sure we got the proper file name for the real test later on.
47939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47940  if test "x$test_shortpath" = x; then
47941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47943    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47944  fi
47945
47946  # Call helper function which possibly converts this using DOS-style short mode.
47947  # If so, the updated path is stored in $new_path.
47948
47949  input_path="$new_path"
47950  # Check if we need to convert this using DOS-style short mode. If the path
47951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47952  # take no chances and rewrite it.
47953  # Note: m4 eats our [], so we need to use [ and ] instead.
47954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47955  if test "x$has_forbidden_chars" != x; then
47956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47960      # Going to short mode and back again did indeed matter. Since short mode is
47961      # case insensitive, let's make it lowercase to improve readability.
47962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47963      # Now convert it back to Unix-style (cygpath)
47964      input_path=`$CYGPATH -u "$shortmode_path"`
47965      new_path="$input_path"
47966    fi
47967  fi
47968
47969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47970  if test "x$test_cygdrive_prefix" = x; then
47971    # As a simple fix, exclude /usr/bin since it's not a real path.
47972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47974      # a path prefixed by /cygdrive for fixpath to work.
47975      new_path="$CYGWIN_ROOT_PATH$input_path"
47976    fi
47977  fi
47978
47979
47980  if test "x$path" != "x$new_path"; then
47981    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47983$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47984  fi
47985
47986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47987
47988  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47989  has_colon=`$ECHO $path | $GREP ^.:`
47990  new_path="$path"
47991  if test "x$has_colon" = x; then
47992    # Not in mixed or Windows style, start by that.
47993    new_path=`cmd //c echo $path`
47994  fi
47995
47996
47997  input_path="$new_path"
47998  # Check if we need to convert this using DOS-style short mode. If the path
47999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48000  # take no chances and rewrite it.
48001  # Note: m4 eats our [], so we need to use [ and ] instead.
48002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48003  if test "x$has_forbidden_chars" != x; then
48004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48006  fi
48007
48008
48009  windows_path="$new_path"
48010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48011    unix_path=`$CYGPATH -u "$windows_path"`
48012    new_path="$unix_path"
48013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48015    new_path="$unix_path"
48016  fi
48017
48018  if test "x$path" != "x$new_path"; then
48019    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48021$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48022  fi
48023
48024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48026
48027    else
48028      # We're on a unix platform. Hooray! :)
48029      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48030      has_space=`$ECHO "$path" | $GREP " "`
48031      if test "x$has_space" != x; then
48032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48034        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48035      fi
48036
48037      # Use eval to expand a potential ~
48038      eval path="$path"
48039      if test ! -f "$path" && test ! -d "$path"; then
48040        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48041      fi
48042
48043      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48044    fi
48045  fi
48046
48047
48048  # Only process if variable expands to non-empty
48049
48050  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48052
48053  # Input might be given as Windows format, start by converting to
48054  # unix format.
48055  path="$POTENTIAL_FREETYPE_LIB_PATH"
48056  new_path=`$CYGPATH -u "$path"`
48057
48058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48061  # "foo.exe" is OK but "foo" is an error.
48062  #
48063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48064  # It is also a way to make sure we got the proper file name for the real test later on.
48065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48066  if test "x$test_shortpath" = x; then
48067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48069    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48070  fi
48071
48072  # Call helper function which possibly converts this using DOS-style short mode.
48073  # If so, the updated path is stored in $new_path.
48074
48075  input_path="$new_path"
48076  # Check if we need to convert this using DOS-style short mode. If the path
48077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48078  # take no chances and rewrite it.
48079  # Note: m4 eats our [], so we need to use [ and ] instead.
48080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48081  if test "x$has_forbidden_chars" != x; then
48082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48086      # Going to short mode and back again did indeed matter. Since short mode is
48087      # case insensitive, let's make it lowercase to improve readability.
48088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48089      # Now convert it back to Unix-style (cygpath)
48090      input_path=`$CYGPATH -u "$shortmode_path"`
48091      new_path="$input_path"
48092    fi
48093  fi
48094
48095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48096  if test "x$test_cygdrive_prefix" = x; then
48097    # As a simple fix, exclude /usr/bin since it's not a real path.
48098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48100      # a path prefixed by /cygdrive for fixpath to work.
48101      new_path="$CYGWIN_ROOT_PATH$input_path"
48102    fi
48103  fi
48104
48105
48106  if test "x$path" != "x$new_path"; then
48107    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48110  fi
48111
48112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48113
48114  path="$POTENTIAL_FREETYPE_LIB_PATH"
48115  has_colon=`$ECHO $path | $GREP ^.:`
48116  new_path="$path"
48117  if test "x$has_colon" = x; then
48118    # Not in mixed or Windows style, start by that.
48119    new_path=`cmd //c echo $path`
48120  fi
48121
48122
48123  input_path="$new_path"
48124  # Check if we need to convert this using DOS-style short mode. If the path
48125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48126  # take no chances and rewrite it.
48127  # Note: m4 eats our [], so we need to use [ and ] instead.
48128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48129  if test "x$has_forbidden_chars" != x; then
48130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48132  fi
48133
48134
48135  windows_path="$new_path"
48136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48137    unix_path=`$CYGPATH -u "$windows_path"`
48138    new_path="$unix_path"
48139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48141    new_path="$unix_path"
48142  fi
48143
48144  if test "x$path" != "x$new_path"; then
48145    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48148  fi
48149
48150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48152
48153    else
48154      # We're on a unix platform. Hooray! :)
48155      path="$POTENTIAL_FREETYPE_LIB_PATH"
48156      has_space=`$ECHO "$path" | $GREP " "`
48157      if test "x$has_space" != x; then
48158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48161      fi
48162
48163      # Use eval to expand a potential ~
48164      eval path="$path"
48165      if test ! -f "$path" && test ! -d "$path"; then
48166        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48167      fi
48168
48169      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48170    fi
48171  fi
48172
48173
48174    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48176$as_echo_n "checking for freetype includes... " >&6; }
48177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48178$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48179    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48181$as_echo_n "checking for freetype libraries... " >&6; }
48182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48183$as_echo "$FREETYPE_LIB_PATH" >&6; }
48184  fi
48185
48186              if test "x$FOUND_FREETYPE" != xyes; then
48187
48188  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48189  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
48190  METHOD="well-known location"
48191
48192  # Let's start with an optimistic view of the world :-)
48193  FOUND_FREETYPE=yes
48194
48195  # First look for the canonical freetype main include file ft2build.h.
48196  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48197    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48198    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48199    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48200      # Fail.
48201      FOUND_FREETYPE=no
48202    fi
48203  fi
48204
48205  if test "x$FOUND_FREETYPE" = xyes; then
48206    # Include file found, let's continue the sanity check.
48207    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48208$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48209
48210    # Reset to default value
48211    FREETYPE_BASE_NAME=freetype
48212    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48213    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48214      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48215          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48216        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48217        # for the .6 version explicitly.
48218        FREETYPE_BASE_NAME=freetype.6
48219        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48220        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48221$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48222      else
48223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48224$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48225        FOUND_FREETYPE=no
48226      fi
48227    else
48228      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48229        # On Windows, we will need both .lib and .dll file.
48230        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48231          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48232$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48233          FOUND_FREETYPE=no
48234        fi
48235      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48236          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48237        # Found lib in isa dir, use that instead.
48238        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48239        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48240$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48241      fi
48242    fi
48243  fi
48244
48245  if test "x$FOUND_FREETYPE" = xyes; then
48246
48247  # Only process if variable expands to non-empty
48248
48249  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48251
48252  # Input might be given as Windows format, start by converting to
48253  # unix format.
48254  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48255  new_path=`$CYGPATH -u "$path"`
48256
48257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48260  # "foo.exe" is OK but "foo" is an error.
48261  #
48262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48263  # It is also a way to make sure we got the proper file name for the real test later on.
48264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48265  if test "x$test_shortpath" = x; then
48266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48267$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48268    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48269  fi
48270
48271  # Call helper function which possibly converts this using DOS-style short mode.
48272  # If so, the updated path is stored in $new_path.
48273
48274  input_path="$new_path"
48275  # Check if we need to convert this using DOS-style short mode. If the path
48276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48277  # take no chances and rewrite it.
48278  # Note: m4 eats our [], so we need to use [ and ] instead.
48279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48280  if test "x$has_forbidden_chars" != x; then
48281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48285      # Going to short mode and back again did indeed matter. Since short mode is
48286      # case insensitive, let's make it lowercase to improve readability.
48287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48288      # Now convert it back to Unix-style (cygpath)
48289      input_path=`$CYGPATH -u "$shortmode_path"`
48290      new_path="$input_path"
48291    fi
48292  fi
48293
48294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48295  if test "x$test_cygdrive_prefix" = x; then
48296    # As a simple fix, exclude /usr/bin since it's not a real path.
48297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48299      # a path prefixed by /cygdrive for fixpath to work.
48300      new_path="$CYGWIN_ROOT_PATH$input_path"
48301    fi
48302  fi
48303
48304
48305  if test "x$path" != "x$new_path"; then
48306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48309  fi
48310
48311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48312
48313  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48314  has_colon=`$ECHO $path | $GREP ^.:`
48315  new_path="$path"
48316  if test "x$has_colon" = x; then
48317    # Not in mixed or Windows style, start by that.
48318    new_path=`cmd //c echo $path`
48319  fi
48320
48321
48322  input_path="$new_path"
48323  # Check if we need to convert this using DOS-style short mode. If the path
48324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48325  # take no chances and rewrite it.
48326  # Note: m4 eats our [], so we need to use [ and ] instead.
48327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48328  if test "x$has_forbidden_chars" != x; then
48329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48331  fi
48332
48333
48334  windows_path="$new_path"
48335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48336    unix_path=`$CYGPATH -u "$windows_path"`
48337    new_path="$unix_path"
48338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48340    new_path="$unix_path"
48341  fi
48342
48343  if test "x$path" != "x$new_path"; then
48344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48347  fi
48348
48349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48351
48352    else
48353      # We're on a unix platform. Hooray! :)
48354      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48355      has_space=`$ECHO "$path" | $GREP " "`
48356      if test "x$has_space" != x; then
48357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48360      fi
48361
48362      # Use eval to expand a potential ~
48363      eval path="$path"
48364      if test ! -f "$path" && test ! -d "$path"; then
48365        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48366      fi
48367
48368      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48369    fi
48370  fi
48371
48372
48373  # Only process if variable expands to non-empty
48374
48375  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48377
48378  # Input might be given as Windows format, start by converting to
48379  # unix format.
48380  path="$POTENTIAL_FREETYPE_LIB_PATH"
48381  new_path=`$CYGPATH -u "$path"`
48382
48383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48386  # "foo.exe" is OK but "foo" is an error.
48387  #
48388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48389  # It is also a way to make sure we got the proper file name for the real test later on.
48390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48391  if test "x$test_shortpath" = x; then
48392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48394    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48395  fi
48396
48397  # Call helper function which possibly converts this using DOS-style short mode.
48398  # If so, the updated path is stored in $new_path.
48399
48400  input_path="$new_path"
48401  # Check if we need to convert this using DOS-style short mode. If the path
48402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48403  # take no chances and rewrite it.
48404  # Note: m4 eats our [], so we need to use [ and ] instead.
48405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48406  if test "x$has_forbidden_chars" != x; then
48407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48411      # Going to short mode and back again did indeed matter. Since short mode is
48412      # case insensitive, let's make it lowercase to improve readability.
48413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48414      # Now convert it back to Unix-style (cygpath)
48415      input_path=`$CYGPATH -u "$shortmode_path"`
48416      new_path="$input_path"
48417    fi
48418  fi
48419
48420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48421  if test "x$test_cygdrive_prefix" = x; then
48422    # As a simple fix, exclude /usr/bin since it's not a real path.
48423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48425      # a path prefixed by /cygdrive for fixpath to work.
48426      new_path="$CYGWIN_ROOT_PATH$input_path"
48427    fi
48428  fi
48429
48430
48431  if test "x$path" != "x$new_path"; then
48432    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48435  fi
48436
48437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48438
48439  path="$POTENTIAL_FREETYPE_LIB_PATH"
48440  has_colon=`$ECHO $path | $GREP ^.:`
48441  new_path="$path"
48442  if test "x$has_colon" = x; then
48443    # Not in mixed or Windows style, start by that.
48444    new_path=`cmd //c echo $path`
48445  fi
48446
48447
48448  input_path="$new_path"
48449  # Check if we need to convert this using DOS-style short mode. If the path
48450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48451  # take no chances and rewrite it.
48452  # Note: m4 eats our [], so we need to use [ and ] instead.
48453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48454  if test "x$has_forbidden_chars" != x; then
48455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48457  fi
48458
48459
48460  windows_path="$new_path"
48461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48462    unix_path=`$CYGPATH -u "$windows_path"`
48463    new_path="$unix_path"
48464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48466    new_path="$unix_path"
48467  fi
48468
48469  if test "x$path" != "x$new_path"; then
48470    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48473  fi
48474
48475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48477
48478    else
48479      # We're on a unix platform. Hooray! :)
48480      path="$POTENTIAL_FREETYPE_LIB_PATH"
48481      has_space=`$ECHO "$path" | $GREP " "`
48482      if test "x$has_space" != x; then
48483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48485        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48486      fi
48487
48488      # Use eval to expand a potential ~
48489      eval path="$path"
48490      if test ! -f "$path" && test ! -d "$path"; then
48491        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48492      fi
48493
48494      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48495    fi
48496  fi
48497
48498
48499    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48501$as_echo_n "checking for freetype includes... " >&6; }
48502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48503$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48504    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48506$as_echo_n "checking for freetype libraries... " >&6; }
48507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48508$as_echo "$FREETYPE_LIB_PATH" >&6; }
48509  fi
48510
48511              fi
48512            fi
48513          fi
48514        fi
48515      fi # end check in well-known locations
48516
48517      if test "x$FOUND_FREETYPE" != xyes; then
48518
48519  # Print a helpful message on how to acquire the necessary build dependency.
48520  # freetype is the help tag: freetype, cups, pulse, alsa etc
48521  MISSING_DEPENDENCY=freetype
48522
48523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48524    cygwin_help $MISSING_DEPENDENCY
48525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48526    msys_help $MISSING_DEPENDENCY
48527  else
48528    PKGHANDLER_COMMAND=
48529
48530    case $PKGHANDLER in
48531      apt-get)
48532        apt_help     $MISSING_DEPENDENCY ;;
48533      yum)
48534        yum_help     $MISSING_DEPENDENCY ;;
48535      port)
48536        port_help    $MISSING_DEPENDENCY ;;
48537      pkgutil)
48538        pkgutil_help $MISSING_DEPENDENCY ;;
48539      pkgadd)
48540        pkgadd_help  $MISSING_DEPENDENCY ;;
48541    esac
48542
48543    if test "x$PKGHANDLER_COMMAND" != x; then
48544      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48545    fi
48546  fi
48547
48548        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48549      fi
48550    fi # end user specified settings
48551
48552    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48553    if test "x$FREETYPE_CFLAGS" = x; then
48554
48555  # Only process if variable expands to non-empty
48556
48557  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48559
48560  # Input might be given as Windows format, start by converting to
48561  # unix format.
48562  path="$FREETYPE_INCLUDE_PATH"
48563  new_path=`$CYGPATH -u "$path"`
48564
48565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48568  # "foo.exe" is OK but "foo" is an error.
48569  #
48570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48571  # It is also a way to make sure we got the proper file name for the real test later on.
48572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48573  if test "x$test_shortpath" = x; then
48574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48575$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48576    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48577  fi
48578
48579  # Call helper function which possibly converts this using DOS-style short mode.
48580  # If so, the updated path is stored in $new_path.
48581
48582  input_path="$new_path"
48583  # Check if we need to convert this using DOS-style short mode. If the path
48584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48585  # take no chances and rewrite it.
48586  # Note: m4 eats our [], so we need to use [ and ] instead.
48587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48588  if test "x$has_forbidden_chars" != x; then
48589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48593      # Going to short mode and back again did indeed matter. Since short mode is
48594      # case insensitive, let's make it lowercase to improve readability.
48595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48596      # Now convert it back to Unix-style (cygpath)
48597      input_path=`$CYGPATH -u "$shortmode_path"`
48598      new_path="$input_path"
48599    fi
48600  fi
48601
48602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48603  if test "x$test_cygdrive_prefix" = x; then
48604    # As a simple fix, exclude /usr/bin since it's not a real path.
48605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48607      # a path prefixed by /cygdrive for fixpath to work.
48608      new_path="$CYGWIN_ROOT_PATH$input_path"
48609    fi
48610  fi
48611
48612
48613  if test "x$path" != "x$new_path"; then
48614    FREETYPE_INCLUDE_PATH="$new_path"
48615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48616$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48617  fi
48618
48619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48620
48621  path="$FREETYPE_INCLUDE_PATH"
48622  has_colon=`$ECHO $path | $GREP ^.:`
48623  new_path="$path"
48624  if test "x$has_colon" = x; then
48625    # Not in mixed or Windows style, start by that.
48626    new_path=`cmd //c echo $path`
48627  fi
48628
48629
48630  input_path="$new_path"
48631  # Check if we need to convert this using DOS-style short mode. If the path
48632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48633  # take no chances and rewrite it.
48634  # Note: m4 eats our [], so we need to use [ and ] instead.
48635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48636  if test "x$has_forbidden_chars" != x; then
48637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48639  fi
48640
48641
48642  windows_path="$new_path"
48643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48644    unix_path=`$CYGPATH -u "$windows_path"`
48645    new_path="$unix_path"
48646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48648    new_path="$unix_path"
48649  fi
48650
48651  if test "x$path" != "x$new_path"; then
48652    FREETYPE_INCLUDE_PATH="$new_path"
48653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48654$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48655  fi
48656
48657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48659
48660    else
48661      # We're on a unix platform. Hooray! :)
48662      path="$FREETYPE_INCLUDE_PATH"
48663      has_space=`$ECHO "$path" | $GREP " "`
48664      if test "x$has_space" != x; then
48665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48666$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48668      fi
48669
48670      # Use eval to expand a potential ~
48671      eval path="$path"
48672      if test ! -f "$path" && test ! -d "$path"; then
48673        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48674      fi
48675
48676      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48677    fi
48678  fi
48679
48680      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48681        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48682      else
48683        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48684      fi
48685    fi
48686
48687    if test "x$FREETYPE_LIBS" = x; then
48688
48689  # Only process if variable expands to non-empty
48690
48691  if test "x$FREETYPE_LIB_PATH" != x; then
48692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48693
48694  # Input might be given as Windows format, start by converting to
48695  # unix format.
48696  path="$FREETYPE_LIB_PATH"
48697  new_path=`$CYGPATH -u "$path"`
48698
48699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48702  # "foo.exe" is OK but "foo" is an error.
48703  #
48704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48705  # It is also a way to make sure we got the proper file name for the real test later on.
48706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48707  if test "x$test_shortpath" = x; then
48708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48709$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48710    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48711  fi
48712
48713  # Call helper function which possibly converts this using DOS-style short mode.
48714  # If so, the updated path is stored in $new_path.
48715
48716  input_path="$new_path"
48717  # Check if we need to convert this using DOS-style short mode. If the path
48718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48719  # take no chances and rewrite it.
48720  # Note: m4 eats our [], so we need to use [ and ] instead.
48721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48722  if test "x$has_forbidden_chars" != x; then
48723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48727      # Going to short mode and back again did indeed matter. Since short mode is
48728      # case insensitive, let's make it lowercase to improve readability.
48729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48730      # Now convert it back to Unix-style (cygpath)
48731      input_path=`$CYGPATH -u "$shortmode_path"`
48732      new_path="$input_path"
48733    fi
48734  fi
48735
48736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48737  if test "x$test_cygdrive_prefix" = x; then
48738    # As a simple fix, exclude /usr/bin since it's not a real path.
48739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48741      # a path prefixed by /cygdrive for fixpath to work.
48742      new_path="$CYGWIN_ROOT_PATH$input_path"
48743    fi
48744  fi
48745
48746
48747  if test "x$path" != "x$new_path"; then
48748    FREETYPE_LIB_PATH="$new_path"
48749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48750$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48751  fi
48752
48753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48754
48755  path="$FREETYPE_LIB_PATH"
48756  has_colon=`$ECHO $path | $GREP ^.:`
48757  new_path="$path"
48758  if test "x$has_colon" = x; then
48759    # Not in mixed or Windows style, start by that.
48760    new_path=`cmd //c echo $path`
48761  fi
48762
48763
48764  input_path="$new_path"
48765  # Check if we need to convert this using DOS-style short mode. If the path
48766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48767  # take no chances and rewrite it.
48768  # Note: m4 eats our [], so we need to use [ and ] instead.
48769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48770  if test "x$has_forbidden_chars" != x; then
48771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48773  fi
48774
48775
48776  windows_path="$new_path"
48777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48778    unix_path=`$CYGPATH -u "$windows_path"`
48779    new_path="$unix_path"
48780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48782    new_path="$unix_path"
48783  fi
48784
48785  if test "x$path" != "x$new_path"; then
48786    FREETYPE_LIB_PATH="$new_path"
48787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48788$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48789  fi
48790
48791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48793
48794    else
48795      # We're on a unix platform. Hooray! :)
48796      path="$FREETYPE_LIB_PATH"
48797      has_space=`$ECHO "$path" | $GREP " "`
48798      if test "x$has_space" != x; then
48799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48800$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48802      fi
48803
48804      # Use eval to expand a potential ~
48805      eval path="$path"
48806      if test ! -f "$path" && test ! -d "$path"; then
48807        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48808      fi
48809
48810      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48811    fi
48812  fi
48813
48814      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48815        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48816      else
48817        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48818      fi
48819    fi
48820
48821    # Try to compile it
48822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48823$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48824    ac_ext=cpp
48825ac_cpp='$CXXCPP $CPPFLAGS'
48826ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48827ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48828ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48829
48830    PREV_CXXCFLAGS="$CXXFLAGS"
48831    PREV_LIBS="$LIBS"
48832    PREV_CXX="$CXX"
48833    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48834    LIBS="$LIBS $FREETYPE_LIBS"
48835    CXX="$FIXPATH $CXX"
48836    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48837/* end confdefs.h.  */
48838
48839          #include<ft2build.h>
48840          #include FT_FREETYPE_H
48841          int main () {
48842            FT_Init_FreeType(NULL);
48843            return 0;
48844          }
48845
48846_ACEOF
48847if ac_fn_cxx_try_link "$LINENO"; then :
48848
48849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48850$as_echo "yes" >&6; }
48851
48852else
48853
48854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48855$as_echo "no" >&6; }
48856          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48857$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48858          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48859$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48860
48861
48862  # Print a helpful message on how to acquire the necessary build dependency.
48863  # freetype is the help tag: freetype, cups, pulse, alsa etc
48864  MISSING_DEPENDENCY=freetype
48865
48866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48867    cygwin_help $MISSING_DEPENDENCY
48868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48869    msys_help $MISSING_DEPENDENCY
48870  else
48871    PKGHANDLER_COMMAND=
48872
48873    case $PKGHANDLER in
48874      apt-get)
48875        apt_help     $MISSING_DEPENDENCY ;;
48876      yum)
48877        yum_help     $MISSING_DEPENDENCY ;;
48878      port)
48879        port_help    $MISSING_DEPENDENCY ;;
48880      pkgutil)
48881        pkgutil_help $MISSING_DEPENDENCY ;;
48882      pkgadd)
48883        pkgadd_help  $MISSING_DEPENDENCY ;;
48884    esac
48885
48886    if test "x$PKGHANDLER_COMMAND" != x; then
48887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48888    fi
48889  fi
48890
48891
48892          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48893
48894
48895fi
48896rm -f core conftest.err conftest.$ac_objext \
48897    conftest$ac_exeext conftest.$ac_ext
48898    CXXCFLAGS="$PREV_CXXFLAGS"
48899    LIBS="$PREV_LIBS"
48900    CXX="$PREV_CXX"
48901    ac_ext=cpp
48902ac_cpp='$CXXCPP $CPPFLAGS'
48903ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48904ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48905ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48906
48907
48908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48909$as_echo_n "checking if we should bundle freetype... " >&6; }
48910    if test "x$BUNDLE_FREETYPE" = xyes; then
48911      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48912    fi
48913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48914$as_echo "$BUNDLE_FREETYPE" >&6; }
48915
48916  fi # end freetype needed
48917
48918
48919
48920
48921
48922
48923
48924  ###############################################################################
48925  #
48926  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48927  #
48928
48929# Check whether --with-alsa was given.
48930if test "${with_alsa+set}" = set; then :
48931  withval=$with_alsa;
48932fi
48933
48934
48935# Check whether --with-alsa-include was given.
48936if test "${with_alsa_include+set}" = set; then :
48937  withval=$with_alsa_include;
48938fi
48939
48940
48941# Check whether --with-alsa-lib was given.
48942if test "${with_alsa_lib+set}" = set; then :
48943  withval=$with_alsa_lib;
48944fi
48945
48946
48947  if test "x$ALSA_NOT_NEEDED" = xyes; then
48948    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48949      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48950$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48951    fi
48952    ALSA_CFLAGS=
48953    ALSA_LIBS=
48954  else
48955    ALSA_FOUND=no
48956
48957    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48958      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48959    fi
48960
48961    if test "x${with_alsa}" != x; then
48962      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48963      ALSA_CFLAGS="-I${with_alsa}/include"
48964      ALSA_FOUND=yes
48965    fi
48966    if test "x${with_alsa_include}" != x; then
48967      ALSA_CFLAGS="-I${with_alsa_include}"
48968      ALSA_FOUND=yes
48969    fi
48970    if test "x${with_alsa_lib}" != x; then
48971      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48972      ALSA_FOUND=yes
48973    fi
48974    if test "x$ALSA_FOUND" = xno; then
48975
48976
48977  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48978    # Source the builddeps file again, to make sure it uses the latest variables!
48979    . $builddepsfile
48980    # Look for a target and build machine specific resource!
48981    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48982    if test "x$resource" = x; then
48983      # Ok, lets instead look for a target specific resource
48984      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48985    fi
48986    if test "x$resource" = x; then
48987      # Ok, lets instead look for a build specific resource
48988      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48989    fi
48990    if test "x$resource" = x; then
48991      # Ok, lets instead look for a generic resource
48992      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48993      resource=${builddep_alsa}
48994    fi
48995    if test "x$resource" != x; then
48996      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48997$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48998      # If the resource in the builddeps.conf file is an existing directory,
48999      # for example /java/linux/cups
49000      if test -d ${resource}; then
49001        depdir=${resource}
49002      else
49003
49004  # alsa is for example mymodule
49005  # $resource is for example libs/general/libmymod_1_2_3.zip
49006  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
49007  # $with_builddeps_dir is for example /localhome/builddeps
49008  # depdir is the name of the variable into which we store the depdir, eg MYMOD
49009  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
49010  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
49011  filename=`basename $resource`
49012  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
49013  filebase=${filename%%.*}
49014  extension=${filename#*.}
49015  installdir=$with_builddeps_dir/$filebase
49016  if test ! -f $installdir/$filename.unpacked; then
49017    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
49018$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
49019    if test ! -d $installdir; then
49020      mkdir -p $installdir
49021    fi
49022    if test ! -d $installdir; then
49023      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
49024    fi
49025    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
49026    touch $tmpfile
49027    if test ! -f $tmpfile; then
49028      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
49029    fi
49030
49031  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
49032  # $tmpfile is the local file name for the downloaded file.
49033  VALID_TOOL=no
49034  if test "x$BDEPS_FTP" = xwget; then
49035    VALID_TOOL=yes
49036    wget -O $tmpfile $with_builddeps_server/$resource
49037  fi
49038  if test "x$BDEPS_FTP" = xlftp; then
49039    VALID_TOOL=yes
49040    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
49041  fi
49042  if test "x$BDEPS_FTP" = xftp; then
49043    VALID_TOOL=yes
49044    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
49045    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
49046    FTPUSERPWD=${FTPSERVER%%@*}
49047    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
49048      FTPUSER=${userpwd%%:*}
49049      FTPPWD=${userpwd#*@}
49050      FTPSERVER=${FTPSERVER#*@}
49051    else
49052      FTPUSER=ftp
49053      FTPPWD=ftp
49054    fi
49055    # the "pass" command does not work on some
49056    # ftp clients (read ftp.exe) but if it works,
49057    # passive mode is better!
49058    ( \
49059        echo "user $FTPUSER $FTPPWD"        ; \
49060        echo "pass"                         ; \
49061        echo "bin"                          ; \
49062        echo "get $FTPPATH $tmpfile"              ; \
49063    ) | ftp -in $FTPSERVER
49064  fi
49065  if test "x$VALID_TOOL" != xyes; then
49066    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
49067  fi
49068
49069    mv $tmpfile $installdir/$filename
49070    if test ! -s $installdir/$filename; then
49071      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
49072    fi
49073    case "$extension" in
49074      zip)  echo "Unzipping $installdir/$filename..."
49075        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
49076        ;;
49077      tar.gz) echo "Untaring $installdir/$filename..."
49078        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49079        ;;
49080      tgz) echo "Untaring $installdir/$filename..."
49081        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49082        ;;
49083      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
49084        ;;
49085    esac
49086  fi
49087  if test -f $installdir/$filename.unpacked; then
49088    depdir=$installdir
49089  fi
49090
49091      fi
49092      # Source the builddeps file again, because in the previous command, the depdir
49093      # was updated to point at the current build dependency install directory.
49094      . $builddepsfile
49095      # Now extract variables from the builddeps.conf files.
49096      theroot=${builddep_alsa_ROOT}
49097      thecflags=${builddep_alsa_CFLAGS}
49098      thelibs=${builddep_alsa_LIBS}
49099      if test "x$depdir" = x; then
49100        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
49101      fi
49102      ALSA=$depdir
49103      if test "x$theroot" != x; then
49104        ALSA="$theroot"
49105      fi
49106      if test "x$thecflags" != x; then
49107        ALSA_CFLAGS="$thecflags"
49108      fi
49109      if test "x$thelibs" != x; then
49110        ALSA_LIBS="$thelibs"
49111      fi
49112      ALSA_FOUND=yes
49113      else ALSA_FOUND=no
49114
49115    fi
49116    else ALSA_FOUND=no
49117
49118  fi
49119
49120    fi
49121    # Do not try pkg-config if we have a sysroot set.
49122    if test "x$SYSROOT" = x; then
49123      if test "x$ALSA_FOUND" = xno; then
49124
49125pkg_failed=no
49126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
49127$as_echo_n "checking for ALSA... " >&6; }
49128
49129if test -n "$ALSA_CFLAGS"; then
49130    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
49131 elif test -n "$PKG_CONFIG"; then
49132    if test -n "$PKG_CONFIG" && \
49133    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49134  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49135  ac_status=$?
49136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49137  test $ac_status = 0; }; then
49138  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
49139else
49140  pkg_failed=yes
49141fi
49142 else
49143    pkg_failed=untried
49144fi
49145if test -n "$ALSA_LIBS"; then
49146    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
49147 elif test -n "$PKG_CONFIG"; then
49148    if test -n "$PKG_CONFIG" && \
49149    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49150  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49151  ac_status=$?
49152  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49153  test $ac_status = 0; }; then
49154  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
49155else
49156  pkg_failed=yes
49157fi
49158 else
49159    pkg_failed=untried
49160fi
49161
49162
49163
49164if test $pkg_failed = yes; then
49165
49166if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49167        _pkg_short_errors_supported=yes
49168else
49169        _pkg_short_errors_supported=no
49170fi
49171        if test $_pkg_short_errors_supported = yes; then
49172	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
49173        else
49174	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
49175        fi
49176	# Put the nasty error message in config.log where it belongs
49177	echo "$ALSA_PKG_ERRORS" >&5
49178
49179	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49180$as_echo "no" >&6; }
49181                ALSA_FOUND=no
49182elif test $pkg_failed = untried; then
49183	ALSA_FOUND=no
49184else
49185	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
49186	ALSA_LIBS=$pkg_cv_ALSA_LIBS
49187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49188$as_echo "yes" >&6; }
49189	ALSA_FOUND=yes
49190fi
49191      fi
49192    fi
49193    if test "x$ALSA_FOUND" = xno; then
49194      for ac_header in alsa/asoundlib.h
49195do :
49196  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
49197if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
49198  cat >>confdefs.h <<_ACEOF
49199#define HAVE_ALSA_ASOUNDLIB_H 1
49200_ACEOF
49201
49202            ALSA_FOUND=yes
49203            ALSA_CFLAGS=-Iignoreme
49204            ALSA_LIBS=-lasound
49205            DEFAULT_ALSA=yes
49206
49207else
49208  ALSA_FOUND=no
49209fi
49210
49211done
49212
49213    fi
49214    if test "x$ALSA_FOUND" = xno; then
49215
49216  # Print a helpful message on how to acquire the necessary build dependency.
49217  # alsa is the help tag: freetype, cups, pulse, alsa etc
49218  MISSING_DEPENDENCY=alsa
49219
49220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49221    cygwin_help $MISSING_DEPENDENCY
49222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49223    msys_help $MISSING_DEPENDENCY
49224  else
49225    PKGHANDLER_COMMAND=
49226
49227    case $PKGHANDLER in
49228      apt-get)
49229        apt_help     $MISSING_DEPENDENCY ;;
49230      yum)
49231        yum_help     $MISSING_DEPENDENCY ;;
49232      port)
49233        port_help    $MISSING_DEPENDENCY ;;
49234      pkgutil)
49235        pkgutil_help $MISSING_DEPENDENCY ;;
49236      pkgadd)
49237        pkgadd_help  $MISSING_DEPENDENCY ;;
49238    esac
49239
49240    if test "x$PKGHANDLER_COMMAND" != x; then
49241      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49242    fi
49243  fi
49244
49245      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49246    fi
49247  fi
49248
49249
49250
49251
49252
49253
49254  ###############################################################################
49255  #
49256  # Check for the jpeg library
49257  #
49258
49259
49260# Check whether --with-libjpeg was given.
49261if test "${with_libjpeg+set}" = set; then :
49262  withval=$with_libjpeg;
49263fi
49264
49265
49266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49267$as_echo_n "checking for which libjpeg to use... " >&6; }
49268
49269  # default is bundled
49270  DEFAULT_LIBJPEG=bundled
49271
49272  #
49273  # if user didn't specify, use DEFAULT_LIBJPEG
49274  #
49275  if test "x${with_libjpeg}" = "x"; then
49276    with_libjpeg=${DEFAULT_LIBJPEG}
49277  fi
49278
49279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49280$as_echo "${with_libjpeg}" >&6; }
49281
49282  if test "x${with_libjpeg}" = "xbundled"; then
49283    USE_EXTERNAL_LIBJPEG=false
49284  elif test "x${with_libjpeg}" = "xsystem"; then
49285    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49286if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49287
49288else
49289   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49290fi
49291
49292
49293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49294$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49295if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49296  $as_echo_n "(cached) " >&6
49297else
49298  ac_check_lib_save_LIBS=$LIBS
49299LIBS="-ljpeg  $LIBS"
49300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49301/* end confdefs.h.  */
49302
49303/* Override any GCC internal prototype to avoid an error.
49304   Use char because int might match the return type of a GCC
49305   builtin and then its argument prototype would still apply.  */
49306#ifdef __cplusplus
49307extern "C"
49308#endif
49309char jpeg_CreateDecompress ();
49310int
49311main ()
49312{
49313return jpeg_CreateDecompress ();
49314  ;
49315  return 0;
49316}
49317_ACEOF
49318if ac_fn_cxx_try_link "$LINENO"; then :
49319  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49320else
49321  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49322fi
49323rm -f core conftest.err conftest.$ac_objext \
49324    conftest$ac_exeext conftest.$ac_ext
49325LIBS=$ac_check_lib_save_LIBS
49326fi
49327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49328$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49329if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49330  cat >>confdefs.h <<_ACEOF
49331#define HAVE_LIBJPEG 1
49332_ACEOF
49333
49334  LIBS="-ljpeg $LIBS"
49335
49336else
49337   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49338fi
49339
49340
49341    USE_EXTERNAL_LIBJPEG=true
49342  else
49343    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49344  fi
49345
49346
49347
49348  ###############################################################################
49349  #
49350  # Check for the gif library
49351  #
49352
49353
49354# Check whether --with-giflib was given.
49355if test "${with_giflib+set}" = set; then :
49356  withval=$with_giflib;
49357fi
49358
49359
49360
49361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49362$as_echo_n "checking for which giflib to use... " >&6; }
49363
49364  # default is bundled
49365  DEFAULT_GIFLIB=bundled
49366
49367  #
49368  # if user didn't specify, use DEFAULT_GIFLIB
49369  #
49370  if test "x${with_giflib}" = "x"; then
49371    with_giflib=${DEFAULT_GIFLIB}
49372  fi
49373
49374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49375$as_echo "${with_giflib}" >&6; }
49376
49377  if test "x${with_giflib}" = "xbundled"; then
49378    USE_EXTERNAL_LIBGIF=false
49379  elif test "x${with_giflib}" = "xsystem"; then
49380    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49381if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49382
49383else
49384   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49385fi
49386
49387
49388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49389$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49390if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49391  $as_echo_n "(cached) " >&6
49392else
49393  ac_check_lib_save_LIBS=$LIBS
49394LIBS="-lgif  $LIBS"
49395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49396/* end confdefs.h.  */
49397
49398/* Override any GCC internal prototype to avoid an error.
49399   Use char because int might match the return type of a GCC
49400   builtin and then its argument prototype would still apply.  */
49401#ifdef __cplusplus
49402extern "C"
49403#endif
49404char DGifGetCode ();
49405int
49406main ()
49407{
49408return DGifGetCode ();
49409  ;
49410  return 0;
49411}
49412_ACEOF
49413if ac_fn_cxx_try_link "$LINENO"; then :
49414  ac_cv_lib_gif_DGifGetCode=yes
49415else
49416  ac_cv_lib_gif_DGifGetCode=no
49417fi
49418rm -f core conftest.err conftest.$ac_objext \
49419    conftest$ac_exeext conftest.$ac_ext
49420LIBS=$ac_check_lib_save_LIBS
49421fi
49422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49423$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49424if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49425  cat >>confdefs.h <<_ACEOF
49426#define HAVE_LIBGIF 1
49427_ACEOF
49428
49429  LIBS="-lgif $LIBS"
49430
49431else
49432   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49433fi
49434
49435
49436    USE_EXTERNAL_LIBGIF=true
49437  else
49438    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49439  fi
49440
49441
49442  ###############################################################################
49443  #
49444  # Check for the lcms2 library
49445  #
49446
49447
49448# Check whether --with-lcms was given.
49449if test "${with_lcms+set}" = set; then :
49450  withval=$with_lcms;
49451fi
49452
49453
49454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49455$as_echo_n "checking for which lcms to use... " >&6; }
49456
49457  DEFAULT_LCMS=bundled
49458
49459  #
49460  # If user didn't specify, use DEFAULT_LCMS
49461  #
49462  if test "x${with_lcms}" = "x"; then
49463      with_lcms=${DEFAULT_LCMS}
49464  fi
49465
49466  if test "x${with_lcms}" = "xbundled"; then
49467    USE_EXTERNAL_LCMS=false
49468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49469$as_echo "bundled" >&6; }
49470  elif test "x${with_lcms}" = "xsystem"; then
49471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49472$as_echo "system" >&6; }
49473
49474pkg_failed=no
49475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49476$as_echo_n "checking for LCMS... " >&6; }
49477
49478if test -n "$LCMS_CFLAGS"; then
49479    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49480 elif test -n "$PKG_CONFIG"; then
49481    if test -n "$PKG_CONFIG" && \
49482    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49483  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49484  ac_status=$?
49485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49486  test $ac_status = 0; }; then
49487  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49488else
49489  pkg_failed=yes
49490fi
49491 else
49492    pkg_failed=untried
49493fi
49494if test -n "$LCMS_LIBS"; then
49495    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49496 elif test -n "$PKG_CONFIG"; then
49497    if test -n "$PKG_CONFIG" && \
49498    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49499  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49500  ac_status=$?
49501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49502  test $ac_status = 0; }; then
49503  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49504else
49505  pkg_failed=yes
49506fi
49507 else
49508    pkg_failed=untried
49509fi
49510
49511
49512
49513if test $pkg_failed = yes; then
49514
49515if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49516        _pkg_short_errors_supported=yes
49517else
49518        _pkg_short_errors_supported=no
49519fi
49520        if test $_pkg_short_errors_supported = yes; then
49521	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49522        else
49523	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49524        fi
49525	# Put the nasty error message in config.log where it belongs
49526	echo "$LCMS_PKG_ERRORS" >&5
49527
49528	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49529$as_echo "no" >&6; }
49530                LCMS_FOUND=no
49531elif test $pkg_failed = untried; then
49532	LCMS_FOUND=no
49533else
49534	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49535	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49537$as_echo "yes" >&6; }
49538	LCMS_FOUND=yes
49539fi
49540    if test "x${LCMS_FOUND}" = "xyes"; then
49541      USE_EXTERNAL_LCMS=true
49542    else
49543      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49544    fi
49545  else
49546    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49547  fi
49548
49549
49550
49551  ###############################################################################
49552  #
49553  # Check for the png library
49554  #
49555
49556
49557# Check whether --with-libpng was given.
49558if test "${with_libpng+set}" = set; then :
49559  withval=$with_libpng;
49560fi
49561
49562
49563
49564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49565$as_echo_n "checking for which libpng to use... " >&6; }
49566
49567  # default is bundled
49568  DEFAULT_LIBPNG=bundled
49569
49570  #
49571  # if user didn't specify, use DEFAULT_LIBPNG
49572  #
49573  if test "x${with_libpng}" = "x"; then
49574      with_libpng=${DEFAULT_LIBPNG}
49575  fi
49576
49577  if test "x${with_libpng}" = "xbundled"; then
49578      USE_EXTERNAL_LIBPNG=false
49579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49580$as_echo "bundled" >&6; }
49581  elif test "x${with_libpng}" = "xsystem"; then
49582
49583pkg_failed=no
49584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49585$as_echo_n "checking for PNG... " >&6; }
49586
49587if test -n "$PNG_CFLAGS"; then
49588    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49589 elif test -n "$PKG_CONFIG"; then
49590    if test -n "$PKG_CONFIG" && \
49591    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49592  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49593  ac_status=$?
49594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49595  test $ac_status = 0; }; then
49596  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49597else
49598  pkg_failed=yes
49599fi
49600 else
49601    pkg_failed=untried
49602fi
49603if test -n "$PNG_LIBS"; then
49604    pkg_cv_PNG_LIBS="$PNG_LIBS"
49605 elif test -n "$PKG_CONFIG"; then
49606    if test -n "$PKG_CONFIG" && \
49607    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49608  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49609  ac_status=$?
49610  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49611  test $ac_status = 0; }; then
49612  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49613else
49614  pkg_failed=yes
49615fi
49616 else
49617    pkg_failed=untried
49618fi
49619
49620
49621
49622if test $pkg_failed = yes; then
49623
49624if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49625        _pkg_short_errors_supported=yes
49626else
49627        _pkg_short_errors_supported=no
49628fi
49629        if test $_pkg_short_errors_supported = yes; then
49630	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49631        else
49632	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49633        fi
49634	# Put the nasty error message in config.log where it belongs
49635	echo "$PNG_PKG_ERRORS" >&5
49636
49637	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49638$as_echo "no" >&6; }
49639                 LIBPNG_FOUND=no
49640elif test $pkg_failed = untried; then
49641	 LIBPNG_FOUND=no
49642else
49643	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49644	PNG_LIBS=$pkg_cv_PNG_LIBS
49645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49646$as_echo "yes" >&6; }
49647	 LIBPNG_FOUND=yes
49648fi
49649      if test "x${LIBPNG_FOUND}" = "xyes"; then
49650          USE_EXTERNAL_LIBPNG=true
49651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49652$as_echo "system" >&6; }
49653      else
49654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49655$as_echo "system not found" >&6; }
49656          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49657      fi
49658  else
49659      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49660  fi
49661
49662
49663  ###############################################################################
49664  #
49665  # Check for the zlib library
49666  #
49667
49668
49669# Check whether --with-zlib was given.
49670if test "${with_zlib+set}" = set; then :
49671  withval=$with_zlib;
49672fi
49673
49674
49675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49676$as_echo_n "checking for compress in -lz... " >&6; }
49677if ${ac_cv_lib_z_compress+:} false; then :
49678  $as_echo_n "(cached) " >&6
49679else
49680  ac_check_lib_save_LIBS=$LIBS
49681LIBS="-lz  $LIBS"
49682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49683/* end confdefs.h.  */
49684
49685/* Override any GCC internal prototype to avoid an error.
49686   Use char because int might match the return type of a GCC
49687   builtin and then its argument prototype would still apply.  */
49688#ifdef __cplusplus
49689extern "C"
49690#endif
49691char compress ();
49692int
49693main ()
49694{
49695return compress ();
49696  ;
49697  return 0;
49698}
49699_ACEOF
49700if ac_fn_cxx_try_link "$LINENO"; then :
49701  ac_cv_lib_z_compress=yes
49702else
49703  ac_cv_lib_z_compress=no
49704fi
49705rm -f core conftest.err conftest.$ac_objext \
49706    conftest$ac_exeext conftest.$ac_ext
49707LIBS=$ac_check_lib_save_LIBS
49708fi
49709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49710$as_echo "$ac_cv_lib_z_compress" >&6; }
49711if test "x$ac_cv_lib_z_compress" = xyes; then :
49712   ZLIB_FOUND=yes
49713else
49714   ZLIB_FOUND=no
49715fi
49716
49717
49718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49719$as_echo_n "checking for which zlib to use... " >&6; }
49720
49721  DEFAULT_ZLIB=bundled
49722  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49723    #
49724    # On macosx default is system...on others default is
49725    #
49726    DEFAULT_ZLIB=system
49727  fi
49728
49729  if test "x${ZLIB_FOUND}" != "xyes"; then
49730    #
49731    # If we don't find any system...set default to bundled
49732    #
49733    DEFAULT_ZLIB=bundled
49734  fi
49735
49736  #
49737  # If user didn't specify, use DEFAULT_ZLIB
49738  #
49739  if test "x${with_zlib}" = "x"; then
49740    with_zlib=${DEFAULT_ZLIB}
49741  fi
49742
49743  if test "x${with_zlib}" = "xbundled"; then
49744    USE_EXTERNAL_LIBZ=false
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49746$as_echo "bundled" >&6; }
49747  elif test "x${with_zlib}" = "xsystem"; then
49748    if test "x${ZLIB_FOUND}" = "xyes"; then
49749      USE_EXTERNAL_LIBZ=true
49750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49751$as_echo "system" >&6; }
49752    else
49753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49754$as_echo "system not found" >&6; }
49755      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49756    fi
49757  else
49758    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49759  fi
49760
49761
49762
49763  ###############################################################################
49764  LIBZIP_CAN_USE_MMAP=true
49765
49766
49767
49768  ###############################################################################
49769  #
49770  # Check if altzone exists in time.h
49771  #
49772
49773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49774/* end confdefs.h.  */
49775#include <time.h>
49776int
49777main ()
49778{
49779return (int)altzone;
49780  ;
49781  return 0;
49782}
49783_ACEOF
49784if ac_fn_cxx_try_link "$LINENO"; then :
49785  has_altzone=yes
49786else
49787  has_altzone=no
49788fi
49789rm -f core conftest.err conftest.$ac_objext \
49790    conftest$ac_exeext conftest.$ac_ext
49791  if test "x$has_altzone" = xyes; then
49792
49793$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49794
49795  fi
49796
49797  ###############################################################################
49798  #
49799  # Check the maths library
49800  #
49801
49802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49803$as_echo_n "checking for cos in -lm... " >&6; }
49804if ${ac_cv_lib_m_cos+:} false; then :
49805  $as_echo_n "(cached) " >&6
49806else
49807  ac_check_lib_save_LIBS=$LIBS
49808LIBS="-lm  $LIBS"
49809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49810/* end confdefs.h.  */
49811
49812/* Override any GCC internal prototype to avoid an error.
49813   Use char because int might match the return type of a GCC
49814   builtin and then its argument prototype would still apply.  */
49815#ifdef __cplusplus
49816extern "C"
49817#endif
49818char cos ();
49819int
49820main ()
49821{
49822return cos ();
49823  ;
49824  return 0;
49825}
49826_ACEOF
49827if ac_fn_cxx_try_link "$LINENO"; then :
49828  ac_cv_lib_m_cos=yes
49829else
49830  ac_cv_lib_m_cos=no
49831fi
49832rm -f core conftest.err conftest.$ac_objext \
49833    conftest$ac_exeext conftest.$ac_ext
49834LIBS=$ac_check_lib_save_LIBS
49835fi
49836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49837$as_echo "$ac_cv_lib_m_cos" >&6; }
49838if test "x$ac_cv_lib_m_cos" = xyes; then :
49839  cat >>confdefs.h <<_ACEOF
49840#define HAVE_LIBM 1
49841_ACEOF
49842
49843  LIBS="-lm $LIBS"
49844
49845else
49846
49847        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49848$as_echo "$as_me: Maths library was not found" >&6;}
49849
49850
49851fi
49852
49853
49854
49855  ###############################################################################
49856  #
49857  # Check for libdl.so
49858
49859  save_LIBS="$LIBS"
49860  LIBS=""
49861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49862$as_echo_n "checking for dlopen in -ldl... " >&6; }
49863if ${ac_cv_lib_dl_dlopen+:} false; then :
49864  $as_echo_n "(cached) " >&6
49865else
49866  ac_check_lib_save_LIBS=$LIBS
49867LIBS="-ldl  $LIBS"
49868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49869/* end confdefs.h.  */
49870
49871/* Override any GCC internal prototype to avoid an error.
49872   Use char because int might match the return type of a GCC
49873   builtin and then its argument prototype would still apply.  */
49874#ifdef __cplusplus
49875extern "C"
49876#endif
49877char dlopen ();
49878int
49879main ()
49880{
49881return dlopen ();
49882  ;
49883  return 0;
49884}
49885_ACEOF
49886if ac_fn_cxx_try_link "$LINENO"; then :
49887  ac_cv_lib_dl_dlopen=yes
49888else
49889  ac_cv_lib_dl_dlopen=no
49890fi
49891rm -f core conftest.err conftest.$ac_objext \
49892    conftest$ac_exeext conftest.$ac_ext
49893LIBS=$ac_check_lib_save_LIBS
49894fi
49895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49896$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49897if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49898  cat >>confdefs.h <<_ACEOF
49899#define HAVE_LIBDL 1
49900_ACEOF
49901
49902  LIBS="-ldl $LIBS"
49903
49904fi
49905
49906  LIBDL="$LIBS"
49907
49908  LIBS="$save_LIBS"
49909
49910
49911  ###############################################################################
49912  #
49913  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49914  # dynamic build is configured on command line.
49915  #
49916
49917# Check whether --with-stdc++lib was given.
49918if test "${with_stdc__lib+set}" = set; then :
49919  withval=$with_stdc__lib;
49920        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49921                && test "x$with_stdc__lib" != xdefault; then
49922          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49923        fi
49924
49925else
49926  with_stdc__lib=default
49927
49928fi
49929
49930
49931  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49932    # Test if -lstdc++ works.
49933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49934$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49935    ac_ext=cpp
49936ac_cpp='$CXXCPP $CPPFLAGS'
49937ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49938ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49939ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49940
49941    OLD_CXXFLAGS="$CXXFLAGS"
49942    CXXFLAGS="$CXXFLAGS -lstdc++"
49943    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49944/* end confdefs.h.  */
49945
49946int
49947main ()
49948{
49949return 0;
49950  ;
49951  return 0;
49952}
49953_ACEOF
49954if ac_fn_cxx_try_link "$LINENO"; then :
49955  has_dynamic_libstdcxx=yes
49956else
49957  has_dynamic_libstdcxx=no
49958fi
49959rm -f core conftest.err conftest.$ac_objext \
49960    conftest$ac_exeext conftest.$ac_ext
49961    CXXFLAGS="$OLD_CXXFLAGS"
49962    ac_ext=cpp
49963ac_cpp='$CXXCPP $CPPFLAGS'
49964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49967
49968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49969$as_echo "$has_dynamic_libstdcxx" >&6; }
49970
49971    # Test if stdc++ can be linked statically.
49972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49973$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49974    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49975    ac_ext=cpp
49976ac_cpp='$CXXCPP $CPPFLAGS'
49977ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49978ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49979ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49980
49981    OLD_LIBS="$LIBS"
49982    OLD_CXX="$CXX"
49983    LIBS="$STATIC_STDCXX_FLAGS"
49984    CXX="$CC"
49985    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49986/* end confdefs.h.  */
49987
49988int
49989main ()
49990{
49991return 0;
49992  ;
49993  return 0;
49994}
49995_ACEOF
49996if ac_fn_cxx_try_link "$LINENO"; then :
49997  has_static_libstdcxx=yes
49998else
49999  has_static_libstdcxx=no
50000fi
50001rm -f core conftest.err conftest.$ac_objext \
50002    conftest$ac_exeext conftest.$ac_ext
50003    LIBS="$OLD_LIBS"
50004    CXX="$OLD_CXX"
50005    ac_ext=cpp
50006ac_cpp='$CXXCPP $CPPFLAGS'
50007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50010
50011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
50012$as_echo "$has_static_libstdcxx" >&6; }
50013
50014    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
50015      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
50016    fi
50017
50018    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
50019      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
50020    fi
50021
50022    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
50023      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
50024    fi
50025
50026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
50027$as_echo_n "checking how to link with libstdc++... " >&6; }
50028    # If dynamic was requested, it's available since it would fail above otherwise.
50029    # If dynamic wasn't requested, go with static unless it isn't available.
50030    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50031      LIBCXX="$LIBCXX -lstdc++"
50032      LDCXX="$CXX"
50033      STATIC_CXX_SETTING="STATIC_CXX=false"
50034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
50035$as_echo "dynamic" >&6; }
50036    else
50037      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
50038      LDCXX="$CC"
50039      STATIC_CXX_SETTING="STATIC_CXX=true"
50040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
50041$as_echo "static" >&6; }
50042    fi
50043  fi
50044
50045
50046  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50047    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
50048
50049pkg_failed=no
50050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
50051$as_echo_n "checking for LIBFFI... " >&6; }
50052
50053if test -n "$LIBFFI_CFLAGS"; then
50054    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
50055 elif test -n "$PKG_CONFIG"; then
50056    if test -n "$PKG_CONFIG" && \
50057    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50058  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50059  ac_status=$?
50060  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50061  test $ac_status = 0; }; then
50062  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
50063else
50064  pkg_failed=yes
50065fi
50066 else
50067    pkg_failed=untried
50068fi
50069if test -n "$LIBFFI_LIBS"; then
50070    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
50071 elif test -n "$PKG_CONFIG"; then
50072    if test -n "$PKG_CONFIG" && \
50073    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50074  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50075  ac_status=$?
50076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50077  test $ac_status = 0; }; then
50078  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
50079else
50080  pkg_failed=yes
50081fi
50082 else
50083    pkg_failed=untried
50084fi
50085
50086
50087
50088if test $pkg_failed = yes; then
50089
50090if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50091        _pkg_short_errors_supported=yes
50092else
50093        _pkg_short_errors_supported=no
50094fi
50095        if test $_pkg_short_errors_supported = yes; then
50096	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
50097        else
50098	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
50099        fi
50100	# Put the nasty error message in config.log where it belongs
50101	echo "$LIBFFI_PKG_ERRORS" >&5
50102
50103	as_fn_error $? "Package requirements (libffi) were not met:
50104
50105$LIBFFI_PKG_ERRORS
50106
50107Consider adjusting the PKG_CONFIG_PATH environment variable if you
50108installed software in a non-standard prefix.
50109
50110Alternatively, you may set the environment variables LIBFFI_CFLAGS
50111and LIBFFI_LIBS to avoid the need to call pkg-config.
50112See the pkg-config man page for more details.
50113" "$LINENO" 5
50114elif test $pkg_failed = untried; then
50115	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50117as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
50118is in your PATH or set the PKG_CONFIG environment variable to the full
50119path to pkg-config.
50120
50121Alternatively, you may set the environment variables LIBFFI_CFLAGS
50122and LIBFFI_LIBS to avoid the need to call pkg-config.
50123See the pkg-config man page for more details.
50124
50125To get pkg-config, see <http://pkg-config.freedesktop.org/>.
50126See \`config.log' for more details" "$LINENO" 5; }
50127else
50128	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
50129	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
50130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50131$as_echo "yes" >&6; }
50132	:
50133fi
50134
50135  fi
50136
50137  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50138    # Extract the first word of "llvm-config", so it can be a program name with args.
50139set dummy llvm-config; ac_word=$2
50140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50141$as_echo_n "checking for $ac_word... " >&6; }
50142if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
50143  $as_echo_n "(cached) " >&6
50144else
50145  if test -n "$LLVM_CONFIG"; then
50146  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
50147else
50148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50149for as_dir in $PATH
50150do
50151  IFS=$as_save_IFS
50152  test -z "$as_dir" && as_dir=.
50153    for ac_exec_ext in '' $ac_executable_extensions; do
50154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50155    ac_cv_prog_LLVM_CONFIG="llvm-config"
50156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50157    break 2
50158  fi
50159done
50160  done
50161IFS=$as_save_IFS
50162
50163fi
50164fi
50165LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
50166if test -n "$LLVM_CONFIG"; then
50167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
50168$as_echo "$LLVM_CONFIG" >&6; }
50169else
50170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50171$as_echo "no" >&6; }
50172fi
50173
50174
50175
50176    if test "x$LLVM_CONFIG" != xllvm-config; then
50177      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
50178    fi
50179
50180    llvm_components="jit mcjit engine nativecodegen native"
50181    unset LLVM_CFLAGS
50182    for flag in $("$LLVM_CONFIG" --cxxflags); do
50183      if echo "${flag}" | grep -q '^-[ID]'; then
50184        if test "${flag}" != "-D_DEBUG" ; then
50185          if test "${LLVM_CFLAGS}" != "" ; then
50186            LLVM_CFLAGS="${LLVM_CFLAGS} "
50187          fi
50188          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
50189        fi
50190      fi
50191    done
50192    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
50193    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
50194
50195    unset LLVM_LDFLAGS
50196    for flag in $("${LLVM_CONFIG}" --ldflags); do
50197      if echo "${flag}" | grep -q '^-L'; then
50198        if test "${LLVM_LDFLAGS}" != ""; then
50199          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
50200        fi
50201        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
50202      fi
50203    done
50204
50205    unset LLVM_LIBS
50206    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
50207      if echo "${flag}" | grep -q '^-l'; then
50208        if test "${LLVM_LIBS}" != ""; then
50209          LLVM_LIBS="${LLVM_LIBS} "
50210        fi
50211        LLVM_LIBS="${LLVM_LIBS}${flag}"
50212      fi
50213    done
50214
50215
50216
50217
50218  fi
50219
50220  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50221  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50222    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50223  fi
50224
50225  # TODO better (platform agnostic) test
50226  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50227    LIBCXX="-lstdc++"
50228  fi
50229
50230
50231
50232
50233  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50234
50235
50236# Check whether --with-msvcr-dll was given.
50237if test "${with_msvcr_dll+set}" = set; then :
50238  withval=$with_msvcr_dll;
50239fi
50240
50241
50242  if test "x$with_msvcr_dll" != x; then
50243    # If given explicitely by user, do not probe. If not present, fail directly.
50244
50245  DLL_NAME="$MSVCR_NAME"
50246  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50247  METHOD="--with-msvcr-dll"
50248  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50249    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50250$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50251
50252    # Need to check if the found msvcr is correct architecture
50253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50254$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50255    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50257      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50258      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50259      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50260        CORRECT_MSVCR_ARCH="PE32 executable"
50261      else
50262        CORRECT_MSVCR_ARCH="PE32+ executable"
50263      fi
50264    else
50265      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50266        CORRECT_MSVCR_ARCH=386
50267      else
50268        CORRECT_MSVCR_ARCH=x86-64
50269      fi
50270    fi
50271    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50273$as_echo "ok" >&6; }
50274      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50275
50276  # Only process if variable expands to non-empty
50277
50278  if test "x$MSVC_DLL" != x; then
50279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50280
50281  # Input might be given as Windows format, start by converting to
50282  # unix format.
50283  path="$MSVC_DLL"
50284  new_path=`$CYGPATH -u "$path"`
50285
50286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50289  # "foo.exe" is OK but "foo" is an error.
50290  #
50291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50292  # It is also a way to make sure we got the proper file name for the real test later on.
50293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50294  if test "x$test_shortpath" = x; then
50295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50296$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50297    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50298  fi
50299
50300  # Call helper function which possibly converts this using DOS-style short mode.
50301  # If so, the updated path is stored in $new_path.
50302
50303  input_path="$new_path"
50304  # Check if we need to convert this using DOS-style short mode. If the path
50305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50306  # take no chances and rewrite it.
50307  # Note: m4 eats our [], so we need to use [ and ] instead.
50308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50309  if test "x$has_forbidden_chars" != x; then
50310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50314      # Going to short mode and back again did indeed matter. Since short mode is
50315      # case insensitive, let's make it lowercase to improve readability.
50316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50317      # Now convert it back to Unix-style (cygpath)
50318      input_path=`$CYGPATH -u "$shortmode_path"`
50319      new_path="$input_path"
50320    fi
50321  fi
50322
50323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50324  if test "x$test_cygdrive_prefix" = x; then
50325    # As a simple fix, exclude /usr/bin since it's not a real path.
50326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50328      # a path prefixed by /cygdrive for fixpath to work.
50329      new_path="$CYGWIN_ROOT_PATH$input_path"
50330    fi
50331  fi
50332
50333
50334  if test "x$path" != "x$new_path"; then
50335    MSVC_DLL="$new_path"
50336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50337$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50338  fi
50339
50340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50341
50342  path="$MSVC_DLL"
50343  has_colon=`$ECHO $path | $GREP ^.:`
50344  new_path="$path"
50345  if test "x$has_colon" = x; then
50346    # Not in mixed or Windows style, start by that.
50347    new_path=`cmd //c echo $path`
50348  fi
50349
50350
50351  input_path="$new_path"
50352  # Check if we need to convert this using DOS-style short mode. If the path
50353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50354  # take no chances and rewrite it.
50355  # Note: m4 eats our [], so we need to use [ and ] instead.
50356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50357  if test "x$has_forbidden_chars" != x; then
50358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50360  fi
50361
50362
50363  windows_path="$new_path"
50364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50365    unix_path=`$CYGPATH -u "$windows_path"`
50366    new_path="$unix_path"
50367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50369    new_path="$unix_path"
50370  fi
50371
50372  if test "x$path" != "x$new_path"; then
50373    MSVC_DLL="$new_path"
50374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50375$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50376  fi
50377
50378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50380
50381    else
50382      # We're on a unix platform. Hooray! :)
50383      path="$MSVC_DLL"
50384      has_space=`$ECHO "$path" | $GREP " "`
50385      if test "x$has_space" != x; then
50386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50387$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50389      fi
50390
50391      # Use eval to expand a potential ~
50392      eval path="$path"
50393      if test ! -f "$path" && test ! -d "$path"; then
50394        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50395      fi
50396
50397      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50398    fi
50399  fi
50400
50401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50402$as_echo_n "checking for $DLL_NAME... " >&6; }
50403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50404$as_echo "$MSVC_DLL" >&6; }
50405    else
50406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50407$as_echo "incorrect, ignoring" >&6; }
50408      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50409$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50410    fi
50411  fi
50412
50413    if test "x$MSVC_DLL" = x; then
50414      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50415    fi
50416    MSVCR_DLL="$MSVC_DLL"
50417  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50418
50419  DLL_NAME="$MSVCR_NAME"
50420  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50421  METHOD="devkit"
50422  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50423    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50424$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50425
50426    # Need to check if the found msvcr is correct architecture
50427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50428$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50429    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50431      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50432      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50433      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50434        CORRECT_MSVCR_ARCH="PE32 executable"
50435      else
50436        CORRECT_MSVCR_ARCH="PE32+ executable"
50437      fi
50438    else
50439      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50440        CORRECT_MSVCR_ARCH=386
50441      else
50442        CORRECT_MSVCR_ARCH=x86-64
50443      fi
50444    fi
50445    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50447$as_echo "ok" >&6; }
50448      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50449
50450  # Only process if variable expands to non-empty
50451
50452  if test "x$MSVC_DLL" != x; then
50453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50454
50455  # Input might be given as Windows format, start by converting to
50456  # unix format.
50457  path="$MSVC_DLL"
50458  new_path=`$CYGPATH -u "$path"`
50459
50460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50463  # "foo.exe" is OK but "foo" is an error.
50464  #
50465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50466  # It is also a way to make sure we got the proper file name for the real test later on.
50467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50468  if test "x$test_shortpath" = x; then
50469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50470$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50471    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50472  fi
50473
50474  # Call helper function which possibly converts this using DOS-style short mode.
50475  # If so, the updated path is stored in $new_path.
50476
50477  input_path="$new_path"
50478  # Check if we need to convert this using DOS-style short mode. If the path
50479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50480  # take no chances and rewrite it.
50481  # Note: m4 eats our [], so we need to use [ and ] instead.
50482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50483  if test "x$has_forbidden_chars" != x; then
50484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50488      # Going to short mode and back again did indeed matter. Since short mode is
50489      # case insensitive, let's make it lowercase to improve readability.
50490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50491      # Now convert it back to Unix-style (cygpath)
50492      input_path=`$CYGPATH -u "$shortmode_path"`
50493      new_path="$input_path"
50494    fi
50495  fi
50496
50497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50498  if test "x$test_cygdrive_prefix" = x; then
50499    # As a simple fix, exclude /usr/bin since it's not a real path.
50500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50502      # a path prefixed by /cygdrive for fixpath to work.
50503      new_path="$CYGWIN_ROOT_PATH$input_path"
50504    fi
50505  fi
50506
50507
50508  if test "x$path" != "x$new_path"; then
50509    MSVC_DLL="$new_path"
50510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50511$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50512  fi
50513
50514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50515
50516  path="$MSVC_DLL"
50517  has_colon=`$ECHO $path | $GREP ^.:`
50518  new_path="$path"
50519  if test "x$has_colon" = x; then
50520    # Not in mixed or Windows style, start by that.
50521    new_path=`cmd //c echo $path`
50522  fi
50523
50524
50525  input_path="$new_path"
50526  # Check if we need to convert this using DOS-style short mode. If the path
50527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50528  # take no chances and rewrite it.
50529  # Note: m4 eats our [], so we need to use [ and ] instead.
50530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50531  if test "x$has_forbidden_chars" != x; then
50532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50534  fi
50535
50536
50537  windows_path="$new_path"
50538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50539    unix_path=`$CYGPATH -u "$windows_path"`
50540    new_path="$unix_path"
50541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50543    new_path="$unix_path"
50544  fi
50545
50546  if test "x$path" != "x$new_path"; then
50547    MSVC_DLL="$new_path"
50548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50549$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50550  fi
50551
50552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50554
50555    else
50556      # We're on a unix platform. Hooray! :)
50557      path="$MSVC_DLL"
50558      has_space=`$ECHO "$path" | $GREP " "`
50559      if test "x$has_space" != x; then
50560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50561$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50562        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50563      fi
50564
50565      # Use eval to expand a potential ~
50566      eval path="$path"
50567      if test ! -f "$path" && test ! -d "$path"; then
50568        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50569      fi
50570
50571      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50572    fi
50573  fi
50574
50575      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50576$as_echo_n "checking for $DLL_NAME... " >&6; }
50577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50578$as_echo "$MSVC_DLL" >&6; }
50579    else
50580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50581$as_echo "incorrect, ignoring" >&6; }
50582      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50583$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50584    fi
50585  fi
50586
50587    if test "x$MSVC_DLL" = x; then
50588      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50589    fi
50590    MSVCR_DLL="$MSVC_DLL"
50591  else
50592
50593  DLL_NAME="${MSVCR_NAME}"
50594  MSVC_DLL=
50595
50596  if test "x$MSVC_DLL" = x; then
50597    # Probe: Using well-known location from Visual Studio 10.0
50598    if test "x$VCINSTALLDIR" != x; then
50599      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50600
50601  windows_path="$CYGWIN_VC_INSTALL_DIR"
50602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50603    unix_path=`$CYGPATH -u "$windows_path"`
50604    CYGWIN_VC_INSTALL_DIR="$unix_path"
50605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50607    CYGWIN_VC_INSTALL_DIR="$unix_path"
50608  fi
50609
50610      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50611        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50612      else
50613        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50614      fi
50615      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50616
50617  DLL_NAME="$DLL_NAME"
50618  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50619  METHOD="well-known location in VCINSTALLDIR"
50620  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50622$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50623
50624    # Need to check if the found msvcr is correct architecture
50625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50626$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50627    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50629      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50630      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50631      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50632        CORRECT_MSVCR_ARCH="PE32 executable"
50633      else
50634        CORRECT_MSVCR_ARCH="PE32+ executable"
50635      fi
50636    else
50637      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50638        CORRECT_MSVCR_ARCH=386
50639      else
50640        CORRECT_MSVCR_ARCH=x86-64
50641      fi
50642    fi
50643    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50645$as_echo "ok" >&6; }
50646      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50647
50648  # Only process if variable expands to non-empty
50649
50650  if test "x$MSVC_DLL" != x; then
50651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50652
50653  # Input might be given as Windows format, start by converting to
50654  # unix format.
50655  path="$MSVC_DLL"
50656  new_path=`$CYGPATH -u "$path"`
50657
50658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50661  # "foo.exe" is OK but "foo" is an error.
50662  #
50663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50664  # It is also a way to make sure we got the proper file name for the real test later on.
50665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50666  if test "x$test_shortpath" = x; then
50667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50668$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50669    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50670  fi
50671
50672  # Call helper function which possibly converts this using DOS-style short mode.
50673  # If so, the updated path is stored in $new_path.
50674
50675  input_path="$new_path"
50676  # Check if we need to convert this using DOS-style short mode. If the path
50677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50678  # take no chances and rewrite it.
50679  # Note: m4 eats our [], so we need to use [ and ] instead.
50680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50681  if test "x$has_forbidden_chars" != x; then
50682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50686      # Going to short mode and back again did indeed matter. Since short mode is
50687      # case insensitive, let's make it lowercase to improve readability.
50688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50689      # Now convert it back to Unix-style (cygpath)
50690      input_path=`$CYGPATH -u "$shortmode_path"`
50691      new_path="$input_path"
50692    fi
50693  fi
50694
50695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50696  if test "x$test_cygdrive_prefix" = x; then
50697    # As a simple fix, exclude /usr/bin since it's not a real path.
50698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50700      # a path prefixed by /cygdrive for fixpath to work.
50701      new_path="$CYGWIN_ROOT_PATH$input_path"
50702    fi
50703  fi
50704
50705
50706  if test "x$path" != "x$new_path"; then
50707    MSVC_DLL="$new_path"
50708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50709$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50710  fi
50711
50712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50713
50714  path="$MSVC_DLL"
50715  has_colon=`$ECHO $path | $GREP ^.:`
50716  new_path="$path"
50717  if test "x$has_colon" = x; then
50718    # Not in mixed or Windows style, start by that.
50719    new_path=`cmd //c echo $path`
50720  fi
50721
50722
50723  input_path="$new_path"
50724  # Check if we need to convert this using DOS-style short mode. If the path
50725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50726  # take no chances and rewrite it.
50727  # Note: m4 eats our [], so we need to use [ and ] instead.
50728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50729  if test "x$has_forbidden_chars" != x; then
50730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50732  fi
50733
50734
50735  windows_path="$new_path"
50736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50737    unix_path=`$CYGPATH -u "$windows_path"`
50738    new_path="$unix_path"
50739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50741    new_path="$unix_path"
50742  fi
50743
50744  if test "x$path" != "x$new_path"; then
50745    MSVC_DLL="$new_path"
50746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50747$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50748  fi
50749
50750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50752
50753    else
50754      # We're on a unix platform. Hooray! :)
50755      path="$MSVC_DLL"
50756      has_space=`$ECHO "$path" | $GREP " "`
50757      if test "x$has_space" != x; then
50758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50759$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50761      fi
50762
50763      # Use eval to expand a potential ~
50764      eval path="$path"
50765      if test ! -f "$path" && test ! -d "$path"; then
50766        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50767      fi
50768
50769      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50770    fi
50771  fi
50772
50773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50774$as_echo_n "checking for $DLL_NAME... " >&6; }
50775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50776$as_echo "$MSVC_DLL" >&6; }
50777    else
50778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50779$as_echo "incorrect, ignoring" >&6; }
50780      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50781$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50782    fi
50783  fi
50784
50785    fi
50786  fi
50787
50788  if test "x$MSVC_DLL" = x; then
50789    # Probe: Check in the Boot JDK directory.
50790    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50791
50792  DLL_NAME="$DLL_NAME"
50793  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50794  METHOD="well-known location in Boot JDK"
50795  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50797$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50798
50799    # Need to check if the found msvcr is correct architecture
50800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50801$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50802    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50804      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50805      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50806      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50807        CORRECT_MSVCR_ARCH="PE32 executable"
50808      else
50809        CORRECT_MSVCR_ARCH="PE32+ executable"
50810      fi
50811    else
50812      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50813        CORRECT_MSVCR_ARCH=386
50814      else
50815        CORRECT_MSVCR_ARCH=x86-64
50816      fi
50817    fi
50818    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50820$as_echo "ok" >&6; }
50821      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50822
50823  # Only process if variable expands to non-empty
50824
50825  if test "x$MSVC_DLL" != x; then
50826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50827
50828  # Input might be given as Windows format, start by converting to
50829  # unix format.
50830  path="$MSVC_DLL"
50831  new_path=`$CYGPATH -u "$path"`
50832
50833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50836  # "foo.exe" is OK but "foo" is an error.
50837  #
50838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50839  # It is also a way to make sure we got the proper file name for the real test later on.
50840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50841  if test "x$test_shortpath" = x; then
50842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50843$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50844    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50845  fi
50846
50847  # Call helper function which possibly converts this using DOS-style short mode.
50848  # If so, the updated path is stored in $new_path.
50849
50850  input_path="$new_path"
50851  # Check if we need to convert this using DOS-style short mode. If the path
50852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50853  # take no chances and rewrite it.
50854  # Note: m4 eats our [], so we need to use [ and ] instead.
50855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50856  if test "x$has_forbidden_chars" != x; then
50857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50861      # Going to short mode and back again did indeed matter. Since short mode is
50862      # case insensitive, let's make it lowercase to improve readability.
50863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50864      # Now convert it back to Unix-style (cygpath)
50865      input_path=`$CYGPATH -u "$shortmode_path"`
50866      new_path="$input_path"
50867    fi
50868  fi
50869
50870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50871  if test "x$test_cygdrive_prefix" = x; then
50872    # As a simple fix, exclude /usr/bin since it's not a real path.
50873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50875      # a path prefixed by /cygdrive for fixpath to work.
50876      new_path="$CYGWIN_ROOT_PATH$input_path"
50877    fi
50878  fi
50879
50880
50881  if test "x$path" != "x$new_path"; then
50882    MSVC_DLL="$new_path"
50883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50885  fi
50886
50887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50888
50889  path="$MSVC_DLL"
50890  has_colon=`$ECHO $path | $GREP ^.:`
50891  new_path="$path"
50892  if test "x$has_colon" = x; then
50893    # Not in mixed or Windows style, start by that.
50894    new_path=`cmd //c echo $path`
50895  fi
50896
50897
50898  input_path="$new_path"
50899  # Check if we need to convert this using DOS-style short mode. If the path
50900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50901  # take no chances and rewrite it.
50902  # Note: m4 eats our [], so we need to use [ and ] instead.
50903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50904  if test "x$has_forbidden_chars" != x; then
50905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50907  fi
50908
50909
50910  windows_path="$new_path"
50911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50912    unix_path=`$CYGPATH -u "$windows_path"`
50913    new_path="$unix_path"
50914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50916    new_path="$unix_path"
50917  fi
50918
50919  if test "x$path" != "x$new_path"; then
50920    MSVC_DLL="$new_path"
50921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50922$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50923  fi
50924
50925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50927
50928    else
50929      # We're on a unix platform. Hooray! :)
50930      path="$MSVC_DLL"
50931      has_space=`$ECHO "$path" | $GREP " "`
50932      if test "x$has_space" != x; then
50933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50934$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50936      fi
50937
50938      # Use eval to expand a potential ~
50939      eval path="$path"
50940      if test ! -f "$path" && test ! -d "$path"; then
50941        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50942      fi
50943
50944      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50945    fi
50946  fi
50947
50948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50949$as_echo_n "checking for $DLL_NAME... " >&6; }
50950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50951$as_echo "$MSVC_DLL" >&6; }
50952    else
50953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50954$as_echo "incorrect, ignoring" >&6; }
50955      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50956$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50957    fi
50958  fi
50959
50960  fi
50961
50962  if test "x$MSVC_DLL" = x; then
50963    # Probe: Look in the Windows system32 directory
50964    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50965
50966  windows_path="$CYGWIN_SYSTEMROOT"
50967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50968    unix_path=`$CYGPATH -u "$windows_path"`
50969    CYGWIN_SYSTEMROOT="$unix_path"
50970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50972    CYGWIN_SYSTEMROOT="$unix_path"
50973  fi
50974
50975    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50976
50977  DLL_NAME="$DLL_NAME"
50978  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50979  METHOD="well-known location in SYSTEMROOT"
50980  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50981    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50982$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50983
50984    # Need to check if the found msvcr is correct architecture
50985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50986$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50987    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50989      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50990      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50991      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50992        CORRECT_MSVCR_ARCH="PE32 executable"
50993      else
50994        CORRECT_MSVCR_ARCH="PE32+ executable"
50995      fi
50996    else
50997      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50998        CORRECT_MSVCR_ARCH=386
50999      else
51000        CORRECT_MSVCR_ARCH=x86-64
51001      fi
51002    fi
51003    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51005$as_echo "ok" >&6; }
51006      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51007
51008  # Only process if variable expands to non-empty
51009
51010  if test "x$MSVC_DLL" != x; then
51011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51012
51013  # Input might be given as Windows format, start by converting to
51014  # unix format.
51015  path="$MSVC_DLL"
51016  new_path=`$CYGPATH -u "$path"`
51017
51018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51021  # "foo.exe" is OK but "foo" is an error.
51022  #
51023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51024  # It is also a way to make sure we got the proper file name for the real test later on.
51025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51026  if test "x$test_shortpath" = x; then
51027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51028$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51029    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51030  fi
51031
51032  # Call helper function which possibly converts this using DOS-style short mode.
51033  # If so, the updated path is stored in $new_path.
51034
51035  input_path="$new_path"
51036  # Check if we need to convert this using DOS-style short mode. If the path
51037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51038  # take no chances and rewrite it.
51039  # Note: m4 eats our [], so we need to use [ and ] instead.
51040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51041  if test "x$has_forbidden_chars" != x; then
51042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51046      # Going to short mode and back again did indeed matter. Since short mode is
51047      # case insensitive, let's make it lowercase to improve readability.
51048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51049      # Now convert it back to Unix-style (cygpath)
51050      input_path=`$CYGPATH -u "$shortmode_path"`
51051      new_path="$input_path"
51052    fi
51053  fi
51054
51055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51056  if test "x$test_cygdrive_prefix" = x; then
51057    # As a simple fix, exclude /usr/bin since it's not a real path.
51058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51060      # a path prefixed by /cygdrive for fixpath to work.
51061      new_path="$CYGWIN_ROOT_PATH$input_path"
51062    fi
51063  fi
51064
51065
51066  if test "x$path" != "x$new_path"; then
51067    MSVC_DLL="$new_path"
51068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51069$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51070  fi
51071
51072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51073
51074  path="$MSVC_DLL"
51075  has_colon=`$ECHO $path | $GREP ^.:`
51076  new_path="$path"
51077  if test "x$has_colon" = x; then
51078    # Not in mixed or Windows style, start by that.
51079    new_path=`cmd //c echo $path`
51080  fi
51081
51082
51083  input_path="$new_path"
51084  # Check if we need to convert this using DOS-style short mode. If the path
51085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51086  # take no chances and rewrite it.
51087  # Note: m4 eats our [], so we need to use [ and ] instead.
51088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51089  if test "x$has_forbidden_chars" != x; then
51090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51092  fi
51093
51094
51095  windows_path="$new_path"
51096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51097    unix_path=`$CYGPATH -u "$windows_path"`
51098    new_path="$unix_path"
51099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51101    new_path="$unix_path"
51102  fi
51103
51104  if test "x$path" != "x$new_path"; then
51105    MSVC_DLL="$new_path"
51106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51107$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51108  fi
51109
51110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51112
51113    else
51114      # We're on a unix platform. Hooray! :)
51115      path="$MSVC_DLL"
51116      has_space=`$ECHO "$path" | $GREP " "`
51117      if test "x$has_space" != x; then
51118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51119$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51121      fi
51122
51123      # Use eval to expand a potential ~
51124      eval path="$path"
51125      if test ! -f "$path" && test ! -d "$path"; then
51126        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51127      fi
51128
51129      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51130    fi
51131  fi
51132
51133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51134$as_echo_n "checking for $DLL_NAME... " >&6; }
51135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51136$as_echo "$MSVC_DLL" >&6; }
51137    else
51138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51139$as_echo "incorrect, ignoring" >&6; }
51140      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51141$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51142    fi
51143  fi
51144
51145  fi
51146
51147  if test "x$MSVC_DLL" = x; then
51148    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51149    if test "x$VS100COMNTOOLS" != x; then
51150      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51151
51152  windows_path="$CYGWIN_VS_TOOLS_DIR"
51153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51154    unix_path=`$CYGPATH -u "$windows_path"`
51155    CYGWIN_VS_TOOLS_DIR="$unix_path"
51156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51158    CYGWIN_VS_TOOLS_DIR="$unix_path"
51159  fi
51160
51161      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51162        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51163	    | $GREP -i /x64/ | $HEAD --lines 1`
51164      else
51165        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51166	    | $GREP -i /x86/ | $HEAD --lines 1`
51167      fi
51168
51169  DLL_NAME="$DLL_NAME"
51170  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51171  METHOD="search of VS100COMNTOOLS"
51172  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51174$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51175
51176    # Need to check if the found msvcr is correct architecture
51177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51178$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51179    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51181      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51182      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51183      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51184        CORRECT_MSVCR_ARCH="PE32 executable"
51185      else
51186        CORRECT_MSVCR_ARCH="PE32+ executable"
51187      fi
51188    else
51189      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51190        CORRECT_MSVCR_ARCH=386
51191      else
51192        CORRECT_MSVCR_ARCH=x86-64
51193      fi
51194    fi
51195    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51197$as_echo "ok" >&6; }
51198      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51199
51200  # Only process if variable expands to non-empty
51201
51202  if test "x$MSVC_DLL" != x; then
51203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51204
51205  # Input might be given as Windows format, start by converting to
51206  # unix format.
51207  path="$MSVC_DLL"
51208  new_path=`$CYGPATH -u "$path"`
51209
51210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51213  # "foo.exe" is OK but "foo" is an error.
51214  #
51215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51216  # It is also a way to make sure we got the proper file name for the real test later on.
51217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51218  if test "x$test_shortpath" = x; then
51219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51220$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51221    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51222  fi
51223
51224  # Call helper function which possibly converts this using DOS-style short mode.
51225  # If so, the updated path is stored in $new_path.
51226
51227  input_path="$new_path"
51228  # Check if we need to convert this using DOS-style short mode. If the path
51229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51230  # take no chances and rewrite it.
51231  # Note: m4 eats our [], so we need to use [ and ] instead.
51232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51233  if test "x$has_forbidden_chars" != x; then
51234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51238      # Going to short mode and back again did indeed matter. Since short mode is
51239      # case insensitive, let's make it lowercase to improve readability.
51240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51241      # Now convert it back to Unix-style (cygpath)
51242      input_path=`$CYGPATH -u "$shortmode_path"`
51243      new_path="$input_path"
51244    fi
51245  fi
51246
51247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51248  if test "x$test_cygdrive_prefix" = x; then
51249    # As a simple fix, exclude /usr/bin since it's not a real path.
51250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51252      # a path prefixed by /cygdrive for fixpath to work.
51253      new_path="$CYGWIN_ROOT_PATH$input_path"
51254    fi
51255  fi
51256
51257
51258  if test "x$path" != "x$new_path"; then
51259    MSVC_DLL="$new_path"
51260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51261$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51262  fi
51263
51264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51265
51266  path="$MSVC_DLL"
51267  has_colon=`$ECHO $path | $GREP ^.:`
51268  new_path="$path"
51269  if test "x$has_colon" = x; then
51270    # Not in mixed or Windows style, start by that.
51271    new_path=`cmd //c echo $path`
51272  fi
51273
51274
51275  input_path="$new_path"
51276  # Check if we need to convert this using DOS-style short mode. If the path
51277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51278  # take no chances and rewrite it.
51279  # Note: m4 eats our [], so we need to use [ and ] instead.
51280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51281  if test "x$has_forbidden_chars" != x; then
51282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51284  fi
51285
51286
51287  windows_path="$new_path"
51288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51289    unix_path=`$CYGPATH -u "$windows_path"`
51290    new_path="$unix_path"
51291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51293    new_path="$unix_path"
51294  fi
51295
51296  if test "x$path" != "x$new_path"; then
51297    MSVC_DLL="$new_path"
51298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51299$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51300  fi
51301
51302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51304
51305    else
51306      # We're on a unix platform. Hooray! :)
51307      path="$MSVC_DLL"
51308      has_space=`$ECHO "$path" | $GREP " "`
51309      if test "x$has_space" != x; then
51310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51311$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51313      fi
51314
51315      # Use eval to expand a potential ~
51316      eval path="$path"
51317      if test ! -f "$path" && test ! -d "$path"; then
51318        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51319      fi
51320
51321      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51322    fi
51323  fi
51324
51325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51326$as_echo_n "checking for $DLL_NAME... " >&6; }
51327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51328$as_echo "$MSVC_DLL" >&6; }
51329    else
51330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51331$as_echo "incorrect, ignoring" >&6; }
51332      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51333$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51334    fi
51335  fi
51336
51337    fi
51338  fi
51339
51340  if test "x$MSVC_DLL" = x; then
51341    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51342    # (This was the original behaviour; kept since it might turn something up)
51343    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51344      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51345        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51346	    | $GREP x64 | $HEAD --lines 1`
51347      else
51348        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51349	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51350        if test "x$POSSIBLE_MSVC_DLL" = x; then
51351          # We're grasping at straws now...
51352          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51353	      | $HEAD --lines 1`
51354        fi
51355      fi
51356
51357
51358  DLL_NAME="$DLL_NAME"
51359  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51360  METHOD="search of VCINSTALLDIR"
51361  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51363$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51364
51365    # Need to check if the found msvcr is correct architecture
51366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51367$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51368    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51370      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51371      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51372      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51373        CORRECT_MSVCR_ARCH="PE32 executable"
51374      else
51375        CORRECT_MSVCR_ARCH="PE32+ executable"
51376      fi
51377    else
51378      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51379        CORRECT_MSVCR_ARCH=386
51380      else
51381        CORRECT_MSVCR_ARCH=x86-64
51382      fi
51383    fi
51384    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51386$as_echo "ok" >&6; }
51387      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51388
51389  # Only process if variable expands to non-empty
51390
51391  if test "x$MSVC_DLL" != x; then
51392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51393
51394  # Input might be given as Windows format, start by converting to
51395  # unix format.
51396  path="$MSVC_DLL"
51397  new_path=`$CYGPATH -u "$path"`
51398
51399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51402  # "foo.exe" is OK but "foo" is an error.
51403  #
51404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51405  # It is also a way to make sure we got the proper file name for the real test later on.
51406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51407  if test "x$test_shortpath" = x; then
51408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51409$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51410    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51411  fi
51412
51413  # Call helper function which possibly converts this using DOS-style short mode.
51414  # If so, the updated path is stored in $new_path.
51415
51416  input_path="$new_path"
51417  # Check if we need to convert this using DOS-style short mode. If the path
51418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51419  # take no chances and rewrite it.
51420  # Note: m4 eats our [], so we need to use [ and ] instead.
51421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51422  if test "x$has_forbidden_chars" != x; then
51423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51427      # Going to short mode and back again did indeed matter. Since short mode is
51428      # case insensitive, let's make it lowercase to improve readability.
51429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51430      # Now convert it back to Unix-style (cygpath)
51431      input_path=`$CYGPATH -u "$shortmode_path"`
51432      new_path="$input_path"
51433    fi
51434  fi
51435
51436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51437  if test "x$test_cygdrive_prefix" = x; then
51438    # As a simple fix, exclude /usr/bin since it's not a real path.
51439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51441      # a path prefixed by /cygdrive for fixpath to work.
51442      new_path="$CYGWIN_ROOT_PATH$input_path"
51443    fi
51444  fi
51445
51446
51447  if test "x$path" != "x$new_path"; then
51448    MSVC_DLL="$new_path"
51449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51450$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51451  fi
51452
51453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51454
51455  path="$MSVC_DLL"
51456  has_colon=`$ECHO $path | $GREP ^.:`
51457  new_path="$path"
51458  if test "x$has_colon" = x; then
51459    # Not in mixed or Windows style, start by that.
51460    new_path=`cmd //c echo $path`
51461  fi
51462
51463
51464  input_path="$new_path"
51465  # Check if we need to convert this using DOS-style short mode. If the path
51466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51467  # take no chances and rewrite it.
51468  # Note: m4 eats our [], so we need to use [ and ] instead.
51469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51470  if test "x$has_forbidden_chars" != x; then
51471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51473  fi
51474
51475
51476  windows_path="$new_path"
51477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51478    unix_path=`$CYGPATH -u "$windows_path"`
51479    new_path="$unix_path"
51480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51482    new_path="$unix_path"
51483  fi
51484
51485  if test "x$path" != "x$new_path"; then
51486    MSVC_DLL="$new_path"
51487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51488$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51489  fi
51490
51491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51493
51494    else
51495      # We're on a unix platform. Hooray! :)
51496      path="$MSVC_DLL"
51497      has_space=`$ECHO "$path" | $GREP " "`
51498      if test "x$has_space" != x; then
51499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51500$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51502      fi
51503
51504      # Use eval to expand a potential ~
51505      eval path="$path"
51506      if test ! -f "$path" && test ! -d "$path"; then
51507        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51508      fi
51509
51510      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51511    fi
51512  fi
51513
51514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51515$as_echo_n "checking for $DLL_NAME... " >&6; }
51516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51517$as_echo "$MSVC_DLL" >&6; }
51518    else
51519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51520$as_echo "incorrect, ignoring" >&6; }
51521      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51522$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51523    fi
51524  fi
51525
51526    fi
51527  fi
51528
51529  if test "x$MSVC_DLL" = x; then
51530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51531$as_echo_n "checking for $DLL_NAME... " >&6; }
51532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51533$as_echo "no" >&6; }
51534    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51535  fi
51536
51537    MSVCR_DLL="$MSVC_DLL"
51538  fi
51539
51540
51541
51542# Check whether --with-msvcp-dll was given.
51543if test "${with_msvcp_dll+set}" = set; then :
51544  withval=$with_msvcp_dll;
51545fi
51546
51547
51548  if test "x$MSVCP_NAME" != "x"; then
51549    if test "x$with_msvcp_dll" != x; then
51550      # If given explicitely by user, do not probe. If not present, fail directly.
51551
51552  DLL_NAME="$MSVCP_NAME"
51553  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51554  METHOD="--with-msvcp-dll"
51555  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51557$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51558
51559    # Need to check if the found msvcr is correct architecture
51560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51561$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51562    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51564      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51565      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51566      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51567        CORRECT_MSVCR_ARCH="PE32 executable"
51568      else
51569        CORRECT_MSVCR_ARCH="PE32+ executable"
51570      fi
51571    else
51572      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51573        CORRECT_MSVCR_ARCH=386
51574      else
51575        CORRECT_MSVCR_ARCH=x86-64
51576      fi
51577    fi
51578    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51580$as_echo "ok" >&6; }
51581      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51582
51583  # Only process if variable expands to non-empty
51584
51585  if test "x$MSVC_DLL" != x; then
51586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51587
51588  # Input might be given as Windows format, start by converting to
51589  # unix format.
51590  path="$MSVC_DLL"
51591  new_path=`$CYGPATH -u "$path"`
51592
51593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51596  # "foo.exe" is OK but "foo" is an error.
51597  #
51598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51599  # It is also a way to make sure we got the proper file name for the real test later on.
51600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51601  if test "x$test_shortpath" = x; then
51602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51603$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51604    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51605  fi
51606
51607  # Call helper function which possibly converts this using DOS-style short mode.
51608  # If so, the updated path is stored in $new_path.
51609
51610  input_path="$new_path"
51611  # Check if we need to convert this using DOS-style short mode. If the path
51612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51613  # take no chances and rewrite it.
51614  # Note: m4 eats our [], so we need to use [ and ] instead.
51615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51616  if test "x$has_forbidden_chars" != x; then
51617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51621      # Going to short mode and back again did indeed matter. Since short mode is
51622      # case insensitive, let's make it lowercase to improve readability.
51623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51624      # Now convert it back to Unix-style (cygpath)
51625      input_path=`$CYGPATH -u "$shortmode_path"`
51626      new_path="$input_path"
51627    fi
51628  fi
51629
51630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51631  if test "x$test_cygdrive_prefix" = x; then
51632    # As a simple fix, exclude /usr/bin since it's not a real path.
51633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51635      # a path prefixed by /cygdrive for fixpath to work.
51636      new_path="$CYGWIN_ROOT_PATH$input_path"
51637    fi
51638  fi
51639
51640
51641  if test "x$path" != "x$new_path"; then
51642    MSVC_DLL="$new_path"
51643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51644$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51645  fi
51646
51647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51648
51649  path="$MSVC_DLL"
51650  has_colon=`$ECHO $path | $GREP ^.:`
51651  new_path="$path"
51652  if test "x$has_colon" = x; then
51653    # Not in mixed or Windows style, start by that.
51654    new_path=`cmd //c echo $path`
51655  fi
51656
51657
51658  input_path="$new_path"
51659  # Check if we need to convert this using DOS-style short mode. If the path
51660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51661  # take no chances and rewrite it.
51662  # Note: m4 eats our [], so we need to use [ and ] instead.
51663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51664  if test "x$has_forbidden_chars" != x; then
51665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51667  fi
51668
51669
51670  windows_path="$new_path"
51671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51672    unix_path=`$CYGPATH -u "$windows_path"`
51673    new_path="$unix_path"
51674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51676    new_path="$unix_path"
51677  fi
51678
51679  if test "x$path" != "x$new_path"; then
51680    MSVC_DLL="$new_path"
51681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51682$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51683  fi
51684
51685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51687
51688    else
51689      # We're on a unix platform. Hooray! :)
51690      path="$MSVC_DLL"
51691      has_space=`$ECHO "$path" | $GREP " "`
51692      if test "x$has_space" != x; then
51693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51694$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51696      fi
51697
51698      # Use eval to expand a potential ~
51699      eval path="$path"
51700      if test ! -f "$path" && test ! -d "$path"; then
51701        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51702      fi
51703
51704      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51705    fi
51706  fi
51707
51708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51709$as_echo_n "checking for $DLL_NAME... " >&6; }
51710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51711$as_echo "$MSVC_DLL" >&6; }
51712    else
51713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51714$as_echo "incorrect, ignoring" >&6; }
51715      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51716$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51717    fi
51718  fi
51719
51720      if test "x$MSVC_DLL" = x; then
51721        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51722      fi
51723      MSVCP_DLL="$MSVC_DLL"
51724    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51725
51726  DLL_NAME="$MSVCP_NAME"
51727  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51728  METHOD="devkit"
51729  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51730    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51731$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51732
51733    # Need to check if the found msvcr is correct architecture
51734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51735$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51736    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51738      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51739      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51740      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51741        CORRECT_MSVCR_ARCH="PE32 executable"
51742      else
51743        CORRECT_MSVCR_ARCH="PE32+ executable"
51744      fi
51745    else
51746      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51747        CORRECT_MSVCR_ARCH=386
51748      else
51749        CORRECT_MSVCR_ARCH=x86-64
51750      fi
51751    fi
51752    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51754$as_echo "ok" >&6; }
51755      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51756
51757  # Only process if variable expands to non-empty
51758
51759  if test "x$MSVC_DLL" != x; then
51760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51761
51762  # Input might be given as Windows format, start by converting to
51763  # unix format.
51764  path="$MSVC_DLL"
51765  new_path=`$CYGPATH -u "$path"`
51766
51767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51770  # "foo.exe" is OK but "foo" is an error.
51771  #
51772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51773  # It is also a way to make sure we got the proper file name for the real test later on.
51774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51775  if test "x$test_shortpath" = x; then
51776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51777$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51778    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51779  fi
51780
51781  # Call helper function which possibly converts this using DOS-style short mode.
51782  # If so, the updated path is stored in $new_path.
51783
51784  input_path="$new_path"
51785  # Check if we need to convert this using DOS-style short mode. If the path
51786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51787  # take no chances and rewrite it.
51788  # Note: m4 eats our [], so we need to use [ and ] instead.
51789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51790  if test "x$has_forbidden_chars" != x; then
51791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51795      # Going to short mode and back again did indeed matter. Since short mode is
51796      # case insensitive, let's make it lowercase to improve readability.
51797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51798      # Now convert it back to Unix-style (cygpath)
51799      input_path=`$CYGPATH -u "$shortmode_path"`
51800      new_path="$input_path"
51801    fi
51802  fi
51803
51804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51805  if test "x$test_cygdrive_prefix" = x; then
51806    # As a simple fix, exclude /usr/bin since it's not a real path.
51807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51809      # a path prefixed by /cygdrive for fixpath to work.
51810      new_path="$CYGWIN_ROOT_PATH$input_path"
51811    fi
51812  fi
51813
51814
51815  if test "x$path" != "x$new_path"; then
51816    MSVC_DLL="$new_path"
51817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51818$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51819  fi
51820
51821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51822
51823  path="$MSVC_DLL"
51824  has_colon=`$ECHO $path | $GREP ^.:`
51825  new_path="$path"
51826  if test "x$has_colon" = x; then
51827    # Not in mixed or Windows style, start by that.
51828    new_path=`cmd //c echo $path`
51829  fi
51830
51831
51832  input_path="$new_path"
51833  # Check if we need to convert this using DOS-style short mode. If the path
51834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51835  # take no chances and rewrite it.
51836  # Note: m4 eats our [], so we need to use [ and ] instead.
51837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51838  if test "x$has_forbidden_chars" != x; then
51839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51841  fi
51842
51843
51844  windows_path="$new_path"
51845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51846    unix_path=`$CYGPATH -u "$windows_path"`
51847    new_path="$unix_path"
51848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51850    new_path="$unix_path"
51851  fi
51852
51853  if test "x$path" != "x$new_path"; then
51854    MSVC_DLL="$new_path"
51855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51856$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51857  fi
51858
51859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51861
51862    else
51863      # We're on a unix platform. Hooray! :)
51864      path="$MSVC_DLL"
51865      has_space=`$ECHO "$path" | $GREP " "`
51866      if test "x$has_space" != x; then
51867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51868$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51870      fi
51871
51872      # Use eval to expand a potential ~
51873      eval path="$path"
51874      if test ! -f "$path" && test ! -d "$path"; then
51875        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51876      fi
51877
51878      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51879    fi
51880  fi
51881
51882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51883$as_echo_n "checking for $DLL_NAME... " >&6; }
51884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51885$as_echo "$MSVC_DLL" >&6; }
51886    else
51887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51888$as_echo "incorrect, ignoring" >&6; }
51889      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51890$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51891    fi
51892  fi
51893
51894      if test "x$MSVC_DLL" = x; then
51895        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51896      fi
51897      MSVCP_DLL="$MSVC_DLL"
51898    else
51899
51900  DLL_NAME="${MSVCP_NAME}"
51901  MSVC_DLL=
51902
51903  if test "x$MSVC_DLL" = x; then
51904    # Probe: Using well-known location from Visual Studio 10.0
51905    if test "x$VCINSTALLDIR" != x; then
51906      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51907
51908  windows_path="$CYGWIN_VC_INSTALL_DIR"
51909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51910    unix_path=`$CYGPATH -u "$windows_path"`
51911    CYGWIN_VC_INSTALL_DIR="$unix_path"
51912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51914    CYGWIN_VC_INSTALL_DIR="$unix_path"
51915  fi
51916
51917      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51918        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51919      else
51920        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51921      fi
51922      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51923
51924  DLL_NAME="$DLL_NAME"
51925  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51926  METHOD="well-known location in VCINSTALLDIR"
51927  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51928    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51929$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51930
51931    # Need to check if the found msvcr is correct architecture
51932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51933$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51934    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51936      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51937      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51938      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51939        CORRECT_MSVCR_ARCH="PE32 executable"
51940      else
51941        CORRECT_MSVCR_ARCH="PE32+ executable"
51942      fi
51943    else
51944      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51945        CORRECT_MSVCR_ARCH=386
51946      else
51947        CORRECT_MSVCR_ARCH=x86-64
51948      fi
51949    fi
51950    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51952$as_echo "ok" >&6; }
51953      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51954
51955  # Only process if variable expands to non-empty
51956
51957  if test "x$MSVC_DLL" != x; then
51958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51959
51960  # Input might be given as Windows format, start by converting to
51961  # unix format.
51962  path="$MSVC_DLL"
51963  new_path=`$CYGPATH -u "$path"`
51964
51965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51968  # "foo.exe" is OK but "foo" is an error.
51969  #
51970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51971  # It is also a way to make sure we got the proper file name for the real test later on.
51972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51973  if test "x$test_shortpath" = x; then
51974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51975$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51976    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51977  fi
51978
51979  # Call helper function which possibly converts this using DOS-style short mode.
51980  # If so, the updated path is stored in $new_path.
51981
51982  input_path="$new_path"
51983  # Check if we need to convert this using DOS-style short mode. If the path
51984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51985  # take no chances and rewrite it.
51986  # Note: m4 eats our [], so we need to use [ and ] instead.
51987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51988  if test "x$has_forbidden_chars" != x; then
51989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51993      # Going to short mode and back again did indeed matter. Since short mode is
51994      # case insensitive, let's make it lowercase to improve readability.
51995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51996      # Now convert it back to Unix-style (cygpath)
51997      input_path=`$CYGPATH -u "$shortmode_path"`
51998      new_path="$input_path"
51999    fi
52000  fi
52001
52002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52003  if test "x$test_cygdrive_prefix" = x; then
52004    # As a simple fix, exclude /usr/bin since it's not a real path.
52005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52007      # a path prefixed by /cygdrive for fixpath to work.
52008      new_path="$CYGWIN_ROOT_PATH$input_path"
52009    fi
52010  fi
52011
52012
52013  if test "x$path" != "x$new_path"; then
52014    MSVC_DLL="$new_path"
52015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52016$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52017  fi
52018
52019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52020
52021  path="$MSVC_DLL"
52022  has_colon=`$ECHO $path | $GREP ^.:`
52023  new_path="$path"
52024  if test "x$has_colon" = x; then
52025    # Not in mixed or Windows style, start by that.
52026    new_path=`cmd //c echo $path`
52027  fi
52028
52029
52030  input_path="$new_path"
52031  # Check if we need to convert this using DOS-style short mode. If the path
52032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52033  # take no chances and rewrite it.
52034  # Note: m4 eats our [], so we need to use [ and ] instead.
52035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52036  if test "x$has_forbidden_chars" != x; then
52037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52039  fi
52040
52041
52042  windows_path="$new_path"
52043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52044    unix_path=`$CYGPATH -u "$windows_path"`
52045    new_path="$unix_path"
52046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52048    new_path="$unix_path"
52049  fi
52050
52051  if test "x$path" != "x$new_path"; then
52052    MSVC_DLL="$new_path"
52053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52054$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52055  fi
52056
52057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52059
52060    else
52061      # We're on a unix platform. Hooray! :)
52062      path="$MSVC_DLL"
52063      has_space=`$ECHO "$path" | $GREP " "`
52064      if test "x$has_space" != x; then
52065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52066$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52067        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52068      fi
52069
52070      # Use eval to expand a potential ~
52071      eval path="$path"
52072      if test ! -f "$path" && test ! -d "$path"; then
52073        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52074      fi
52075
52076      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52077    fi
52078  fi
52079
52080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52081$as_echo_n "checking for $DLL_NAME... " >&6; }
52082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52083$as_echo "$MSVC_DLL" >&6; }
52084    else
52085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52086$as_echo "incorrect, ignoring" >&6; }
52087      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52088$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52089    fi
52090  fi
52091
52092    fi
52093  fi
52094
52095  if test "x$MSVC_DLL" = x; then
52096    # Probe: Check in the Boot JDK directory.
52097    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
52098
52099  DLL_NAME="$DLL_NAME"
52100  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52101  METHOD="well-known location in Boot JDK"
52102  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52103    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52104$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52105
52106    # Need to check if the found msvcr is correct architecture
52107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52108$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52109    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52111      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52112      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52113      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52114        CORRECT_MSVCR_ARCH="PE32 executable"
52115      else
52116        CORRECT_MSVCR_ARCH="PE32+ executable"
52117      fi
52118    else
52119      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52120        CORRECT_MSVCR_ARCH=386
52121      else
52122        CORRECT_MSVCR_ARCH=x86-64
52123      fi
52124    fi
52125    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52127$as_echo "ok" >&6; }
52128      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52129
52130  # Only process if variable expands to non-empty
52131
52132  if test "x$MSVC_DLL" != x; then
52133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52134
52135  # Input might be given as Windows format, start by converting to
52136  # unix format.
52137  path="$MSVC_DLL"
52138  new_path=`$CYGPATH -u "$path"`
52139
52140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52143  # "foo.exe" is OK but "foo" is an error.
52144  #
52145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52146  # It is also a way to make sure we got the proper file name for the real test later on.
52147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52148  if test "x$test_shortpath" = x; then
52149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52150$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52151    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52152  fi
52153
52154  # Call helper function which possibly converts this using DOS-style short mode.
52155  # If so, the updated path is stored in $new_path.
52156
52157  input_path="$new_path"
52158  # Check if we need to convert this using DOS-style short mode. If the path
52159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52160  # take no chances and rewrite it.
52161  # Note: m4 eats our [], so we need to use [ and ] instead.
52162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52163  if test "x$has_forbidden_chars" != x; then
52164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52168      # Going to short mode and back again did indeed matter. Since short mode is
52169      # case insensitive, let's make it lowercase to improve readability.
52170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52171      # Now convert it back to Unix-style (cygpath)
52172      input_path=`$CYGPATH -u "$shortmode_path"`
52173      new_path="$input_path"
52174    fi
52175  fi
52176
52177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52178  if test "x$test_cygdrive_prefix" = x; then
52179    # As a simple fix, exclude /usr/bin since it's not a real path.
52180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52182      # a path prefixed by /cygdrive for fixpath to work.
52183      new_path="$CYGWIN_ROOT_PATH$input_path"
52184    fi
52185  fi
52186
52187
52188  if test "x$path" != "x$new_path"; then
52189    MSVC_DLL="$new_path"
52190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52191$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52192  fi
52193
52194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52195
52196  path="$MSVC_DLL"
52197  has_colon=`$ECHO $path | $GREP ^.:`
52198  new_path="$path"
52199  if test "x$has_colon" = x; then
52200    # Not in mixed or Windows style, start by that.
52201    new_path=`cmd //c echo $path`
52202  fi
52203
52204
52205  input_path="$new_path"
52206  # Check if we need to convert this using DOS-style short mode. If the path
52207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52208  # take no chances and rewrite it.
52209  # Note: m4 eats our [], so we need to use [ and ] instead.
52210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52211  if test "x$has_forbidden_chars" != x; then
52212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52214  fi
52215
52216
52217  windows_path="$new_path"
52218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52219    unix_path=`$CYGPATH -u "$windows_path"`
52220    new_path="$unix_path"
52221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52223    new_path="$unix_path"
52224  fi
52225
52226  if test "x$path" != "x$new_path"; then
52227    MSVC_DLL="$new_path"
52228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52229$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52230  fi
52231
52232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52234
52235    else
52236      # We're on a unix platform. Hooray! :)
52237      path="$MSVC_DLL"
52238      has_space=`$ECHO "$path" | $GREP " "`
52239      if test "x$has_space" != x; then
52240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52241$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52243      fi
52244
52245      # Use eval to expand a potential ~
52246      eval path="$path"
52247      if test ! -f "$path" && test ! -d "$path"; then
52248        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52249      fi
52250
52251      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52252    fi
52253  fi
52254
52255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52256$as_echo_n "checking for $DLL_NAME... " >&6; }
52257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52258$as_echo "$MSVC_DLL" >&6; }
52259    else
52260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52261$as_echo "incorrect, ignoring" >&6; }
52262      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52263$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52264    fi
52265  fi
52266
52267  fi
52268
52269  if test "x$MSVC_DLL" = x; then
52270    # Probe: Look in the Windows system32 directory
52271    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52272
52273  windows_path="$CYGWIN_SYSTEMROOT"
52274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52275    unix_path=`$CYGPATH -u "$windows_path"`
52276    CYGWIN_SYSTEMROOT="$unix_path"
52277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52279    CYGWIN_SYSTEMROOT="$unix_path"
52280  fi
52281
52282    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52283
52284  DLL_NAME="$DLL_NAME"
52285  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52286  METHOD="well-known location in SYSTEMROOT"
52287  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52288    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52289$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52290
52291    # Need to check if the found msvcr is correct architecture
52292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52293$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52294    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52296      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52297      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52298      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52299        CORRECT_MSVCR_ARCH="PE32 executable"
52300      else
52301        CORRECT_MSVCR_ARCH="PE32+ executable"
52302      fi
52303    else
52304      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52305        CORRECT_MSVCR_ARCH=386
52306      else
52307        CORRECT_MSVCR_ARCH=x86-64
52308      fi
52309    fi
52310    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52312$as_echo "ok" >&6; }
52313      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52314
52315  # Only process if variable expands to non-empty
52316
52317  if test "x$MSVC_DLL" != x; then
52318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52319
52320  # Input might be given as Windows format, start by converting to
52321  # unix format.
52322  path="$MSVC_DLL"
52323  new_path=`$CYGPATH -u "$path"`
52324
52325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52328  # "foo.exe" is OK but "foo" is an error.
52329  #
52330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52331  # It is also a way to make sure we got the proper file name for the real test later on.
52332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52333  if test "x$test_shortpath" = x; then
52334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52335$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52336    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52337  fi
52338
52339  # Call helper function which possibly converts this using DOS-style short mode.
52340  # If so, the updated path is stored in $new_path.
52341
52342  input_path="$new_path"
52343  # Check if we need to convert this using DOS-style short mode. If the path
52344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52345  # take no chances and rewrite it.
52346  # Note: m4 eats our [], so we need to use [ and ] instead.
52347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52348  if test "x$has_forbidden_chars" != x; then
52349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52353      # Going to short mode and back again did indeed matter. Since short mode is
52354      # case insensitive, let's make it lowercase to improve readability.
52355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52356      # Now convert it back to Unix-style (cygpath)
52357      input_path=`$CYGPATH -u "$shortmode_path"`
52358      new_path="$input_path"
52359    fi
52360  fi
52361
52362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52363  if test "x$test_cygdrive_prefix" = x; then
52364    # As a simple fix, exclude /usr/bin since it's not a real path.
52365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52367      # a path prefixed by /cygdrive for fixpath to work.
52368      new_path="$CYGWIN_ROOT_PATH$input_path"
52369    fi
52370  fi
52371
52372
52373  if test "x$path" != "x$new_path"; then
52374    MSVC_DLL="$new_path"
52375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52376$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52377  fi
52378
52379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52380
52381  path="$MSVC_DLL"
52382  has_colon=`$ECHO $path | $GREP ^.:`
52383  new_path="$path"
52384  if test "x$has_colon" = x; then
52385    # Not in mixed or Windows style, start by that.
52386    new_path=`cmd //c echo $path`
52387  fi
52388
52389
52390  input_path="$new_path"
52391  # Check if we need to convert this using DOS-style short mode. If the path
52392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52393  # take no chances and rewrite it.
52394  # Note: m4 eats our [], so we need to use [ and ] instead.
52395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52396  if test "x$has_forbidden_chars" != x; then
52397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52399  fi
52400
52401
52402  windows_path="$new_path"
52403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52404    unix_path=`$CYGPATH -u "$windows_path"`
52405    new_path="$unix_path"
52406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52408    new_path="$unix_path"
52409  fi
52410
52411  if test "x$path" != "x$new_path"; then
52412    MSVC_DLL="$new_path"
52413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52414$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52415  fi
52416
52417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52419
52420    else
52421      # We're on a unix platform. Hooray! :)
52422      path="$MSVC_DLL"
52423      has_space=`$ECHO "$path" | $GREP " "`
52424      if test "x$has_space" != x; then
52425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52426$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52428      fi
52429
52430      # Use eval to expand a potential ~
52431      eval path="$path"
52432      if test ! -f "$path" && test ! -d "$path"; then
52433        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52434      fi
52435
52436      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52437    fi
52438  fi
52439
52440      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52441$as_echo_n "checking for $DLL_NAME... " >&6; }
52442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52443$as_echo "$MSVC_DLL" >&6; }
52444    else
52445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52446$as_echo "incorrect, ignoring" >&6; }
52447      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52448$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52449    fi
52450  fi
52451
52452  fi
52453
52454  if test "x$MSVC_DLL" = x; then
52455    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52456    if test "x$VS100COMNTOOLS" != x; then
52457      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52458
52459  windows_path="$CYGWIN_VS_TOOLS_DIR"
52460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52461    unix_path=`$CYGPATH -u "$windows_path"`
52462    CYGWIN_VS_TOOLS_DIR="$unix_path"
52463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52465    CYGWIN_VS_TOOLS_DIR="$unix_path"
52466  fi
52467
52468      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52469        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52470	    | $GREP -i /x64/ | $HEAD --lines 1`
52471      else
52472        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52473	    | $GREP -i /x86/ | $HEAD --lines 1`
52474      fi
52475
52476  DLL_NAME="$DLL_NAME"
52477  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52478  METHOD="search of VS100COMNTOOLS"
52479  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52480    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52481$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52482
52483    # Need to check if the found msvcr is correct architecture
52484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52485$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52486    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52488      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52489      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52490      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52491        CORRECT_MSVCR_ARCH="PE32 executable"
52492      else
52493        CORRECT_MSVCR_ARCH="PE32+ executable"
52494      fi
52495    else
52496      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52497        CORRECT_MSVCR_ARCH=386
52498      else
52499        CORRECT_MSVCR_ARCH=x86-64
52500      fi
52501    fi
52502    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52504$as_echo "ok" >&6; }
52505      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52506
52507  # Only process if variable expands to non-empty
52508
52509  if test "x$MSVC_DLL" != x; then
52510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52511
52512  # Input might be given as Windows format, start by converting to
52513  # unix format.
52514  path="$MSVC_DLL"
52515  new_path=`$CYGPATH -u "$path"`
52516
52517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52520  # "foo.exe" is OK but "foo" is an error.
52521  #
52522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52523  # It is also a way to make sure we got the proper file name for the real test later on.
52524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52525  if test "x$test_shortpath" = x; then
52526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52527$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52528    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52529  fi
52530
52531  # Call helper function which possibly converts this using DOS-style short mode.
52532  # If so, the updated path is stored in $new_path.
52533
52534  input_path="$new_path"
52535  # Check if we need to convert this using DOS-style short mode. If the path
52536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52537  # take no chances and rewrite it.
52538  # Note: m4 eats our [], so we need to use [ and ] instead.
52539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52540  if test "x$has_forbidden_chars" != x; then
52541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52545      # Going to short mode and back again did indeed matter. Since short mode is
52546      # case insensitive, let's make it lowercase to improve readability.
52547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52548      # Now convert it back to Unix-style (cygpath)
52549      input_path=`$CYGPATH -u "$shortmode_path"`
52550      new_path="$input_path"
52551    fi
52552  fi
52553
52554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52555  if test "x$test_cygdrive_prefix" = x; then
52556    # As a simple fix, exclude /usr/bin since it's not a real path.
52557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52559      # a path prefixed by /cygdrive for fixpath to work.
52560      new_path="$CYGWIN_ROOT_PATH$input_path"
52561    fi
52562  fi
52563
52564
52565  if test "x$path" != "x$new_path"; then
52566    MSVC_DLL="$new_path"
52567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52568$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52569  fi
52570
52571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52572
52573  path="$MSVC_DLL"
52574  has_colon=`$ECHO $path | $GREP ^.:`
52575  new_path="$path"
52576  if test "x$has_colon" = x; then
52577    # Not in mixed or Windows style, start by that.
52578    new_path=`cmd //c echo $path`
52579  fi
52580
52581
52582  input_path="$new_path"
52583  # Check if we need to convert this using DOS-style short mode. If the path
52584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52585  # take no chances and rewrite it.
52586  # Note: m4 eats our [], so we need to use [ and ] instead.
52587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52588  if test "x$has_forbidden_chars" != x; then
52589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52591  fi
52592
52593
52594  windows_path="$new_path"
52595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52596    unix_path=`$CYGPATH -u "$windows_path"`
52597    new_path="$unix_path"
52598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52600    new_path="$unix_path"
52601  fi
52602
52603  if test "x$path" != "x$new_path"; then
52604    MSVC_DLL="$new_path"
52605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52606$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52607  fi
52608
52609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52611
52612    else
52613      # We're on a unix platform. Hooray! :)
52614      path="$MSVC_DLL"
52615      has_space=`$ECHO "$path" | $GREP " "`
52616      if test "x$has_space" != x; then
52617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52618$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52620      fi
52621
52622      # Use eval to expand a potential ~
52623      eval path="$path"
52624      if test ! -f "$path" && test ! -d "$path"; then
52625        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52626      fi
52627
52628      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52629    fi
52630  fi
52631
52632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52633$as_echo_n "checking for $DLL_NAME... " >&6; }
52634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52635$as_echo "$MSVC_DLL" >&6; }
52636    else
52637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52638$as_echo "incorrect, ignoring" >&6; }
52639      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52640$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52641    fi
52642  fi
52643
52644    fi
52645  fi
52646
52647  if test "x$MSVC_DLL" = x; then
52648    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52649    # (This was the original behaviour; kept since it might turn something up)
52650    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52651      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52652        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52653	    | $GREP x64 | $HEAD --lines 1`
52654      else
52655        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52656	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52657        if test "x$POSSIBLE_MSVC_DLL" = x; then
52658          # We're grasping at straws now...
52659          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52660	      | $HEAD --lines 1`
52661        fi
52662      fi
52663
52664
52665  DLL_NAME="$DLL_NAME"
52666  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52667  METHOD="search of VCINSTALLDIR"
52668  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52669    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52670$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52671
52672    # Need to check if the found msvcr is correct architecture
52673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52674$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52675    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52676    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52677      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52678      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52679      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52680        CORRECT_MSVCR_ARCH="PE32 executable"
52681      else
52682        CORRECT_MSVCR_ARCH="PE32+ executable"
52683      fi
52684    else
52685      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52686        CORRECT_MSVCR_ARCH=386
52687      else
52688        CORRECT_MSVCR_ARCH=x86-64
52689      fi
52690    fi
52691    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52693$as_echo "ok" >&6; }
52694      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52695
52696  # Only process if variable expands to non-empty
52697
52698  if test "x$MSVC_DLL" != x; then
52699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52700
52701  # Input might be given as Windows format, start by converting to
52702  # unix format.
52703  path="$MSVC_DLL"
52704  new_path=`$CYGPATH -u "$path"`
52705
52706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52709  # "foo.exe" is OK but "foo" is an error.
52710  #
52711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52712  # It is also a way to make sure we got the proper file name for the real test later on.
52713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52714  if test "x$test_shortpath" = x; then
52715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52716$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52717    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52718  fi
52719
52720  # Call helper function which possibly converts this using DOS-style short mode.
52721  # If so, the updated path is stored in $new_path.
52722
52723  input_path="$new_path"
52724  # Check if we need to convert this using DOS-style short mode. If the path
52725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52726  # take no chances and rewrite it.
52727  # Note: m4 eats our [], so we need to use [ and ] instead.
52728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52729  if test "x$has_forbidden_chars" != x; then
52730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52734      # Going to short mode and back again did indeed matter. Since short mode is
52735      # case insensitive, let's make it lowercase to improve readability.
52736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52737      # Now convert it back to Unix-style (cygpath)
52738      input_path=`$CYGPATH -u "$shortmode_path"`
52739      new_path="$input_path"
52740    fi
52741  fi
52742
52743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52744  if test "x$test_cygdrive_prefix" = x; then
52745    # As a simple fix, exclude /usr/bin since it's not a real path.
52746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52748      # a path prefixed by /cygdrive for fixpath to work.
52749      new_path="$CYGWIN_ROOT_PATH$input_path"
52750    fi
52751  fi
52752
52753
52754  if test "x$path" != "x$new_path"; then
52755    MSVC_DLL="$new_path"
52756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52757$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52758  fi
52759
52760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52761
52762  path="$MSVC_DLL"
52763  has_colon=`$ECHO $path | $GREP ^.:`
52764  new_path="$path"
52765  if test "x$has_colon" = x; then
52766    # Not in mixed or Windows style, start by that.
52767    new_path=`cmd //c echo $path`
52768  fi
52769
52770
52771  input_path="$new_path"
52772  # Check if we need to convert this using DOS-style short mode. If the path
52773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52774  # take no chances and rewrite it.
52775  # Note: m4 eats our [], so we need to use [ and ] instead.
52776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52777  if test "x$has_forbidden_chars" != x; then
52778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52780  fi
52781
52782
52783  windows_path="$new_path"
52784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52785    unix_path=`$CYGPATH -u "$windows_path"`
52786    new_path="$unix_path"
52787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52789    new_path="$unix_path"
52790  fi
52791
52792  if test "x$path" != "x$new_path"; then
52793    MSVC_DLL="$new_path"
52794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52795$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52796  fi
52797
52798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52800
52801    else
52802      # We're on a unix platform. Hooray! :)
52803      path="$MSVC_DLL"
52804      has_space=`$ECHO "$path" | $GREP " "`
52805      if test "x$has_space" != x; then
52806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52807$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52809      fi
52810
52811      # Use eval to expand a potential ~
52812      eval path="$path"
52813      if test ! -f "$path" && test ! -d "$path"; then
52814        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52815      fi
52816
52817      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52818    fi
52819  fi
52820
52821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52822$as_echo_n "checking for $DLL_NAME... " >&6; }
52823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52824$as_echo "$MSVC_DLL" >&6; }
52825    else
52826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52827$as_echo "incorrect, ignoring" >&6; }
52828      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52829$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52830    fi
52831  fi
52832
52833    fi
52834  fi
52835
52836  if test "x$MSVC_DLL" = x; then
52837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52838$as_echo_n "checking for $DLL_NAME... " >&6; }
52839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52840$as_echo "no" >&6; }
52841    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52842  fi
52843
52844      MSVCP_DLL="$MSVC_DLL"
52845    fi
52846
52847  fi
52848
52849
52850
52851# Check whether --with-dxsdk was given.
52852if test "${with_dxsdk+set}" = set; then :
52853  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52854$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52855fi
52856
52857
52858
52859
52860# Check whether --with-dxsdk-lib was given.
52861if test "${with_dxsdk_lib+set}" = set; then :
52862  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52863$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52864fi
52865
52866
52867
52868
52869# Check whether --with-dxsdk-include was given.
52870if test "${with_dxsdk_include+set}" = set; then :
52871  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52872$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52873fi
52874
52875
52876  fi
52877
52878
52879###############################################################################
52880#
52881# We need to do some final tweaking, when everything else is done.
52882#
52883###############################################################################
52884
52885
52886  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52887
52888
52889  # The name of the Service Agent jar.
52890  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52891  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52892    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52893  fi
52894
52895
52896
52897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52898$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52899
52900  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52901    ENABLE_INTREE_EC=yes
52902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52903$as_echo "yes" >&6; }
52904  else
52905    ENABLE_INTREE_EC=no
52906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52907$as_echo "no" >&6; }
52908  fi
52909
52910
52911
52912
52913###############################################################################
52914#
52915# Configure parts of the build that only affect the build performance,
52916# not the result.
52917#
52918###############################################################################
52919
52920
52921  # How many cores do we have on this build system?
52922
52923# Check whether --with-num-cores was given.
52924if test "${with_num_cores+set}" = set; then :
52925  withval=$with_num_cores;
52926fi
52927
52928  if test "x$with_num_cores" = x; then
52929    # The number of cores were not specified, try to probe them.
52930
52931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52932$as_echo_n "checking for number of cores... " >&6; }
52933  NUM_CORES=1
52934  FOUND_CORES=no
52935
52936  if test -f /proc/cpuinfo; then
52937    # Looks like a Linux (or cygwin) system
52938    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52939    FOUND_CORES=yes
52940  elif test -x /usr/sbin/psrinfo; then
52941    # Looks like a Solaris system
52942    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52943    FOUND_CORES=yes
52944  elif test -x /usr/sbin/system_profiler; then
52945    # Looks like a MacOSX system
52946    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52947    FOUND_CORES=yes
52948  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52949    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52950    FOUND_CORES=yes
52951  elif test -n "$NUMBER_OF_PROCESSORS"; then
52952    # On windows, look in the env
52953    NUM_CORES=$NUMBER_OF_PROCESSORS
52954    FOUND_CORES=yes
52955  fi
52956
52957  if test "x$FOUND_CORES" = xyes; then
52958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52959$as_echo "$NUM_CORES" >&6; }
52960  else
52961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52962$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52963    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52964$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52965  fi
52966
52967  else
52968    NUM_CORES=$with_num_cores
52969  fi
52970
52971
52972
52973  # How much memory do we have on this build system?
52974
52975# Check whether --with-memory-size was given.
52976if test "${with_memory_size+set}" = set; then :
52977  withval=$with_memory_size;
52978fi
52979
52980  if test "x$with_memory_size" = x; then
52981    # The memory size was not specified, try to probe it.
52982
52983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52984$as_echo_n "checking for memory size... " >&6; }
52985  # Default to 1024 MB
52986  MEMORY_SIZE=1024
52987  FOUND_MEM=no
52988
52989  if test -f /proc/meminfo; then
52990    # Looks like a Linux (or cygwin) system
52991    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52992    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52993    FOUND_MEM=yes
52994  elif test -x /usr/sbin/prtconf; then
52995    # Looks like a Solaris or AIX system
52996    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52997    FOUND_MEM=yes
52998  elif test -x /usr/sbin/system_profiler; then
52999    # Looks like a MacOSX system
53000    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
53001    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
53002    FOUND_MEM=yes
53003  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53004    # Windows, but without cygwin
53005    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
53006    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
53007    FOUND_MEM=yes
53008  fi
53009
53010  if test "x$FOUND_MEM" = xyes; then
53011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
53012$as_echo "$MEMORY_SIZE MB" >&6; }
53013  else
53014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
53015$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
53016    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
53017$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
53018  fi
53019
53020  else
53021    MEMORY_SIZE=$with_memory_size
53022  fi
53023
53024
53025
53026  # Provide a decent default number of parallel jobs for make depending on
53027  # number of cores, amount of memory and machine architecture.
53028
53029# Check whether --with-jobs was given.
53030if test "${with_jobs+set}" = set; then :
53031  withval=$with_jobs;
53032fi
53033
53034  if test "x$with_jobs" = x; then
53035    # Number of jobs was not specified, calculate.
53036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
53037$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
53038    # Approximate memory in GB.
53039    memory_gb=`expr $MEMORY_SIZE / 1024`
53040    # Pick the lowest of memory in gb and number of cores.
53041    if test "$memory_gb" -lt "$NUM_CORES"; then
53042      JOBS="$memory_gb"
53043    else
53044      JOBS="$NUM_CORES"
53045      # On bigger machines, leave some room for other processes to run
53046      if test "$JOBS" -gt "4"; then
53047        JOBS=`expr $JOBS '*' 90 / 100`
53048      fi
53049    fi
53050    # Cap number of jobs to 16
53051    if test "$JOBS" -gt "16"; then
53052      JOBS=16
53053    fi
53054    if test "$JOBS" -eq "0"; then
53055      JOBS=1
53056    fi
53057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53058$as_echo "$JOBS" >&6; }
53059  else
53060    JOBS=$with_jobs
53061  fi
53062
53063
53064
53065# Setup arguments for the boot jdk (after cores and memory have been setup)
53066
53067  ##############################################################################
53068  #
53069  # Specify jvm options for anything that is run with the Boot JDK.
53070  # Not all JVM:s accept the same arguments on the command line.
53071  #
53072
53073# Check whether --with-boot-jdk-jvmargs was given.
53074if test "${with_boot_jdk_jvmargs+set}" = set; then :
53075  withval=$with_boot_jdk_jvmargs;
53076fi
53077
53078
53079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
53080$as_echo_n "checking flags for boot jdk java command ... " >&6; }
53081
53082  # Disable special log output when a debug build is used as Boot JDK...
53083
53084  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
53085  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
53086  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
53087  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53088  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53089  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53090    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
53091    JVM_ARG_OK=true
53092  else
53093    $ECHO "Arg failed:" >&5
53094    $ECHO "$OUTPUT" >&5
53095    JVM_ARG_OK=false
53096  fi
53097
53098
53099  # Apply user provided options.
53100
53101  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
53102  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
53103  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
53104  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53105  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53106  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53107    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
53108    JVM_ARG_OK=true
53109  else
53110    $ECHO "Arg failed:" >&5
53111    $ECHO "$OUTPUT" >&5
53112    JVM_ARG_OK=false
53113  fi
53114
53115
53116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
53117$as_echo "$boot_jdk_jvmargs" >&6; }
53118
53119  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
53120  JAVA_FLAGS=$boot_jdk_jvmargs
53121
53122
53123
53124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
53125$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
53126
53127  # Starting amount of heap memory.
53128
53129  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
53130  $ECHO "Command: $JAVA -Xms64M -version" >&5
53131  OUTPUT=`$JAVA -Xms64M -version 2>&1`
53132  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53133  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53134  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53135    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
53136    JVM_ARG_OK=true
53137  else
53138    $ECHO "Arg failed:" >&5
53139    $ECHO "$OUTPUT" >&5
53140    JVM_ARG_OK=false
53141  fi
53142
53143
53144  # Maximum amount of heap memory.
53145  # Maximum stack size.
53146  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
53147  if test "x$BUILD_NUM_BITS" = x32; then
53148    if test "$JVM_MAX_HEAP" -gt "1100"; then
53149      JVM_MAX_HEAP=1100
53150    elif test "$JVM_MAX_HEAP" -lt "512"; then
53151      JVM_MAX_HEAP=512
53152    fi
53153    STACK_SIZE=768
53154  else
53155    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
53156    # pointers are used. Apparently, we need to increase the heap and stack
53157    # space for the jvm. More specifically, when running javac to build huge
53158    # jdk batch
53159    if test "$JVM_MAX_HEAP" -gt "1600"; then
53160      JVM_MAX_HEAP=1600
53161    elif test "$JVM_MAX_HEAP" -lt "512"; then
53162      JVM_MAX_HEAP=512
53163    fi
53164    STACK_SIZE=1536
53165  fi
53166
53167  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
53168  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
53169  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
53170  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53171  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53172  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53173    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
53174    JVM_ARG_OK=true
53175  else
53176    $ECHO "Arg failed:" >&5
53177    $ECHO "$OUTPUT" >&5
53178    JVM_ARG_OK=false
53179  fi
53180
53181
53182  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53183  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53184  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53185  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53186  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53187  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53188    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53189    JVM_ARG_OK=true
53190  else
53191    $ECHO "Arg failed:" >&5
53192    $ECHO "$OUTPUT" >&5
53193    JVM_ARG_OK=false
53194  fi
53195
53196
53197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53198$as_echo "$boot_jdk_jvmargs_big" >&6; }
53199
53200  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53201
53202
53203
53204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53205$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53206
53207  # Use serial gc for small short lived tools if possible
53208
53209  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53210  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53211  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53212  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53213  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53214  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53215    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53216    JVM_ARG_OK=true
53217  else
53218    $ECHO "Arg failed:" >&5
53219    $ECHO "$OUTPUT" >&5
53220    JVM_ARG_OK=false
53221  fi
53222
53223
53224  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53225  $ECHO "Command: $JAVA -Xms32M -version" >&5
53226  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53227  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53228  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53229  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53230    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53231    JVM_ARG_OK=true
53232  else
53233    $ECHO "Arg failed:" >&5
53234    $ECHO "$OUTPUT" >&5
53235    JVM_ARG_OK=false
53236  fi
53237
53238
53239  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53240  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53241  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53242  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53243  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53244  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53245    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53246    JVM_ARG_OK=true
53247  else
53248    $ECHO "Arg failed:" >&5
53249    $ECHO "$OUTPUT" >&5
53250    JVM_ARG_OK=false
53251  fi
53252
53253
53254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53255$as_echo "$boot_jdk_jvmargs_small" >&6; }
53256
53257  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53258
53259
53260  JAVA_TOOL_FLAGS_SMALL=""
53261  for f in $JAVA_FLAGS_SMALL; do
53262    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53263  done
53264
53265
53266
53267# Setup smart javac (after cores and memory have been setup)
53268
53269
53270# Check whether --with-sjavac-server-java was given.
53271if test "${with_sjavac_server_java+set}" = set; then :
53272  withval=$with_sjavac_server_java;
53273fi
53274
53275
53276  if test "x$with_sjavac_server_java" != x; then
53277    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53278    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53279    if test "x$FOUND_VERSION" = x; then
53280      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53281    fi
53282  else
53283    SJAVAC_SERVER_JAVA="$JAVA"
53284  fi
53285
53286
53287  if test "$MEMORY_SIZE" -gt "3000"; then
53288
53289  $ECHO "Check if jvm arg is ok: -d64" >&5
53290  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53291  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53292  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53293  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53294  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53295    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53296    JVM_ARG_OK=true
53297  else
53298    $ECHO "Arg failed:" >&5
53299    $ECHO "$OUTPUT" >&5
53300    JVM_ARG_OK=false
53301  fi
53302
53303    if test "$JVM_ARG_OK" = true; then
53304      JVM_64BIT=true
53305      JVM_ARG_OK=false
53306    fi
53307  fi
53308
53309  MX_VALUE=`expr $MEMORY_SIZE / 2`
53310  if test "$JVM_64BIT" = true; then
53311    # Set ms lower than mx since more than one instance of the server might
53312    # get launched at the same time before they figure out which instance won.
53313    MS_VALUE=512
53314    if test "$MX_VALUE" -gt "2048"; then
53315      MX_VALUE=2048
53316    fi
53317  else
53318    MS_VALUE=256
53319    if test "$MX_VALUE" -gt "1500"; then
53320      MX_VALUE=1500
53321    fi
53322  fi
53323  if test "$MX_VALUE" -lt "512"; then
53324    MX_VALUE=512
53325  fi
53326
53327  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53328  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53329  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53330  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53331  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53333    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53334    JVM_ARG_OK=true
53335  else
53336    $ECHO "Arg failed:" >&5
53337    $ECHO "$OUTPUT" >&5
53338    JVM_ARG_OK=false
53339  fi
53340
53341
53342
53343  # Check whether --enable-sjavac was given.
53344if test "${enable_sjavac+set}" = set; then :
53345  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53346else
53347  ENABLE_SJAVAC='no'
53348fi
53349
53350  if test "x$JVM_ARG_OK" = "xfalse"; then
53351    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53352$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53353    ENABLE_SJAVAC=no;
53354  fi
53355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53356$as_echo_n "checking whether to use sjavac... " >&6; }
53357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53358$as_echo "$ENABLE_SJAVAC" >&6; }
53359
53360
53361
53362# Can the C/C++ compiler use precompiled headers?
53363
53364
53365  ###############################################################################
53366  #
53367  # Can the C/C++ compiler use precompiled headers?
53368  #
53369  # Check whether --enable-precompiled-headers was given.
53370if test "${enable_precompiled_headers+set}" = set; then :
53371  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53372else
53373  ENABLE_PRECOMPH=yes
53374fi
53375
53376
53377  USE_PRECOMPILED_HEADER=1
53378  if test "x$ENABLE_PRECOMPH" = xno; then
53379    USE_PRECOMPILED_HEADER=0
53380  fi
53381
53382  if test "x$ENABLE_PRECOMPH" = xyes; then
53383    # Check that the compiler actually supports precomp headers.
53384    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53386$as_echo_n "checking that precompiled headers work... " >&6; }
53387      echo "int alfa();" > conftest.h
53388      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53389      if test ! -f conftest.hpp.gch; then
53390        USE_PRECOMPILED_HEADER=0
53391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53392$as_echo "no" >&6; }
53393      else
53394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53395$as_echo "yes" >&6; }
53396      fi
53397      rm -f conftest.h conftest.hpp.gch
53398    fi
53399  fi
53400
53401
53402
53403
53404# Setup use of ccache, if available
53405
53406  # Check whether --enable-ccache was given.
53407if test "${enable_ccache+set}" = set; then :
53408  enableval=$enable_ccache;
53409fi
53410
53411
53412  CCACHE=
53413  CCACHE_STATUS=
53414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53415$as_echo_n "checking is ccache enabled... " >&6; }
53416  if test "x$enable_ccache" = xyes; then
53417    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53419$as_echo "yes" >&6; }
53420      OLD_PATH="$PATH"
53421      if test "x$TOOLCHAIN_PATH" != x; then
53422        PATH=$TOOLCHAIN_PATH:$PATH
53423      fi
53424
53425
53426
53427  # Publish this variable in the help.
53428
53429
53430  if test "x$CCACHE" = x; then
53431    # The variable is not set by user, try to locate tool using the code snippet
53432    for ac_prog in ccache
53433do
53434  # Extract the first word of "$ac_prog", so it can be a program name with args.
53435set dummy $ac_prog; ac_word=$2
53436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53437$as_echo_n "checking for $ac_word... " >&6; }
53438if ${ac_cv_path_CCACHE+:} false; then :
53439  $as_echo_n "(cached) " >&6
53440else
53441  case $CCACHE in
53442  [\\/]* | ?:[\\/]*)
53443  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53444  ;;
53445  *)
53446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53447for as_dir in $PATH
53448do
53449  IFS=$as_save_IFS
53450  test -z "$as_dir" && as_dir=.
53451    for ac_exec_ext in '' $ac_executable_extensions; do
53452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53453    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53455    break 2
53456  fi
53457done
53458  done
53459IFS=$as_save_IFS
53460
53461  ;;
53462esac
53463fi
53464CCACHE=$ac_cv_path_CCACHE
53465if test -n "$CCACHE"; then
53466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53467$as_echo "$CCACHE" >&6; }
53468else
53469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53470$as_echo "no" >&6; }
53471fi
53472
53473
53474  test -n "$CCACHE" && break
53475done
53476
53477  else
53478    # The variable is set, but is it from the command line or the environment?
53479
53480    # Try to remove the string !CCACHE! from our list.
53481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53483      # If it failed, the variable was not from the command line. Ignore it,
53484      # but warn the user (except for BASH, which is always set by the calling BASH).
53485      if test "xCCACHE" != xBASH; then
53486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53487$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53488      fi
53489      # Try to locate tool using the code snippet
53490      for ac_prog in ccache
53491do
53492  # Extract the first word of "$ac_prog", so it can be a program name with args.
53493set dummy $ac_prog; ac_word=$2
53494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53495$as_echo_n "checking for $ac_word... " >&6; }
53496if ${ac_cv_path_CCACHE+:} false; then :
53497  $as_echo_n "(cached) " >&6
53498else
53499  case $CCACHE in
53500  [\\/]* | ?:[\\/]*)
53501  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53502  ;;
53503  *)
53504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53505for as_dir in $PATH
53506do
53507  IFS=$as_save_IFS
53508  test -z "$as_dir" && as_dir=.
53509    for ac_exec_ext in '' $ac_executable_extensions; do
53510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53511    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53513    break 2
53514  fi
53515done
53516  done
53517IFS=$as_save_IFS
53518
53519  ;;
53520esac
53521fi
53522CCACHE=$ac_cv_path_CCACHE
53523if test -n "$CCACHE"; then
53524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53525$as_echo "$CCACHE" >&6; }
53526else
53527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53528$as_echo "no" >&6; }
53529fi
53530
53531
53532  test -n "$CCACHE" && break
53533done
53534
53535    else
53536      # If it succeeded, then it was overridden by the user. We will use it
53537      # for the tool.
53538
53539      # First remove it from the list of overridden variables, so we can test
53540      # for unknown variables in the end.
53541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53542
53543      # Check if the provided tool contains a complete path.
53544      tool_specified="$CCACHE"
53545      tool_basename="${tool_specified##*/}"
53546      if test "x$tool_basename" = "x$tool_specified"; then
53547        # A command without a complete path is provided, search $PATH.
53548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53549$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53550        # Extract the first word of "$tool_basename", so it can be a program name with args.
53551set dummy $tool_basename; ac_word=$2
53552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53553$as_echo_n "checking for $ac_word... " >&6; }
53554if ${ac_cv_path_CCACHE+:} false; then :
53555  $as_echo_n "(cached) " >&6
53556else
53557  case $CCACHE in
53558  [\\/]* | ?:[\\/]*)
53559  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53560  ;;
53561  *)
53562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53563for as_dir in $PATH
53564do
53565  IFS=$as_save_IFS
53566  test -z "$as_dir" && as_dir=.
53567    for ac_exec_ext in '' $ac_executable_extensions; do
53568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53569    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53571    break 2
53572  fi
53573done
53574  done
53575IFS=$as_save_IFS
53576
53577  ;;
53578esac
53579fi
53580CCACHE=$ac_cv_path_CCACHE
53581if test -n "$CCACHE"; then
53582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53583$as_echo "$CCACHE" >&6; }
53584else
53585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53586$as_echo "no" >&6; }
53587fi
53588
53589
53590        if test "x$CCACHE" = x; then
53591          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53592        fi
53593      else
53594        # Otherwise we believe it is a complete path. Use it as it is.
53595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53596$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53598$as_echo_n "checking for CCACHE... " >&6; }
53599        if test ! -x "$tool_specified"; then
53600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53601$as_echo "not found" >&6; }
53602          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53603        fi
53604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53605$as_echo "$tool_specified" >&6; }
53606      fi
53607    fi
53608  fi
53609
53610
53611
53612  if test "x$CCACHE" = x; then
53613    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53614  fi
53615
53616
53617      PATH="$OLD_PATH"
53618      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53619      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53620    else
53621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53622$as_echo "no" >&6; }
53623      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53624$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53625    fi
53626  elif test "x$enable_ccache" = xno; then
53627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53628$as_echo "no, explicitly disabled" >&6; }
53629    CCACHE_STATUS="Disabled"
53630  elif test "x$enable_ccache" = x; then
53631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53632$as_echo "no" >&6; }
53633  else
53634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53635$as_echo "unknown" >&6; }
53636    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53637  fi
53638
53639
53640
53641# Check whether --with-ccache-dir was given.
53642if test "${with_ccache_dir+set}" = set; then :
53643  withval=$with_ccache_dir;
53644fi
53645
53646
53647  if test "x$with_ccache_dir" != x; then
53648    # When using a non home ccache directory, assume the use is to share ccache files
53649    # with other users. Thus change the umask.
53650    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53651    if test "x$CCACHE" = x; then
53652      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53653$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53654    fi
53655  fi
53656
53657  if test "x$CCACHE" != x; then
53658
53659  if test "x$CCACHE" != x; then
53660    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53661      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53662          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53663      if test "x$HAS_BAD_CCACHE" != "x"; then
53664        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53665      fi
53666      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53667$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53668      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53669      PUSHED_FLAGS="$CXXFLAGS"
53670      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53671      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53672/* end confdefs.h.  */
53673
53674int
53675main ()
53676{
53677
53678  ;
53679  return 0;
53680}
53681_ACEOF
53682if ac_fn_cxx_try_compile "$LINENO"; then :
53683  CC_KNOWS_CCACHE_TRICK=yes
53684else
53685  CC_KNOWS_CCACHE_TRICK=no
53686fi
53687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53688      CXXFLAGS="$PUSHED_FLAGS"
53689      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53691$as_echo "yes" >&6; }
53692        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53693
53694        CCACHE_SLOPPINESS=pch_defines,time_macros
53695      else
53696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53697$as_echo "no" >&6; }
53698        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53699      fi
53700    fi
53701
53702    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53703        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53704
53705    if test "x$SET_CCACHE_DIR" != x; then
53706      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53707      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53708    fi
53709  fi
53710
53711  fi
53712
53713
53714###############################################################################
53715#
53716# And now the finish...
53717#
53718###############################################################################
53719
53720# Check for some common pitfalls
53721
53722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53723    file_to_test="$SRC_ROOT/LICENSE"
53724    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53725      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
53726    fi
53727  fi
53728
53729
53730  # Did user specify any unknown variables?
53731
53732  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53733    # Replace the separating ! with spaces before presenting for end user.
53734    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53735    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53736$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53737  fi
53738
53739
53740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53741$as_echo_n "checking if build directory is on local disk... " >&6; }
53742
53743  # df -l lists only local disks; if the given directory is not found then
53744  # a non-zero exit code is given
53745  if test "x$DF" = x; then
53746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53747      # msys does not have df; use Windows "net use" instead.
53748      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53749      if test "x$IS_NETWORK_DISK" = x; then
53750        OUTPUT_DIR_IS_LOCAL="yes"
53751      else
53752        OUTPUT_DIR_IS_LOCAL="no"
53753      fi
53754    else
53755      # No df here, say it's local
53756      OUTPUT_DIR_IS_LOCAL="yes"
53757    fi
53758  else
53759    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53760      OUTPUT_DIR_IS_LOCAL="yes"
53761    else
53762      OUTPUT_DIR_IS_LOCAL="no"
53763    fi
53764  fi
53765
53766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53767$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53768
53769
53770
53771  # Check if the user has any old-style ALT_ variables set.
53772  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53773
53774  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53775  # Since we can't properly handle the dependencies for this, warn the user about the situation
53776  if test -e $OUTPUT_ROOT/spec.gmk; then
53777    IS_RECONFIGURE=yes
53778  else
53779    IS_RECONFIGURE=no
53780  fi
53781
53782
53783# At the end, call the custom hook. (Dummy macro if no custom sources available)
53784
53785
53786# We're messing a bit with internal autoconf variables to put the config.status
53787# in the output directory instead of the current directory.
53788CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53789
53790# Create the actual output files. Now the main work of configure is done.
53791cat >confcache <<\_ACEOF
53792# This file is a shell script that caches the results of configure
53793# tests run on this system so they can be shared between configure
53794# scripts and configure runs, see configure's option --config-cache.
53795# It is not useful on other systems.  If it contains results you don't
53796# want to keep, you may remove or edit it.
53797#
53798# config.status only pays attention to the cache file if you give it
53799# the --recheck option to rerun configure.
53800#
53801# `ac_cv_env_foo' variables (set or unset) will be overridden when
53802# loading this file, other *unset* `ac_cv_foo' will be assigned the
53803# following values.
53804
53805_ACEOF
53806
53807# The following way of writing the cache mishandles newlines in values,
53808# but we know of no workaround that is simple, portable, and efficient.
53809# So, we kill variables containing newlines.
53810# Ultrix sh set writes to stderr and can't be redirected directly,
53811# and sets the high bit in the cache file unless we assign to the vars.
53812(
53813  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53814    eval ac_val=\$$ac_var
53815    case $ac_val in #(
53816    *${as_nl}*)
53817      case $ac_var in #(
53818      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53819$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53820      esac
53821      case $ac_var in #(
53822      _ | IFS | as_nl) ;; #(
53823      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53824      *) { eval $ac_var=; unset $ac_var;} ;;
53825      esac ;;
53826    esac
53827  done
53828
53829  (set) 2>&1 |
53830    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53831    *${as_nl}ac_space=\ *)
53832      # `set' does not quote correctly, so add quotes: double-quote
53833      # substitution turns \\\\ into \\, and sed turns \\ into \.
53834      sed -n \
53835	"s/'/'\\\\''/g;
53836	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53837      ;; #(
53838    *)
53839      # `set' quotes correctly as required by POSIX, so do not add quotes.
53840      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53841      ;;
53842    esac |
53843    sort
53844) |
53845  sed '
53846     /^ac_cv_env_/b end
53847     t clear
53848     :clear
53849     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53850     t end
53851     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53852     :end' >>confcache
53853if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53854  if test -w "$cache_file"; then
53855    if test "x$cache_file" != "x/dev/null"; then
53856      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53857$as_echo "$as_me: updating cache $cache_file" >&6;}
53858      if test ! -f "$cache_file" || test -h "$cache_file"; then
53859	cat confcache >"$cache_file"
53860      else
53861        case $cache_file in #(
53862        */* | ?:*)
53863	  mv -f confcache "$cache_file"$$ &&
53864	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53865        *)
53866	  mv -f confcache "$cache_file" ;;
53867	esac
53868      fi
53869    fi
53870  else
53871    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53872$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53873  fi
53874fi
53875rm -f confcache
53876
53877test "x$prefix" = xNONE && prefix=$ac_default_prefix
53878# Let make expand exec_prefix.
53879test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53880
53881# Transform confdefs.h into DEFS.
53882# Protect against shell expansion while executing Makefile rules.
53883# Protect against Makefile macro expansion.
53884#
53885# If the first sed substitution is executed (which looks for macros that
53886# take arguments), then branch to the quote section.  Otherwise,
53887# look for a macro that doesn't take arguments.
53888ac_script='
53889:mline
53890/\\$/{
53891 N
53892 s,\\\n,,
53893 b mline
53894}
53895t clear
53896:clear
53897s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53898t quote
53899s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53900t quote
53901b any
53902:quote
53903s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53904s/\[/\\&/g
53905s/\]/\\&/g
53906s/\$/$$/g
53907H
53908:any
53909${
53910	g
53911	s/^\n//
53912	s/\n/ /g
53913	p
53914}
53915'
53916DEFS=`sed -n "$ac_script" confdefs.h`
53917
53918
53919ac_libobjs=
53920ac_ltlibobjs=
53921U=
53922for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53923  # 1. Remove the extension, and $U if already installed.
53924  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53925  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53926  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53927  #    will be set to the directory where LIBOBJS objects are built.
53928  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53929  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53930done
53931LIBOBJS=$ac_libobjs
53932
53933LTLIBOBJS=$ac_ltlibobjs
53934
53935
53936
53937: "${CONFIG_STATUS=./config.status}"
53938ac_write_fail=0
53939ac_clean_files_save=$ac_clean_files
53940ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53941{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53942$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53943as_write_fail=0
53944cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53945#! $SHELL
53946# Generated by $as_me.
53947# Run this file to recreate the current configuration.
53948# Compiler output produced by configure, useful for debugging
53949# configure, is in config.log if it exists.
53950
53951debug=false
53952ac_cs_recheck=false
53953ac_cs_silent=false
53954
53955SHELL=\${CONFIG_SHELL-$SHELL}
53956export SHELL
53957_ASEOF
53958cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53959## -------------------- ##
53960## M4sh Initialization. ##
53961## -------------------- ##
53962
53963# Be more Bourne compatible
53964DUALCASE=1; export DUALCASE # for MKS sh
53965if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53966  emulate sh
53967  NULLCMD=:
53968  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53969  # is contrary to our usage.  Disable this feature.
53970  alias -g '${1+"$@"}'='"$@"'
53971  setopt NO_GLOB_SUBST
53972else
53973  case `(set -o) 2>/dev/null` in #(
53974  *posix*) :
53975    set -o posix ;; #(
53976  *) :
53977     ;;
53978esac
53979fi
53980
53981
53982as_nl='
53983'
53984export as_nl
53985# Printing a long string crashes Solaris 7 /usr/bin/printf.
53986as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53987as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53988as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53989# Prefer a ksh shell builtin over an external printf program on Solaris,
53990# but without wasting forks for bash or zsh.
53991if test -z "$BASH_VERSION$ZSH_VERSION" \
53992    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53993  as_echo='print -r --'
53994  as_echo_n='print -rn --'
53995elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53996  as_echo='printf %s\n'
53997  as_echo_n='printf %s'
53998else
53999  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54000    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54001    as_echo_n='/usr/ucb/echo -n'
54002  else
54003    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
54004    as_echo_n_body='eval
54005      arg=$1;
54006      case $arg in #(
54007      *"$as_nl"*)
54008	expr "X$arg" : "X\\(.*\\)$as_nl";
54009	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
54010      esac;
54011      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
54012    '
54013    export as_echo_n_body
54014    as_echo_n='sh -c $as_echo_n_body as_echo'
54015  fi
54016  export as_echo_body
54017  as_echo='sh -c $as_echo_body as_echo'
54018fi
54019
54020# The user is always right.
54021if test "${PATH_SEPARATOR+set}" != set; then
54022  PATH_SEPARATOR=:
54023  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
54024    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
54025      PATH_SEPARATOR=';'
54026  }
54027fi
54028
54029
54030# IFS
54031# We need space, tab and new line, in precisely that order.  Quoting is
54032# there to prevent editors from complaining about space-tab.
54033# (If _AS_PATH_WALK were called with IFS unset, it would disable word
54034# splitting by setting IFS to empty value.)
54035IFS=" ""	$as_nl"
54036
54037# Find who we are.  Look in the path if we contain no directory separator.
54038as_myself=
54039case $0 in #((
54040  *[\\/]* ) as_myself=$0 ;;
54041  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54042for as_dir in $PATH
54043do
54044  IFS=$as_save_IFS
54045  test -z "$as_dir" && as_dir=.
54046    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54047  done
54048IFS=$as_save_IFS
54049
54050     ;;
54051esac
54052# We did not find ourselves, most probably we were run as `sh COMMAND'
54053# in which case we are not to be found in the path.
54054if test "x$as_myself" = x; then
54055  as_myself=$0
54056fi
54057if test ! -f "$as_myself"; then
54058  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54059  exit 1
54060fi
54061
54062# Unset variables that we do not need and which cause bugs (e.g. in
54063# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
54064# suppresses any "Segmentation fault" message there.  '((' could
54065# trigger a bug in pdksh 5.2.14.
54066for as_var in BASH_ENV ENV MAIL MAILPATH
54067do eval test x\${$as_var+set} = xset \
54068  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54069done
54070PS1='$ '
54071PS2='> '
54072PS4='+ '
54073
54074# NLS nuisances.
54075LC_ALL=C
54076export LC_ALL
54077LANGUAGE=C
54078export LANGUAGE
54079
54080# CDPATH.
54081(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54082
54083
54084# as_fn_error STATUS ERROR [LINENO LOG_FD]
54085# ----------------------------------------
54086# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54087# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54088# script with STATUS, using 1 if that was 0.
54089as_fn_error ()
54090{
54091  as_status=$1; test $as_status -eq 0 && as_status=1
54092  if test "$4"; then
54093    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54094    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54095  fi
54096  $as_echo "$as_me: error: $2" >&2
54097  as_fn_exit $as_status
54098} # as_fn_error
54099
54100
54101# as_fn_set_status STATUS
54102# -----------------------
54103# Set $? to STATUS, without forking.
54104as_fn_set_status ()
54105{
54106  return $1
54107} # as_fn_set_status
54108
54109# as_fn_exit STATUS
54110# -----------------
54111# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54112as_fn_exit ()
54113{
54114  set +e
54115  as_fn_set_status $1
54116  exit $1
54117} # as_fn_exit
54118
54119# as_fn_unset VAR
54120# ---------------
54121# Portably unset VAR.
54122as_fn_unset ()
54123{
54124  { eval $1=; unset $1;}
54125}
54126as_unset=as_fn_unset
54127# as_fn_append VAR VALUE
54128# ----------------------
54129# Append the text in VALUE to the end of the definition contained in VAR. Take
54130# advantage of any shell optimizations that allow amortized linear growth over
54131# repeated appends, instead of the typical quadratic growth present in naive
54132# implementations.
54133if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54134  eval 'as_fn_append ()
54135  {
54136    eval $1+=\$2
54137  }'
54138else
54139  as_fn_append ()
54140  {
54141    eval $1=\$$1\$2
54142  }
54143fi # as_fn_append
54144
54145# as_fn_arith ARG...
54146# ------------------
54147# Perform arithmetic evaluation on the ARGs, and store the result in the
54148# global $as_val. Take advantage of shells that can avoid forks. The arguments
54149# must be portable across $(()) and expr.
54150if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54151  eval 'as_fn_arith ()
54152  {
54153    as_val=$(( $* ))
54154  }'
54155else
54156  as_fn_arith ()
54157  {
54158    as_val=`expr "$@" || test $? -eq 1`
54159  }
54160fi # as_fn_arith
54161
54162
54163if expr a : '\(a\)' >/dev/null 2>&1 &&
54164   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54165  as_expr=expr
54166else
54167  as_expr=false
54168fi
54169
54170if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54171  as_basename=basename
54172else
54173  as_basename=false
54174fi
54175
54176if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54177  as_dirname=dirname
54178else
54179  as_dirname=false
54180fi
54181
54182as_me=`$as_basename -- "$0" ||
54183$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54184	 X"$0" : 'X\(//\)$' \| \
54185	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54186$as_echo X/"$0" |
54187    sed '/^.*\/\([^/][^/]*\)\/*$/{
54188	    s//\1/
54189	    q
54190	  }
54191	  /^X\/\(\/\/\)$/{
54192	    s//\1/
54193	    q
54194	  }
54195	  /^X\/\(\/\).*/{
54196	    s//\1/
54197	    q
54198	  }
54199	  s/.*/./; q'`
54200
54201# Avoid depending upon Character Ranges.
54202as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54203as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54204as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54205as_cr_digits='0123456789'
54206as_cr_alnum=$as_cr_Letters$as_cr_digits
54207
54208ECHO_C= ECHO_N= ECHO_T=
54209case `echo -n x` in #(((((
54210-n*)
54211  case `echo 'xy\c'` in
54212  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54213  xy)  ECHO_C='\c';;
54214  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54215       ECHO_T='	';;
54216  esac;;
54217*)
54218  ECHO_N='-n';;
54219esac
54220
54221rm -f conf$$ conf$$.exe conf$$.file
54222if test -d conf$$.dir; then
54223  rm -f conf$$.dir/conf$$.file
54224else
54225  rm -f conf$$.dir
54226  mkdir conf$$.dir 2>/dev/null
54227fi
54228if (echo >conf$$.file) 2>/dev/null; then
54229  if ln -s conf$$.file conf$$ 2>/dev/null; then
54230    as_ln_s='ln -s'
54231    # ... but there are two gotchas:
54232    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54233    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54234    # In both cases, we have to default to `cp -pR'.
54235    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54236      as_ln_s='cp -pR'
54237  elif ln conf$$.file conf$$ 2>/dev/null; then
54238    as_ln_s=ln
54239  else
54240    as_ln_s='cp -pR'
54241  fi
54242else
54243  as_ln_s='cp -pR'
54244fi
54245rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54246rmdir conf$$.dir 2>/dev/null
54247
54248
54249# as_fn_mkdir_p
54250# -------------
54251# Create "$as_dir" as a directory, including parents if necessary.
54252as_fn_mkdir_p ()
54253{
54254
54255  case $as_dir in #(
54256  -*) as_dir=./$as_dir;;
54257  esac
54258  test -d "$as_dir" || eval $as_mkdir_p || {
54259    as_dirs=
54260    while :; do
54261      case $as_dir in #(
54262      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54263      *) as_qdir=$as_dir;;
54264      esac
54265      as_dirs="'$as_qdir' $as_dirs"
54266      as_dir=`$as_dirname -- "$as_dir" ||
54267$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54268	 X"$as_dir" : 'X\(//\)[^/]' \| \
54269	 X"$as_dir" : 'X\(//\)$' \| \
54270	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54271$as_echo X"$as_dir" |
54272    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54273	    s//\1/
54274	    q
54275	  }
54276	  /^X\(\/\/\)[^/].*/{
54277	    s//\1/
54278	    q
54279	  }
54280	  /^X\(\/\/\)$/{
54281	    s//\1/
54282	    q
54283	  }
54284	  /^X\(\/\).*/{
54285	    s//\1/
54286	    q
54287	  }
54288	  s/.*/./; q'`
54289      test -d "$as_dir" && break
54290    done
54291    test -z "$as_dirs" || eval "mkdir $as_dirs"
54292  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54293
54294
54295} # as_fn_mkdir_p
54296if mkdir -p . 2>/dev/null; then
54297  as_mkdir_p='mkdir -p "$as_dir"'
54298else
54299  test -d ./-p && rmdir ./-p
54300  as_mkdir_p=false
54301fi
54302
54303
54304# as_fn_executable_p FILE
54305# -----------------------
54306# Test if FILE is an executable regular file.
54307as_fn_executable_p ()
54308{
54309  test -f "$1" && test -x "$1"
54310} # as_fn_executable_p
54311as_test_x='test -x'
54312as_executable_p=as_fn_executable_p
54313
54314# Sed expression to map a string onto a valid CPP name.
54315as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54316
54317# Sed expression to map a string onto a valid variable name.
54318as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54319
54320
54321exec 6>&1
54322## ----------------------------------- ##
54323## Main body of $CONFIG_STATUS script. ##
54324## ----------------------------------- ##
54325_ASEOF
54326test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54327
54328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54329# Save the log message, to keep $0 and so on meaningful, and to
54330# report actual input values of CONFIG_FILES etc. instead of their
54331# values after options handling.
54332ac_log="
54333This file was extended by OpenJDK $as_me jdk9, which was
54334generated by GNU Autoconf 2.69.  Invocation command line was
54335
54336  CONFIG_FILES    = $CONFIG_FILES
54337  CONFIG_HEADERS  = $CONFIG_HEADERS
54338  CONFIG_LINKS    = $CONFIG_LINKS
54339  CONFIG_COMMANDS = $CONFIG_COMMANDS
54340  $ $0 $@
54341
54342on `(hostname || uname -n) 2>/dev/null | sed 1q`
54343"
54344
54345_ACEOF
54346
54347case $ac_config_files in *"
54348"*) set x $ac_config_files; shift; ac_config_files=$*;;
54349esac
54350
54351
54352
54353cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54354# Files that config.status was made for.
54355config_files="$ac_config_files"
54356
54357_ACEOF
54358
54359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54360ac_cs_usage="\
54361\`$as_me' instantiates files and other configuration actions
54362from templates according to the current configuration.  Unless the files
54363and actions are specified as TAGs, all are instantiated by default.
54364
54365Usage: $0 [OPTION]... [TAG]...
54366
54367  -h, --help       print this help, then exit
54368  -V, --version    print version number and configuration settings, then exit
54369      --config     print configuration, then exit
54370  -q, --quiet, --silent
54371                   do not print progress messages
54372  -d, --debug      don't remove temporary files
54373      --recheck    update $as_me by reconfiguring in the same conditions
54374      --file=FILE[:TEMPLATE]
54375                   instantiate the configuration file FILE
54376
54377Configuration files:
54378$config_files
54379
54380Report bugs to <build-dev@openjdk.java.net>.
54381OpenJDK home page: <http://openjdk.java.net>."
54382
54383_ACEOF
54384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54385ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54386ac_cs_version="\\
54387OpenJDK config.status jdk9
54388configured by $0, generated by GNU Autoconf 2.69,
54389  with options \\"\$ac_cs_config\\"
54390
54391Copyright (C) 2012 Free Software Foundation, Inc.
54392This config.status script is free software; the Free Software Foundation
54393gives unlimited permission to copy, distribute and modify it."
54394
54395ac_pwd='$ac_pwd'
54396srcdir='$srcdir'
54397AWK='$AWK'
54398test -n "\$AWK" || AWK=awk
54399_ACEOF
54400
54401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54402# The default lists apply if the user does not specify any file.
54403ac_need_defaults=:
54404while test $# != 0
54405do
54406  case $1 in
54407  --*=?*)
54408    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54409    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54410    ac_shift=:
54411    ;;
54412  --*=)
54413    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54414    ac_optarg=
54415    ac_shift=:
54416    ;;
54417  *)
54418    ac_option=$1
54419    ac_optarg=$2
54420    ac_shift=shift
54421    ;;
54422  esac
54423
54424  case $ac_option in
54425  # Handling of the options.
54426  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54427    ac_cs_recheck=: ;;
54428  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54429    $as_echo "$ac_cs_version"; exit ;;
54430  --config | --confi | --conf | --con | --co | --c )
54431    $as_echo "$ac_cs_config"; exit ;;
54432  --debug | --debu | --deb | --de | --d | -d )
54433    debug=: ;;
54434  --file | --fil | --fi | --f )
54435    $ac_shift
54436    case $ac_optarg in
54437    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54438    '') as_fn_error $? "missing file argument" ;;
54439    esac
54440    as_fn_append CONFIG_FILES " '$ac_optarg'"
54441    ac_need_defaults=false;;
54442  --he | --h |  --help | --hel | -h )
54443    $as_echo "$ac_cs_usage"; exit ;;
54444  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54445  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54446    ac_cs_silent=: ;;
54447
54448  # This is an error.
54449  -*) as_fn_error $? "unrecognized option: \`$1'
54450Try \`$0 --help' for more information." ;;
54451
54452  *) as_fn_append ac_config_targets " $1"
54453     ac_need_defaults=false ;;
54454
54455  esac
54456  shift
54457done
54458
54459ac_configure_extra_args=
54460
54461if $ac_cs_silent; then
54462  exec 6>/dev/null
54463  ac_configure_extra_args="$ac_configure_extra_args --silent"
54464fi
54465
54466_ACEOF
54467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54468if \$ac_cs_recheck; then
54469  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54470  shift
54471  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54472  CONFIG_SHELL='$SHELL'
54473  export CONFIG_SHELL
54474  exec "\$@"
54475fi
54476
54477_ACEOF
54478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54479exec 5>>config.log
54480{
54481  echo
54482  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54483## Running $as_me. ##
54484_ASBOX
54485  $as_echo "$ac_log"
54486} >&5
54487
54488_ACEOF
54489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54490_ACEOF
54491
54492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54493
54494# Handling of arguments.
54495for ac_config_target in $ac_config_targets
54496do
54497  case $ac_config_target in
54498    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54499    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54500    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54501    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54502    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54503
54504  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54505  esac
54506done
54507
54508
54509# If the user did not use the arguments to specify the items to instantiate,
54510# then the envvar interface is used.  Set only those that are not.
54511# We use the long form for the default assignment because of an extremely
54512# bizarre bug on SunOS 4.1.3.
54513if $ac_need_defaults; then
54514  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54515fi
54516
54517# Have a temporary directory for convenience.  Make it in the build tree
54518# simply because there is no reason against having it here, and in addition,
54519# creating and moving files from /tmp can sometimes cause problems.
54520# Hook for its removal unless debugging.
54521# Note that there is a small window in which the directory will not be cleaned:
54522# after its creation but before its name has been assigned to `$tmp'.
54523$debug ||
54524{
54525  tmp= ac_tmp=
54526  trap 'exit_status=$?
54527  : "${ac_tmp:=$tmp}"
54528  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54529' 0
54530  trap 'as_fn_exit 1' 1 2 13 15
54531}
54532# Create a (secure) tmp directory for tmp files.
54533
54534{
54535  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54536  test -d "$tmp"
54537}  ||
54538{
54539  tmp=./conf$$-$RANDOM
54540  (umask 077 && mkdir "$tmp")
54541} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54542ac_tmp=$tmp
54543
54544# Set up the scripts for CONFIG_FILES section.
54545# No need to generate them if there are no CONFIG_FILES.
54546# This happens for instance with `./config.status config.h'.
54547if test -n "$CONFIG_FILES"; then
54548
54549
54550ac_cr=`echo X | tr X '\015'`
54551# On cygwin, bash can eat \r inside `` if the user requested igncr.
54552# But we know of no other shell where ac_cr would be empty at this
54553# point, so we can use a bashism as a fallback.
54554if test "x$ac_cr" = x; then
54555  eval ac_cr=\$\'\\r\'
54556fi
54557ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54558if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54559  ac_cs_awk_cr='\\r'
54560else
54561  ac_cs_awk_cr=$ac_cr
54562fi
54563
54564echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54565_ACEOF
54566
54567
54568{
54569  echo "cat >conf$$subs.awk <<_ACEOF" &&
54570  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54571  echo "_ACEOF"
54572} >conf$$subs.sh ||
54573  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54574ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54575ac_delim='%!_!# '
54576for ac_last_try in false false false false false :; do
54577  . ./conf$$subs.sh ||
54578    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54579
54580  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54581  if test $ac_delim_n = $ac_delim_num; then
54582    break
54583  elif $ac_last_try; then
54584    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54585  else
54586    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54587  fi
54588done
54589rm -f conf$$subs.sh
54590
54591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54592cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54593_ACEOF
54594sed -n '
54595h
54596s/^/S["/; s/!.*/"]=/
54597p
54598g
54599s/^[^!]*!//
54600:repl
54601t repl
54602s/'"$ac_delim"'$//
54603t delim
54604:nl
54605h
54606s/\(.\{148\}\)..*/\1/
54607t more1
54608s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54609p
54610n
54611b repl
54612:more1
54613s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54614p
54615g
54616s/.\{148\}//
54617t nl
54618:delim
54619h
54620s/\(.\{148\}\)..*/\1/
54621t more2
54622s/["\\]/\\&/g; s/^/"/; s/$/"/
54623p
54624b
54625:more2
54626s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54627p
54628g
54629s/.\{148\}//
54630t delim
54631' <conf$$subs.awk | sed '
54632/^[^""]/{
54633  N
54634  s/\n//
54635}
54636' >>$CONFIG_STATUS || ac_write_fail=1
54637rm -f conf$$subs.awk
54638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54639_ACAWK
54640cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54641  for (key in S) S_is_set[key] = 1
54642  FS = ""
54643
54644}
54645{
54646  line = $ 0
54647  nfields = split(line, field, "@")
54648  substed = 0
54649  len = length(field[1])
54650  for (i = 2; i < nfields; i++) {
54651    key = field[i]
54652    keylen = length(key)
54653    if (S_is_set[key]) {
54654      value = S[key]
54655      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54656      len += length(value) + length(field[++i])
54657      substed = 1
54658    } else
54659      len += 1 + keylen
54660  }
54661
54662  print line
54663}
54664
54665_ACAWK
54666_ACEOF
54667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54668if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54669  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54670else
54671  cat
54672fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54673  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54674_ACEOF
54675
54676# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54677# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54678# trailing colons and then remove the whole line if VPATH becomes empty
54679# (actually we leave an empty line to preserve line numbers).
54680if test "x$srcdir" = x.; then
54681  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54682h
54683s///
54684s/^/:/
54685s/[	 ]*$/:/
54686s/:\$(srcdir):/:/g
54687s/:\${srcdir}:/:/g
54688s/:@srcdir@:/:/g
54689s/^:*//
54690s/:*$//
54691x
54692s/\(=[	 ]*\).*/\1/
54693G
54694s/\n//
54695s/^[^=]*=[	 ]*$//
54696}'
54697fi
54698
54699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54700fi # test -n "$CONFIG_FILES"
54701
54702
54703eval set X "  :F $CONFIG_FILES      "
54704shift
54705for ac_tag
54706do
54707  case $ac_tag in
54708  :[FHLC]) ac_mode=$ac_tag; continue;;
54709  esac
54710  case $ac_mode$ac_tag in
54711  :[FHL]*:*);;
54712  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54713  :[FH]-) ac_tag=-:-;;
54714  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54715  esac
54716  ac_save_IFS=$IFS
54717  IFS=:
54718  set x $ac_tag
54719  IFS=$ac_save_IFS
54720  shift
54721  ac_file=$1
54722  shift
54723
54724  case $ac_mode in
54725  :L) ac_source=$1;;
54726  :[FH])
54727    ac_file_inputs=
54728    for ac_f
54729    do
54730      case $ac_f in
54731      -) ac_f="$ac_tmp/stdin";;
54732      *) # Look for the file first in the build tree, then in the source tree
54733	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54734	 # because $ac_f cannot contain `:'.
54735	 test -f "$ac_f" ||
54736	   case $ac_f in
54737	   [\\/$]*) false;;
54738	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54739	   esac ||
54740	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54741      esac
54742      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54743      as_fn_append ac_file_inputs " '$ac_f'"
54744    done
54745
54746    # Let's still pretend it is `configure' which instantiates (i.e., don't
54747    # use $as_me), people would be surprised to read:
54748    #    /* config.h.  Generated by config.status.  */
54749    configure_input='Generated from '`
54750	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54751	`' by configure.'
54752    if test x"$ac_file" != x-; then
54753      configure_input="$ac_file.  $configure_input"
54754      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54755$as_echo "$as_me: creating $ac_file" >&6;}
54756    fi
54757    # Neutralize special characters interpreted by sed in replacement strings.
54758    case $configure_input in #(
54759    *\&* | *\|* | *\\* )
54760       ac_sed_conf_input=`$as_echo "$configure_input" |
54761       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54762    *) ac_sed_conf_input=$configure_input;;
54763    esac
54764
54765    case $ac_tag in
54766    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54767      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54768    esac
54769    ;;
54770  esac
54771
54772  ac_dir=`$as_dirname -- "$ac_file" ||
54773$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54774	 X"$ac_file" : 'X\(//\)[^/]' \| \
54775	 X"$ac_file" : 'X\(//\)$' \| \
54776	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54777$as_echo X"$ac_file" |
54778    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54779	    s//\1/
54780	    q
54781	  }
54782	  /^X\(\/\/\)[^/].*/{
54783	    s//\1/
54784	    q
54785	  }
54786	  /^X\(\/\/\)$/{
54787	    s//\1/
54788	    q
54789	  }
54790	  /^X\(\/\).*/{
54791	    s//\1/
54792	    q
54793	  }
54794	  s/.*/./; q'`
54795  as_dir="$ac_dir"; as_fn_mkdir_p
54796  ac_builddir=.
54797
54798case "$ac_dir" in
54799.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54800*)
54801  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54802  # A ".." for each directory in $ac_dir_suffix.
54803  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54804  case $ac_top_builddir_sub in
54805  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54806  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54807  esac ;;
54808esac
54809ac_abs_top_builddir=$ac_pwd
54810ac_abs_builddir=$ac_pwd$ac_dir_suffix
54811# for backward compatibility:
54812ac_top_builddir=$ac_top_build_prefix
54813
54814case $srcdir in
54815  .)  # We are building in place.
54816    ac_srcdir=.
54817    ac_top_srcdir=$ac_top_builddir_sub
54818    ac_abs_top_srcdir=$ac_pwd ;;
54819  [\\/]* | ?:[\\/]* )  # Absolute name.
54820    ac_srcdir=$srcdir$ac_dir_suffix;
54821    ac_top_srcdir=$srcdir
54822    ac_abs_top_srcdir=$srcdir ;;
54823  *) # Relative name.
54824    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54825    ac_top_srcdir=$ac_top_build_prefix$srcdir
54826    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54827esac
54828ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54829
54830
54831  case $ac_mode in
54832  :F)
54833  #
54834  # CONFIG_FILE
54835  #
54836
54837_ACEOF
54838
54839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54840# If the template does not know about datarootdir, expand it.
54841# FIXME: This hack should be removed a few years after 2.60.
54842ac_datarootdir_hack=; ac_datarootdir_seen=
54843ac_sed_dataroot='
54844/datarootdir/ {
54845  p
54846  q
54847}
54848/@datadir@/p
54849/@docdir@/p
54850/@infodir@/p
54851/@localedir@/p
54852/@mandir@/p'
54853case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54854*datarootdir*) ac_datarootdir_seen=yes;;
54855*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54856  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54857$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54858_ACEOF
54859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54860  ac_datarootdir_hack='
54861  s&@datadir@&$datadir&g
54862  s&@docdir@&$docdir&g
54863  s&@infodir@&$infodir&g
54864  s&@localedir@&$localedir&g
54865  s&@mandir@&$mandir&g
54866  s&\\\${datarootdir}&$datarootdir&g' ;;
54867esac
54868_ACEOF
54869
54870# Neutralize VPATH when `$srcdir' = `.'.
54871# Shell code in configure.ac might set extrasub.
54872# FIXME: do we really want to maintain this feature?
54873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54874ac_sed_extra="$ac_vpsub
54875$extrasub
54876_ACEOF
54877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54878:t
54879/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54880s|@configure_input@|$ac_sed_conf_input|;t t
54881s&@top_builddir@&$ac_top_builddir_sub&;t t
54882s&@top_build_prefix@&$ac_top_build_prefix&;t t
54883s&@srcdir@&$ac_srcdir&;t t
54884s&@abs_srcdir@&$ac_abs_srcdir&;t t
54885s&@top_srcdir@&$ac_top_srcdir&;t t
54886s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54887s&@builddir@&$ac_builddir&;t t
54888s&@abs_builddir@&$ac_abs_builddir&;t t
54889s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54890$ac_datarootdir_hack
54891"
54892eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54893  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54894
54895test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54896  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54897  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54898      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54899  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54900which seems to be undefined.  Please make sure it is defined" >&5
54901$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54902which seems to be undefined.  Please make sure it is defined" >&2;}
54903
54904  rm -f "$ac_tmp/stdin"
54905  case $ac_file in
54906  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54907  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54908  esac \
54909  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54910 ;;
54911
54912
54913
54914  esac
54915
54916done # for ac_tag
54917
54918
54919as_fn_exit 0
54920_ACEOF
54921ac_clean_files=$ac_clean_files_save
54922
54923test $ac_write_fail = 0 ||
54924  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54925
54926
54927# configure is writing to config.log, and then calls config.status.
54928# config.status does its own redirection, appending to config.log.
54929# Unfortunately, on DOS this fails, as config.log is still kept open
54930# by configure, so config.status won't be able to write to it; its
54931# output is simply discarded.  So we exec the FD to /dev/null,
54932# effectively closing config.log, so it can be properly (re)opened and
54933# appended to by config.status.  When coming back to configure, we
54934# need to make the FD available again.
54935if test "$no_create" != yes; then
54936  ac_cs_success=:
54937  ac_config_status_args=
54938  test "$silent" = yes &&
54939    ac_config_status_args="$ac_config_status_args --quiet"
54940  exec 5>/dev/null
54941  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54942  exec 5>>config.log
54943  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54944  # would make configure fail if this is the last instruction.
54945  $ac_cs_success || as_fn_exit 1
54946fi
54947if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54948  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54949$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54950fi
54951
54952
54953# After AC_OUTPUT, we need to do final work
54954
54955
54956  # Try to move config.log (generated by autoconf) to the configure-support directory.
54957  if test -e ./config.log; then
54958    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54959  fi
54960
54961  # Rotate our log file (configure.log)
54962  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54963    $RM -f "$OUTPUT_ROOT/configure.log.old"
54964  fi
54965  if test -e "$OUTPUT_ROOT/configure.log"; then
54966    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54967  fi
54968
54969  # Move configure.log from current directory to the build output root
54970  if test -e ./configure.log; then
54971    echo found it
54972    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54973  fi
54974
54975  # Make the compare script executable
54976  $CHMOD +x $OUTPUT_ROOT/compare.sh
54977
54978
54979# Finally output some useful information to the user
54980
54981  # Finally output some useful information to the user
54982
54983  printf "\n"
54984  printf "====================================================\n"
54985  if test "x$no_create" != "xyes"; then
54986    if test "x$IS_RECONFIGURE" != "xyes"; then
54987      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54988    else
54989      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54990    fi
54991  else
54992    if test "x$IS_RECONFIGURE" != "xyes"; then
54993      printf "A configuration has been successfully checked but not created\n"
54994    else
54995      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54996    fi
54997  fi
54998  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54999    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
55000  else
55001    printf "using default settings.\n"
55002  fi
55003
55004  printf "\n"
55005  printf "Configuration summary:\n"
55006  printf "* Debug level:    $DEBUG_LEVEL\n"
55007  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
55008  printf "* JDK variant:    $JDK_VARIANT\n"
55009  printf "* JVM variants:   $with_jvm_variants\n"
55010  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
55011  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
55012
55013  printf "\n"
55014  printf "Tools summary:\n"
55015  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
55016    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
55017  fi
55018  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
55019  if test "x$TOOLCHAIN_VERSION" != "x"; then
55020    print_version=" $TOOLCHAIN_VERSION"
55021  fi
55022  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
55023  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
55024  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
55025
55026  printf "\n"
55027  printf "Build performance summary:\n"
55028  printf "* Cores to use:   $JOBS\n"
55029  printf "* Memory limit:   $MEMORY_SIZE MB\n"
55030  if test "x$CCACHE_STATUS" != "x"; then
55031    printf "* ccache status:  $CCACHE_STATUS\n"
55032  fi
55033  printf "\n"
55034
55035  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
55036    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
55037    printf "will result in longer build times.\n"
55038    printf "\n"
55039  fi
55040
55041  if test "x$FOUND_ALT_VARIABLES" != "x"; then
55042    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55043    printf "These are not respected, and will be ignored. It is recommended\n"
55044    printf "that you clean your environment. The following variables are set:\n"
55045    printf "$FOUND_ALT_VARIABLES\n"
55046    printf "\n"
55047  fi
55048
55049  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55050    printf "WARNING: Your build output directory is not on a local disk.\n"
55051    printf "This will severely degrade build performance!\n"
55052    printf "It is recommended that you create an output directory on a local disk,\n"
55053    printf "and run the configure script again from that directory.\n"
55054    printf "\n"
55055  fi
55056
55057  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
55058    printf "WARNING: The result of this configuration has overridden an older\n"
55059    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55060    printf "proper build. Failure to do so might result in strange build problems.\n"
55061    printf "\n"
55062  fi
55063
55064  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
55065    printf "WARNING: The result of this configuration was not saved.\n"
55066    printf "You should run without '--no-create | -n' to create the configuration.\n"
55067    printf "\n"
55068  fi
55069
55070
55071
55072  # Locate config.log.
55073  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
55074    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
55075  elif test -e "./config.log"; then
55076    CONFIG_LOG_PATH="."
55077  fi
55078
55079  if test -e "$CONFIG_LOG_PATH/config.log"; then
55080    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55081    if test $? -eq 0; then
55082      printf "The following warnings were produced. Repeated here for convenience:\n"
55083      # We must quote sed expression (using []) to stop m4 from eating the [].
55084      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55085      printf "\n"
55086    fi
55087  fi
55088
55089