generated-configure.sh revision 1477:d909f7785f99
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
687COMPILER_SUPPORTS_TARGET_BITS_FLAG
688ZERO_ARCHFLAG
689LDFLAGS_TESTEXE_SUFFIX
690LDFLAGS_TESTLIB_SUFFIX
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694LDFLAGS_JDKEXE_SUFFIX
695LDFLAGS_JDKLIB_SUFFIX
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707LEGACY_EXTRA_LDFLAGS
708LEGACY_EXTRA_CXXFLAGS
709LEGACY_EXTRA_CFLAGS
710CXX_O_FLAG_NONE
711CXX_O_FLAG_DEBUG
712CXX_O_FLAG_NORM
713CXX_O_FLAG_HI
714CXX_O_FLAG_HIGHEST
715C_O_FLAG_NONE
716C_O_FLAG_DEBUG
717C_O_FLAG_NORM
718C_O_FLAG_HI
719C_O_FLAG_HIGHEST
720CXXFLAGS_DEBUG_OPTIONS
721CFLAGS_DEBUG_OPTIONS
722CXXFLAGS_DEBUG_SYMBOLS
723CFLAGS_DEBUG_SYMBOLS
724CXX_FLAG_DEPS
725C_FLAG_DEPS
726SET_SHARED_LIBRARY_MAPFILE
727SET_SHARED_LIBRARY_NAME
728SET_SHARED_LIBRARY_ORIGIN
729SET_EXECUTABLE_ORIGIN
730SHARED_LIBRARY_FLAGS
731CXX_FLAG_REORDER
732C_FLAG_REORDER
733SYSROOT_LDFLAGS
734SYSROOT_CFLAGS
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740POST_STRIP_CMD
741ARFLAGS
742COMPILER_TARGET_BITS_FLAG
743JT_HOME
744JTREGEXE
745USING_BROKEN_SUSE_LD
746PACKAGE_PATH
747USE_CLANG
748HOTSPOT_LD
749HOTSPOT_CXX
750HOTSPOT_RC
751HOTSPOT_MT
752BUILD_LD
753BUILD_CXX
754BUILD_CC
755ac_ct_OBJDUMP
756OBJDUMP
757ac_ct_OBJCOPY
758OBJCOPY
759ac_ct_NM
760ac_ct_STRIP
761GNM
762NM
763STRIP
764MSBUILD
765DUMPBIN
766RC
767MT
768LIPO
769ac_ct_AR
770AR
771AS
772LDCXX
773LD
774CXXCPP
775CPP
776ac_ct_CXX
777CXXFLAGS
778CXX
779ac_ct_PROPER_COMPILER_CXX
780PROPER_COMPILER_CXX
781TOOLCHAIN_PATH_CXX
782POTENTIAL_CXX
783OBJEXT
784EXEEXT
785ac_ct_CC
786CPPFLAGS
787LDFLAGS
788CFLAGS
789CC
790ac_ct_PROPER_COMPILER_CC
791PROPER_COMPILER_CC
792TOOLCHAIN_PATH_CC
793POTENTIAL_CC
794VS_LIB
795VS_INCLUDE
796VS_PATH
797CYGWIN_LINK
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809OVERRIDE_SRC_ROOT
810ADD_SRC_ROOT
811JDK_TOPDIR
812NASHORN_TOPDIR
813HOTSPOT_TOPDIR
814JAXWS_TOPDIR
815JAXP_TOPDIR
816CORBA_TOPDIR
817LANGTOOLS_TOPDIR
818JAVAC_FLAGS
819BOOT_JDK_SOURCETARGET
820JARSIGNER
821JAR
822JAVAH
823JAVAC
824JAVA
825BOOT_JDK
826JAVA_CHECK
827JAVAC_CHECK
828COOKED_BUILD_NUMBER
829JDK_VERSION
830COPYRIGHT_YEAR
831MACOSX_BUNDLE_ID_BASE
832MACOSX_BUNDLE_NAME_BASE
833COMPANY_NAME
834JDK_RC_PLATFORM_NAME
835PRODUCT_SUFFIX
836PRODUCT_NAME
837LAUNCHER_NAME
838MILESTONE
839JDK_BUILD_NUMBER
840JDK_UPDATE_VERSION
841JDK_MICRO_VERSION
842JDK_MINOR_VERSION
843JDK_MAJOR_VERSION
844USER_RELEASE_SUFFIX
845COMPRESS_JARS
846RMICONNECTOR_IIOP
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
860CODESIGN
861XATTR
862DSYMUTIL
863IS_GNU_TIME
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875MAKE
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950CPIO
951SETFILE
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057with_builddeps_conf
1058with_builddeps_server
1059with_builddeps_dir
1060with_builddeps_group
1061enable_headful
1062enable_hotspot_test_in_build
1063with_cacerts_file
1064enable_unlimited_crypto
1065enable_rmiconnector_iiop
1066with_milestone
1067with_update_version
1068with_user_release_suffix
1069with_build_number
1070with_copyright_year
1071with_boot_jdk
1072with_add_source_root
1073with_override_source_root
1074with_adds_and_overrides
1075with_override_langtools
1076with_override_corba
1077with_override_jaxp
1078with_override_jaxws
1079with_override_hotspot
1080with_override_nashorn
1081with_override_jdk
1082with_import_hotspot
1083with_toolchain_type
1084with_toolchain_version
1085with_jtreg
1086with_extra_cflags
1087with_extra_cxxflags
1088with_extra_ldflags
1089enable_debug_symbols
1090enable_zip_debug_info
1091enable_native_coverage
1092with_x
1093with_cups
1094with_cups_include
1095with_freetype
1096with_freetype_include
1097with_freetype_lib
1098with_freetype_src
1099enable_freetype_bundling
1100with_alsa
1101with_alsa_include
1102with_alsa_lib
1103with_libjpeg
1104with_giflib
1105with_lcms
1106with_libpng
1107with_zlib
1108with_stdc__lib
1109with_msvcr_dll
1110with_msvcp_dll
1111with_dxsdk
1112with_dxsdk_lib
1113with_dxsdk_include
1114with_num_cores
1115with_memory_size
1116with_jobs
1117with_boot_jdk_jvmargs
1118with_sjavac_server_java
1119enable_sjavac
1120enable_precompiled_headers
1121enable_ccache
1122with_ccache_dir
1123'
1124      ac_precious_vars='build_alias
1125host_alias
1126target_alias
1127BASENAME
1128BASH
1129CAT
1130CHMOD
1131CMP
1132COMM
1133CP
1134CUT
1135DATE
1136DIFF
1137DIRNAME
1138ECHO
1139EXPR
1140FILE
1141FIND
1142HEAD
1143LN
1144LS
1145MKDIR
1146MKTEMP
1147MV
1148NAWK
1149PRINTF
1150RM
1151SH
1152SORT
1153TAIL
1154TAR
1155TEE
1156TOUCH
1157TR
1158UNAME
1159UNIQ
1160WC
1161WHICH
1162XARGS
1163AWK
1164GREP
1165EGREP
1166FGREP
1167SED
1168CYGPATH
1169READLINK
1170DF
1171SETFILE
1172CPIO
1173UNZIP
1174ZIP
1175LDD
1176OTOOL
1177READELF
1178HG
1179STAT
1180TIME
1181DSYMUTIL
1182XATTR
1183CODESIGN
1184PKG_CONFIG
1185JAVA
1186JAVAC
1187JAVAH
1188JAR
1189JARSIGNER
1190CC
1191CFLAGS
1192LDFLAGS
1193LIBS
1194CPPFLAGS
1195CXX
1196CXXFLAGS
1197CCC
1198CPP
1199CXXCPP
1200AS
1201AR
1202LIPO
1203STRIP
1204NM
1205GNM
1206OBJCOPY
1207OBJDUMP
1208BUILD_CC
1209BUILD_CXX
1210BUILD_LD
1211JTREGEXE
1212XMKMF
1213FREETYPE_CFLAGS
1214FREETYPE_LIBS
1215ALSA_CFLAGS
1216ALSA_LIBS
1217LCMS_CFLAGS
1218LCMS_LIBS
1219PNG_CFLAGS
1220PNG_LIBS
1221LIBFFI_CFLAGS
1222LIBFFI_LIBS
1223CCACHE'
1224
1225
1226# Initialize some variables set by options.
1227ac_init_help=
1228ac_init_version=false
1229ac_unrecognized_opts=
1230ac_unrecognized_sep=
1231# The variables have the same names as the options, with
1232# dashes changed to underlines.
1233cache_file=/dev/null
1234exec_prefix=NONE
1235no_create=
1236no_recursion=
1237prefix=NONE
1238program_prefix=NONE
1239program_suffix=NONE
1240program_transform_name=s,x,x,
1241silent=
1242site=
1243srcdir=
1244verbose=
1245x_includes=NONE
1246x_libraries=NONE
1247
1248# Installation directory options.
1249# These are left unexpanded so users can "make install exec_prefix=/foo"
1250# and all the variables that are supposed to be based on exec_prefix
1251# by default will actually change.
1252# Use braces instead of parens because sh, perl, etc. also accept them.
1253# (The list follows the same order as the GNU Coding Standards.)
1254bindir='${exec_prefix}/bin'
1255sbindir='${exec_prefix}/sbin'
1256libexecdir='${exec_prefix}/libexec'
1257datarootdir='${prefix}/share'
1258datadir='${datarootdir}'
1259sysconfdir='${prefix}/etc'
1260sharedstatedir='${prefix}/com'
1261localstatedir='${prefix}/var'
1262includedir='${prefix}/include'
1263oldincludedir='/usr/include'
1264docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1265infodir='${datarootdir}/info'
1266htmldir='${docdir}'
1267dvidir='${docdir}'
1268pdfdir='${docdir}'
1269psdir='${docdir}'
1270libdir='${exec_prefix}/lib'
1271localedir='${datarootdir}/locale'
1272mandir='${datarootdir}/man'
1273
1274ac_prev=
1275ac_dashdash=
1276for ac_option
1277do
1278  # If the previous option needs an argument, assign it.
1279  if test -n "$ac_prev"; then
1280    eval $ac_prev=\$ac_option
1281    ac_prev=
1282    continue
1283  fi
1284
1285  case $ac_option in
1286  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1287  *=)   ac_optarg= ;;
1288  *)    ac_optarg=yes ;;
1289  esac
1290
1291  # Accept the important Cygnus configure options, so we can diagnose typos.
1292
1293  case $ac_dashdash$ac_option in
1294  --)
1295    ac_dashdash=yes ;;
1296
1297  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1298    ac_prev=bindir ;;
1299  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1300    bindir=$ac_optarg ;;
1301
1302  -build | --build | --buil | --bui | --bu)
1303    ac_prev=build_alias ;;
1304  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1305    build_alias=$ac_optarg ;;
1306
1307  -cache-file | --cache-file | --cache-fil | --cache-fi \
1308  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1309    ac_prev=cache_file ;;
1310  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1311  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1312    cache_file=$ac_optarg ;;
1313
1314  --config-cache | -C)
1315    cache_file=config.cache ;;
1316
1317  -datadir | --datadir | --datadi | --datad)
1318    ac_prev=datadir ;;
1319  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1320    datadir=$ac_optarg ;;
1321
1322  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1323  | --dataroo | --dataro | --datar)
1324    ac_prev=datarootdir ;;
1325  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1326  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1327    datarootdir=$ac_optarg ;;
1328
1329  -disable-* | --disable-*)
1330    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1331    # Reject names that are not valid shell variable names.
1332    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1333      as_fn_error $? "invalid feature name: $ac_useropt"
1334    ac_useropt_orig=$ac_useropt
1335    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1336    case $ac_user_opts in
1337      *"
1338"enable_$ac_useropt"
1339"*) ;;
1340      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1341	 ac_unrecognized_sep=', ';;
1342    esac
1343    eval enable_$ac_useropt=no ;;
1344
1345  -docdir | --docdir | --docdi | --doc | --do)
1346    ac_prev=docdir ;;
1347  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1348    docdir=$ac_optarg ;;
1349
1350  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1351    ac_prev=dvidir ;;
1352  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1353    dvidir=$ac_optarg ;;
1354
1355  -enable-* | --enable-*)
1356    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1357    # Reject names that are not valid shell variable names.
1358    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1359      as_fn_error $? "invalid feature name: $ac_useropt"
1360    ac_useropt_orig=$ac_useropt
1361    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1362    case $ac_user_opts in
1363      *"
1364"enable_$ac_useropt"
1365"*) ;;
1366      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1367	 ac_unrecognized_sep=', ';;
1368    esac
1369    eval enable_$ac_useropt=\$ac_optarg ;;
1370
1371  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1372  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1373  | --exec | --exe | --ex)
1374    ac_prev=exec_prefix ;;
1375  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1376  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1377  | --exec=* | --exe=* | --ex=*)
1378    exec_prefix=$ac_optarg ;;
1379
1380  -gas | --gas | --ga | --g)
1381    # Obsolete; use --with-gas.
1382    with_gas=yes ;;
1383
1384  -help | --help | --hel | --he | -h)
1385    ac_init_help=long ;;
1386  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1387    ac_init_help=recursive ;;
1388  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1389    ac_init_help=short ;;
1390
1391  -host | --host | --hos | --ho)
1392    ac_prev=host_alias ;;
1393  -host=* | --host=* | --hos=* | --ho=*)
1394    host_alias=$ac_optarg ;;
1395
1396  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1397    ac_prev=htmldir ;;
1398  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1399  | --ht=*)
1400    htmldir=$ac_optarg ;;
1401
1402  -includedir | --includedir | --includedi | --included | --include \
1403  | --includ | --inclu | --incl | --inc)
1404    ac_prev=includedir ;;
1405  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1406  | --includ=* | --inclu=* | --incl=* | --inc=*)
1407    includedir=$ac_optarg ;;
1408
1409  -infodir | --infodir | --infodi | --infod | --info | --inf)
1410    ac_prev=infodir ;;
1411  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1412    infodir=$ac_optarg ;;
1413
1414  -libdir | --libdir | --libdi | --libd)
1415    ac_prev=libdir ;;
1416  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1417    libdir=$ac_optarg ;;
1418
1419  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1420  | --libexe | --libex | --libe)
1421    ac_prev=libexecdir ;;
1422  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1423  | --libexe=* | --libex=* | --libe=*)
1424    libexecdir=$ac_optarg ;;
1425
1426  -localedir | --localedir | --localedi | --localed | --locale)
1427    ac_prev=localedir ;;
1428  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1429    localedir=$ac_optarg ;;
1430
1431  -localstatedir | --localstatedir | --localstatedi | --localstated \
1432  | --localstate | --localstat | --localsta | --localst | --locals)
1433    ac_prev=localstatedir ;;
1434  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1435  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1436    localstatedir=$ac_optarg ;;
1437
1438  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1439    ac_prev=mandir ;;
1440  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1441    mandir=$ac_optarg ;;
1442
1443  -nfp | --nfp | --nf)
1444    # Obsolete; use --without-fp.
1445    with_fp=no ;;
1446
1447  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1448  | --no-cr | --no-c | -n)
1449    no_create=yes ;;
1450
1451  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1452  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1453    no_recursion=yes ;;
1454
1455  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1456  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1457  | --oldin | --oldi | --old | --ol | --o)
1458    ac_prev=oldincludedir ;;
1459  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1460  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1461  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1462    oldincludedir=$ac_optarg ;;
1463
1464  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1465    ac_prev=prefix ;;
1466  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1467    prefix=$ac_optarg ;;
1468
1469  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1470  | --program-pre | --program-pr | --program-p)
1471    ac_prev=program_prefix ;;
1472  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1473  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1474    program_prefix=$ac_optarg ;;
1475
1476  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1477  | --program-suf | --program-su | --program-s)
1478    ac_prev=program_suffix ;;
1479  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1480  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1481    program_suffix=$ac_optarg ;;
1482
1483  -program-transform-name | --program-transform-name \
1484  | --program-transform-nam | --program-transform-na \
1485  | --program-transform-n | --program-transform- \
1486  | --program-transform | --program-transfor \
1487  | --program-transfo | --program-transf \
1488  | --program-trans | --program-tran \
1489  | --progr-tra | --program-tr | --program-t)
1490    ac_prev=program_transform_name ;;
1491  -program-transform-name=* | --program-transform-name=* \
1492  | --program-transform-nam=* | --program-transform-na=* \
1493  | --program-transform-n=* | --program-transform-=* \
1494  | --program-transform=* | --program-transfor=* \
1495  | --program-transfo=* | --program-transf=* \
1496  | --program-trans=* | --program-tran=* \
1497  | --progr-tra=* | --program-tr=* | --program-t=*)
1498    program_transform_name=$ac_optarg ;;
1499
1500  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1501    ac_prev=pdfdir ;;
1502  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1503    pdfdir=$ac_optarg ;;
1504
1505  -psdir | --psdir | --psdi | --psd | --ps)
1506    ac_prev=psdir ;;
1507  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1508    psdir=$ac_optarg ;;
1509
1510  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1511  | -silent | --silent | --silen | --sile | --sil)
1512    silent=yes ;;
1513
1514  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1515    ac_prev=sbindir ;;
1516  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1517  | --sbi=* | --sb=*)
1518    sbindir=$ac_optarg ;;
1519
1520  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1521  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1522  | --sharedst | --shareds | --shared | --share | --shar \
1523  | --sha | --sh)
1524    ac_prev=sharedstatedir ;;
1525  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1526  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1527  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1528  | --sha=* | --sh=*)
1529    sharedstatedir=$ac_optarg ;;
1530
1531  -site | --site | --sit)
1532    ac_prev=site ;;
1533  -site=* | --site=* | --sit=*)
1534    site=$ac_optarg ;;
1535
1536  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1537    ac_prev=srcdir ;;
1538  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1539    srcdir=$ac_optarg ;;
1540
1541  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1542  | --syscon | --sysco | --sysc | --sys | --sy)
1543    ac_prev=sysconfdir ;;
1544  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1545  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1546    sysconfdir=$ac_optarg ;;
1547
1548  -target | --target | --targe | --targ | --tar | --ta | --t)
1549    ac_prev=target_alias ;;
1550  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1551    target_alias=$ac_optarg ;;
1552
1553  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1554    verbose=yes ;;
1555
1556  -version | --version | --versio | --versi | --vers | -V)
1557    ac_init_version=: ;;
1558
1559  -with-* | --with-*)
1560    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1561    # Reject names that are not valid shell variable names.
1562    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1563      as_fn_error $? "invalid package name: $ac_useropt"
1564    ac_useropt_orig=$ac_useropt
1565    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1566    case $ac_user_opts in
1567      *"
1568"with_$ac_useropt"
1569"*) ;;
1570      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1571	 ac_unrecognized_sep=', ';;
1572    esac
1573    eval with_$ac_useropt=\$ac_optarg ;;
1574
1575  -without-* | --without-*)
1576    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1577    # Reject names that are not valid shell variable names.
1578    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1579      as_fn_error $? "invalid package name: $ac_useropt"
1580    ac_useropt_orig=$ac_useropt
1581    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1582    case $ac_user_opts in
1583      *"
1584"with_$ac_useropt"
1585"*) ;;
1586      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1587	 ac_unrecognized_sep=', ';;
1588    esac
1589    eval with_$ac_useropt=no ;;
1590
1591  --x)
1592    # Obsolete; use --with-x.
1593    with_x=yes ;;
1594
1595  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1596  | --x-incl | --x-inc | --x-in | --x-i)
1597    ac_prev=x_includes ;;
1598  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1599  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1600    x_includes=$ac_optarg ;;
1601
1602  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1603  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1604    ac_prev=x_libraries ;;
1605  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1606  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1607    x_libraries=$ac_optarg ;;
1608
1609  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1610Try \`$0 --help' for more information"
1611    ;;
1612
1613  *=*)
1614    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1615    # Reject names that are not valid shell variable names.
1616    case $ac_envvar in #(
1617      '' | [0-9]* | *[!_$as_cr_alnum]* )
1618      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1619    esac
1620    eval $ac_envvar=\$ac_optarg
1621    export $ac_envvar ;;
1622
1623  *)
1624    # FIXME: should be removed in autoconf 3.0.
1625    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1626    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1627      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1628    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1629    ;;
1630
1631  esac
1632done
1633
1634if test -n "$ac_prev"; then
1635  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1636  as_fn_error $? "missing argument to $ac_option"
1637fi
1638
1639if test -n "$ac_unrecognized_opts"; then
1640  case $enable_option_checking in
1641    no) ;;
1642    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1643    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1644  esac
1645fi
1646
1647# Check all directory arguments for consistency.
1648for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1649		datadir sysconfdir sharedstatedir localstatedir includedir \
1650		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1651		libdir localedir mandir
1652do
1653  eval ac_val=\$$ac_var
1654  # Remove trailing slashes.
1655  case $ac_val in
1656    */ )
1657      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1658      eval $ac_var=\$ac_val;;
1659  esac
1660  # Be sure to have absolute directory names.
1661  case $ac_val in
1662    [\\/$]* | ?:[\\/]* )  continue;;
1663    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1664  esac
1665  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1666done
1667
1668# There might be people who depend on the old broken behavior: `$host'
1669# used to hold the argument of --host etc.
1670# FIXME: To remove some day.
1671build=$build_alias
1672host=$host_alias
1673target=$target_alias
1674
1675# FIXME: To remove some day.
1676if test "x$host_alias" != x; then
1677  if test "x$build_alias" = x; then
1678    cross_compiling=maybe
1679  elif test "x$build_alias" != "x$host_alias"; then
1680    cross_compiling=yes
1681  fi
1682fi
1683
1684ac_tool_prefix=
1685test -n "$host_alias" && ac_tool_prefix=$host_alias-
1686
1687test "$silent" = yes && exec 6>/dev/null
1688
1689
1690ac_pwd=`pwd` && test -n "$ac_pwd" &&
1691ac_ls_di=`ls -di .` &&
1692ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1693  as_fn_error $? "working directory cannot be determined"
1694test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1695  as_fn_error $? "pwd does not report name of working directory"
1696
1697
1698# Find the source files, if location was not specified.
1699if test -z "$srcdir"; then
1700  ac_srcdir_defaulted=yes
1701  # Try the directory containing this script, then the parent directory.
1702  ac_confdir=`$as_dirname -- "$as_myself" ||
1703$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1704	 X"$as_myself" : 'X\(//\)[^/]' \| \
1705	 X"$as_myself" : 'X\(//\)$' \| \
1706	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1707$as_echo X"$as_myself" |
1708    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1709	    s//\1/
1710	    q
1711	  }
1712	  /^X\(\/\/\)[^/].*/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\/\)$/{
1717	    s//\1/
1718	    q
1719	  }
1720	  /^X\(\/\).*/{
1721	    s//\1/
1722	    q
1723	  }
1724	  s/.*/./; q'`
1725  srcdir=$ac_confdir
1726  if test ! -r "$srcdir/$ac_unique_file"; then
1727    srcdir=..
1728  fi
1729else
1730  ac_srcdir_defaulted=no
1731fi
1732if test ! -r "$srcdir/$ac_unique_file"; then
1733  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1734  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1735fi
1736ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1737ac_abs_confdir=`(
1738	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1739	pwd)`
1740# When building in place, set srcdir=.
1741if test "$ac_abs_confdir" = "$ac_pwd"; then
1742  srcdir=.
1743fi
1744# Remove unnecessary trailing slashes from srcdir.
1745# Double slashes in file names in object file debugging info
1746# mess up M-x gdb in Emacs.
1747case $srcdir in
1748*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1749esac
1750for ac_var in $ac_precious_vars; do
1751  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1752  eval ac_env_${ac_var}_value=\$${ac_var}
1753  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1754  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1755done
1756
1757#
1758# Report the --help message.
1759#
1760if test "$ac_init_help" = "long"; then
1761  # Omit some internal or obsolete options to make the list less imposing.
1762  # This message is too long to be a string in the A/UX 3.1 sh.
1763  cat <<_ACEOF
1764\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1765
1766Usage: $0 [OPTION]... [VAR=VALUE]...
1767
1768To assign environment variables (e.g., CC, CFLAGS...), specify them as
1769VAR=VALUE.  See below for descriptions of some of the useful variables.
1770
1771Defaults for the options are specified in brackets.
1772
1773Configuration:
1774  -h, --help              display this help and exit
1775      --help=short        display options specific to this package
1776      --help=recursive    display the short help of all the included packages
1777  -V, --version           display version information and exit
1778  -q, --quiet, --silent   do not print \`checking ...' messages
1779      --cache-file=FILE   cache test results in FILE [disabled]
1780  -C, --config-cache      alias for \`--cache-file=config.cache'
1781  -n, --no-create         do not create output files
1782      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1783
1784Installation directories:
1785  --prefix=PREFIX         install architecture-independent files in PREFIX
1786                          [$ac_default_prefix]
1787  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1788                          [PREFIX]
1789
1790By default, \`make install' will install all the files in
1791\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1792an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1793for instance \`--prefix=\$HOME'.
1794
1795For better control, use the options below.
1796
1797Fine tuning of the installation directories:
1798  --bindir=DIR            user executables [EPREFIX/bin]
1799  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1800  --libexecdir=DIR        program executables [EPREFIX/libexec]
1801  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1802  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1803  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1804  --libdir=DIR            object code libraries [EPREFIX/lib]
1805  --includedir=DIR        C header files [PREFIX/include]
1806  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1807  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1808  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1809  --infodir=DIR           info documentation [DATAROOTDIR/info]
1810  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1811  --mandir=DIR            man documentation [DATAROOTDIR/man]
1812  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1813  --htmldir=DIR           html documentation [DOCDIR]
1814  --dvidir=DIR            dvi documentation [DOCDIR]
1815  --pdfdir=DIR            pdf documentation [DOCDIR]
1816  --psdir=DIR             ps documentation [DOCDIR]
1817_ACEOF
1818
1819  cat <<\_ACEOF
1820
1821X features:
1822  --x-includes=DIR    X include files are in DIR
1823  --x-libraries=DIR   X library files are in DIR
1824
1825System types:
1826  --build=BUILD     configure for building on BUILD [guessed]
1827  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1828  --target=TARGET   configure for building compilers for TARGET [HOST]
1829_ACEOF
1830fi
1831
1832if test -n "$ac_init_help"; then
1833  case $ac_init_help in
1834     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1835   esac
1836  cat <<\_ACEOF
1837
1838Optional Features:
1839  --disable-option-checking  ignore unrecognized --enable/--with options
1840  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1841  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1842  --enable-openjdk-only   suppress building custom source even if present
1843                          [disabled]
1844  --enable-debug          set the debug level to fastdebug (shorthand for
1845                          --with-debug-level=fastdebug) [disabled]
1846  --disable-headful       disable building headful support (graphical UI
1847                          support) [enabled]
1848  --enable-hotspot-test-in-build
1849                          run the Queens test after Hotspot build [disabled]
1850  --enable-unlimited-crypto
1851                          Enable unlimited crypto policy [disabled]
1852  --enable-rmiconnector-iiop
1853                          enable the JMX RMIConnector iiop transport
1854                          [disabled]
1855  --disable-debug-symbols disable generation of debug symbols [enabled]
1856  --disable-zip-debug-info
1857                          disable zipping of debug-info files [enabled]
1858  --enable-native-coverage
1859                          enable native compilation with code coverage
1860                          data[disabled]
1861  --disable-freetype-bundling
1862                          disable bundling of the freetype library with the
1863                          build result [enabled on Windows or when using
1864                          --with-freetype, disabled otherwise]
1865  --enable-sjavac         use sjavac to do fast incremental compiles
1866                          [disabled]
1867  --disable-precompiled-headers
1868                          disable using precompiled headers when compiling C++
1869                          [enabled]
1870  --enable-ccache         enable using ccache to speed up recompilations
1871                          [disabled]
1872
1873Optional Packages:
1874  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1875  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1876  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1877                          support it), e.g. --with-target-bits=32 [guessed]
1878  --with-custom-make-dir  Deprecated. Option is kept for backwards
1879                          compatibility and is ignored
1880  --with-jdk-variant      JDK variant to build (normal) [normal]
1881  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1882  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1883                          client, minimal1, kernel, zero, zeroshark, core)
1884                          [server]
1885  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1886                          optimized (HotSpot build only)) [release]
1887  --with-devkit           use this devkit for compilers, tools and resources
1888  --with-sys-root         alias for --with-sysroot for backwards compatability
1889  --with-sysroot          use this directory as sysroot
1890  --with-tools-dir        alias for --with-toolchain-path for backwards
1891                          compatibility
1892  --with-toolchain-path   prepend these directories when searching for
1893                          toolchain binaries (compilers etc)
1894  --with-extra-path       prepend these directories to the default path
1895  --with-sdk-name         use the platform SDK of the given name. [macosx]
1896  --with-conf-name        use this as the name of the configuration [generated
1897                          from important configuration options]
1898  --with-output-sync      set make output sync type if supported by make.
1899                          [recurse]
1900  --with-builddeps-conf   use this configuration file for the builddeps
1901  --with-builddeps-server download and use build dependencies from this server
1902                          url
1903  --with-builddeps-dir    store downloaded build dependencies here
1904                          [/localhome/builddeps]
1905  --with-builddeps-group  chgrp the downloaded build dependencies to this
1906                          group
1907  --with-cacerts-file     specify alternative cacerts file
1908  --with-milestone        Set milestone value for build [internal]
1909  --with-update-version   Set update version value for build [b00]
1910  --with-user-release-suffix
1911                          Add a custom string to the version string if build
1912                          number is not set.[username_builddateb00]
1913  --with-build-number     Set build number value for build [b00]
1914  --with-copyright-year   Set copyright year value for build [current year]
1915  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1916  --with-add-source-root  for each and every source directory, look in this
1917                          additional source root for the same directory; if it
1918                          exists and have files in it, include it in the build
1919  --with-override-source-root
1920                          for each and every source directory, look in this
1921                          override source root for the same directory; if it
1922                          exists, use that directory instead and ignore the
1923                          directory in the original source root
1924  --with-adds-and-overrides
1925                          use the subdirs 'adds' and 'overrides' in the
1926                          specified directory as add-source-root and
1927                          override-source-root
1928  --with-override-langtools
1929                          use this langtools dir for the build
1930  --with-override-corba   use this corba dir for the build
1931  --with-override-jaxp    use this jaxp dir for the build
1932  --with-override-jaxws   use this jaxws dir for the build
1933  --with-override-hotspot use this hotspot dir for the build
1934  --with-override-nashorn use this nashorn dir for the build
1935  --with-override-jdk     use this jdk dir for the build
1936  --with-import-hotspot   import hotspot binaries from this jdk image or
1937                          hotspot build dist dir instead of building from
1938                          source
1939  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1940                          to show possible values [platform dependent]
1941  --with-toolchain-version
1942                          the version of the toolchain to look for, use
1943                          '--help' to show possible values [platform
1944                          dependent]
1945  --with-jtreg            Regression Test Harness [probed]
1946  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1947  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1948  --with-extra-ldflags    extra flags to be used when linking jdk
1949  --with-x                use the X Window System
1950  --with-cups             specify prefix directory for the cups package
1951                          (expecting the headers under PATH/include)
1952  --with-cups-include     specify directory for the cups include files
1953  --with-freetype         specify prefix directory for the freetype package
1954                          (expecting the libraries under PATH/lib and the
1955                          headers under PATH/include)
1956  --with-freetype-include specify directory for the freetype include files
1957  --with-freetype-lib     specify directory for the freetype library
1958  --with-freetype-src     specify directory with freetype sources to
1959                          automatically build the library (experimental,
1960                          Windows-only)
1961  --with-alsa             specify prefix directory for the alsa package
1962                          (expecting the libraries under PATH/lib and the
1963                          headers under PATH/include)
1964  --with-alsa-include     specify directory for the alsa include files
1965  --with-alsa-lib         specify directory for the alsa library
1966  --with-libjpeg          use libjpeg from build system or OpenJDK source
1967                          (system, bundled) [bundled]
1968  --with-giflib           use giflib from build system or OpenJDK source
1969                          (system, bundled) [bundled]
1970  --with-lcms             use lcms2 from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-libpng           use libpng from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-zlib             use zlib from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-stdc++lib=<static>,<dynamic>,<default>
1977                          force linking of the C++ runtime on Linux to either
1978                          static or dynamic, default is static with dynamic as
1979                          fallback
1980  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1981                          (Windows only) [probed]
1982  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1983                          (Windows only) [probed]
1984  --with-dxsdk            Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-dxsdk-include    Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-num-cores        number of cores in the build system, e.g.
1991                          --with-num-cores=8 [probed]
1992  --with-memory-size      memory (in MB) available in the build system, e.g.
1993                          --with-memory-size=1024 [probed]
1994  --with-jobs             number of parallel jobs to let make run [calculated
1995                          based on cores and memory]
1996  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1997                          invocations of boot JDK, overriding the default
1998                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1999                          -enableassertions"
2000  --with-sjavac-server-java
2001                          use this java binary for running the sjavac
2002                          background server [Boot JDK java]
2003  --with-ccache-dir       where to store ccache files [~/.ccache]
2004
2005Some influential environment variables:
2006  BASENAME    Override default value for BASENAME
2007  BASH        Override default value for BASH
2008  CAT         Override default value for CAT
2009  CHMOD       Override default value for CHMOD
2010  CMP         Override default value for CMP
2011  COMM        Override default value for COMM
2012  CP          Override default value for CP
2013  CUT         Override default value for CUT
2014  DATE        Override default value for DATE
2015  DIFF        Override default value for DIFF
2016  DIRNAME     Override default value for DIRNAME
2017  ECHO        Override default value for ECHO
2018  EXPR        Override default value for EXPR
2019  FILE        Override default value for FILE
2020  FIND        Override default value for FIND
2021  HEAD        Override default value for HEAD
2022  LN          Override default value for LN
2023  LS          Override default value for LS
2024  MKDIR       Override default value for MKDIR
2025  MKTEMP      Override default value for MKTEMP
2026  MV          Override default value for MV
2027  NAWK        Override default value for NAWK
2028  PRINTF      Override default value for PRINTF
2029  RM          Override default value for RM
2030  SH          Override default value for SH
2031  SORT        Override default value for SORT
2032  TAIL        Override default value for TAIL
2033  TAR         Override default value for TAR
2034  TEE         Override default value for TEE
2035  TOUCH       Override default value for TOUCH
2036  TR          Override default value for TR
2037  UNAME       Override default value for UNAME
2038  UNIQ        Override default value for UNIQ
2039  WC          Override default value for WC
2040  WHICH       Override default value for WHICH
2041  XARGS       Override default value for XARGS
2042  AWK         Override default value for AWK
2043  GREP        Override default value for GREP
2044  EGREP       Override default value for EGREP
2045  FGREP       Override default value for FGREP
2046  SED         Override default value for SED
2047  CYGPATH     Override default value for CYGPATH
2048  READLINK    Override default value for READLINK
2049  DF          Override default value for DF
2050  SETFILE     Override default value for SETFILE
2051  CPIO        Override default value for CPIO
2052  UNZIP       Override default value for UNZIP
2053  ZIP         Override default value for ZIP
2054  LDD         Override default value for LDD
2055  OTOOL       Override default value for OTOOL
2056  READELF     Override default value for READELF
2057  HG          Override default value for HG
2058  STAT        Override default value for STAT
2059  TIME        Override default value for TIME
2060  DSYMUTIL    Override default value for DSYMUTIL
2061  XATTR       Override default value for XATTR
2062  CODESIGN    Override default value for CODESIGN
2063  PKG_CONFIG  path to pkg-config utility
2064  JAVA        Override default value for JAVA
2065  JAVAC       Override default value for JAVAC
2066  JAVAH       Override default value for JAVAH
2067  JAR         Override default value for JAR
2068  JARSIGNER   Override default value for JARSIGNER
2069  CC          C compiler command
2070  CFLAGS      C compiler flags
2071  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2072              nonstandard directory <lib dir>
2073  LIBS        libraries to pass to the linker, e.g. -l<library>
2074  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2075              you have headers in a nonstandard directory <include dir>
2076  CXX         C++ compiler command
2077  CXXFLAGS    C++ compiler flags
2078  CPP         C preprocessor
2079  CXXCPP      C++ preprocessor
2080  AS          Override default value for AS
2081  AR          Override default value for AR
2082  LIPO        Override default value for LIPO
2083  STRIP       Override default value for STRIP
2084  NM          Override default value for NM
2085  GNM         Override default value for GNM
2086  OBJCOPY     Override default value for OBJCOPY
2087  OBJDUMP     Override default value for OBJDUMP
2088  BUILD_CC    Override default value for BUILD_CC
2089  BUILD_CXX   Override default value for BUILD_CXX
2090  BUILD_LD    Override default value for BUILD_LD
2091  JTREGEXE    Override default value for JTREGEXE
2092  XMKMF       Path to xmkmf, Makefile generator for X Window System
2093  FREETYPE_CFLAGS
2094              C compiler flags for FREETYPE, overriding pkg-config
2095  FREETYPE_LIBS
2096              linker flags for FREETYPE, overriding pkg-config
2097  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2098  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2099  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2100  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2101  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2102  PNG_LIBS    linker flags for PNG, overriding pkg-config
2103  LIBFFI_CFLAGS
2104              C compiler flags for LIBFFI, overriding pkg-config
2105  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2106  CCACHE      Override default value for CCACHE
2107
2108Use these variables to override the choices made by `configure' or to help
2109it to find libraries and programs with nonstandard names/locations.
2110
2111Report bugs to <build-dev@openjdk.java.net>.
2112OpenJDK home page: <http://openjdk.java.net>.
2113_ACEOF
2114ac_status=$?
2115fi
2116
2117if test "$ac_init_help" = "recursive"; then
2118  # If there are subdirs, report their specific --help.
2119  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2120    test -d "$ac_dir" ||
2121      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2122      continue
2123    ac_builddir=.
2124
2125case "$ac_dir" in
2126.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2127*)
2128  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2129  # A ".." for each directory in $ac_dir_suffix.
2130  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2131  case $ac_top_builddir_sub in
2132  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2133  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2134  esac ;;
2135esac
2136ac_abs_top_builddir=$ac_pwd
2137ac_abs_builddir=$ac_pwd$ac_dir_suffix
2138# for backward compatibility:
2139ac_top_builddir=$ac_top_build_prefix
2140
2141case $srcdir in
2142  .)  # We are building in place.
2143    ac_srcdir=.
2144    ac_top_srcdir=$ac_top_builddir_sub
2145    ac_abs_top_srcdir=$ac_pwd ;;
2146  [\\/]* | ?:[\\/]* )  # Absolute name.
2147    ac_srcdir=$srcdir$ac_dir_suffix;
2148    ac_top_srcdir=$srcdir
2149    ac_abs_top_srcdir=$srcdir ;;
2150  *) # Relative name.
2151    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2152    ac_top_srcdir=$ac_top_build_prefix$srcdir
2153    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2154esac
2155ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2156
2157    cd "$ac_dir" || { ac_status=$?; continue; }
2158    # Check for guested configure.
2159    if test -f "$ac_srcdir/configure.gnu"; then
2160      echo &&
2161      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2162    elif test -f "$ac_srcdir/configure"; then
2163      echo &&
2164      $SHELL "$ac_srcdir/configure" --help=recursive
2165    else
2166      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2167    fi || ac_status=$?
2168    cd "$ac_pwd" || { ac_status=$?; break; }
2169  done
2170fi
2171
2172test -n "$ac_init_help" && exit $ac_status
2173if $ac_init_version; then
2174  cat <<\_ACEOF
2175OpenJDK configure jdk9
2176generated by GNU Autoconf 2.69
2177
2178Copyright (C) 2012 Free Software Foundation, Inc.
2179This configure script is free software; the Free Software Foundation
2180gives unlimited permission to copy, distribute and modify it.
2181_ACEOF
2182  exit
2183fi
2184
2185## ------------------------ ##
2186## Autoconf initialization. ##
2187## ------------------------ ##
2188
2189# ac_fn_c_try_compile LINENO
2190# --------------------------
2191# Try to compile conftest.$ac_ext, and return whether this succeeded.
2192ac_fn_c_try_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  rm -f conftest.$ac_objext
2196  if { { ac_try="$ac_compile"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_compile") 2>conftest.err
2204  ac_status=$?
2205  if test -s conftest.err; then
2206    grep -v '^ *+' conftest.err >conftest.er1
2207    cat conftest.er1 >&5
2208    mv -f conftest.er1 conftest.err
2209  fi
2210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211  test $ac_status = 0; } && {
2212	 test -z "$ac_c_werror_flag" ||
2213	 test ! -s conftest.err
2214       } && test -s conftest.$ac_objext; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220	ac_retval=1
2221fi
2222  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_try_compile
2226
2227# ac_fn_cxx_try_compile LINENO
2228# ----------------------------
2229# Try to compile conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_cxx_try_compile ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  rm -f conftest.$ac_objext
2234  if { { ac_try="$ac_compile"
2235case "(($ac_try" in
2236  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2237  *) ac_try_echo=$ac_try;;
2238esac
2239eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2240$as_echo "$ac_try_echo"; } >&5
2241  (eval "$ac_compile") 2>conftest.err
2242  ac_status=$?
2243  if test -s conftest.err; then
2244    grep -v '^ *+' conftest.err >conftest.er1
2245    cat conftest.er1 >&5
2246    mv -f conftest.er1 conftest.err
2247  fi
2248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2249  test $ac_status = 0; } && {
2250	 test -z "$ac_cxx_werror_flag" ||
2251	 test ! -s conftest.err
2252       } && test -s conftest.$ac_objext; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: failed program was:" >&5
2256sed 's/^/| /' conftest.$ac_ext >&5
2257
2258	ac_retval=1
2259fi
2260  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2261  as_fn_set_status $ac_retval
2262
2263} # ac_fn_cxx_try_compile
2264
2265# ac_fn_c_try_cpp LINENO
2266# ----------------------
2267# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2268ac_fn_c_try_cpp ()
2269{
2270  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271  if { { ac_try="$ac_cpp conftest.$ac_ext"
2272case "(($ac_try" in
2273  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2274  *) ac_try_echo=$ac_try;;
2275esac
2276eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2277$as_echo "$ac_try_echo"; } >&5
2278  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2279  ac_status=$?
2280  if test -s conftest.err; then
2281    grep -v '^ *+' conftest.err >conftest.er1
2282    cat conftest.er1 >&5
2283    mv -f conftest.er1 conftest.err
2284  fi
2285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2286  test $ac_status = 0; } > conftest.i && {
2287	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2288	 test ! -s conftest.err
2289       }; then :
2290  ac_retval=0
2291else
2292  $as_echo "$as_me: failed program was:" >&5
2293sed 's/^/| /' conftest.$ac_ext >&5
2294
2295    ac_retval=1
2296fi
2297  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298  as_fn_set_status $ac_retval
2299
2300} # ac_fn_c_try_cpp
2301
2302# ac_fn_cxx_try_cpp LINENO
2303# ------------------------
2304# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2305ac_fn_cxx_try_cpp ()
2306{
2307  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308  if { { ac_try="$ac_cpp conftest.$ac_ext"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } > conftest.i && {
2324	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2325	 test ! -s conftest.err
2326       }; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332    ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_cxx_try_cpp
2338
2339# ac_fn_c_try_link LINENO
2340# -----------------------
2341# Try to link conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_c_try_link ()
2343{
2344  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345  rm -f conftest.$ac_objext conftest$ac_exeext
2346  if { { ac_try="$ac_link"
2347case "(($ac_try" in
2348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2349  *) ac_try_echo=$ac_try;;
2350esac
2351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2352$as_echo "$ac_try_echo"; } >&5
2353  (eval "$ac_link") 2>conftest.err
2354  ac_status=$?
2355  if test -s conftest.err; then
2356    grep -v '^ *+' conftest.err >conftest.er1
2357    cat conftest.er1 >&5
2358    mv -f conftest.er1 conftest.err
2359  fi
2360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2361  test $ac_status = 0; } && {
2362	 test -z "$ac_c_werror_flag" ||
2363	 test ! -s conftest.err
2364       } && test -s conftest$ac_exeext && {
2365	 test "$cross_compiling" = yes ||
2366	 test -x conftest$ac_exeext
2367       }; then :
2368  ac_retval=0
2369else
2370  $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373	ac_retval=1
2374fi
2375  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2376  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2377  # interfere with the next link command; also delete a directory that is
2378  # left behind by Apple's compiler.  We do this before executing the actions.
2379  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_link
2384
2385# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2386# ---------------------------------------------------------
2387# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2388# the include files in INCLUDES and setting the cache variable VAR
2389# accordingly.
2390ac_fn_cxx_check_header_mongrel ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  if eval \${$3+:} false; then :
2394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2395$as_echo_n "checking for $2... " >&6; }
2396if eval \${$3+:} false; then :
2397  $as_echo_n "(cached) " >&6
2398fi
2399eval ac_res=\$$3
2400	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
2402else
2403  # Is the header compilable?
2404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2405$as_echo_n "checking $2 usability... " >&6; }
2406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h.  */
2408$4
2409#include <$2>
2410_ACEOF
2411if ac_fn_cxx_try_compile "$LINENO"; then :
2412  ac_header_compiler=yes
2413else
2414  ac_header_compiler=no
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2418$as_echo "$ac_header_compiler" >&6; }
2419
2420# Is the header present?
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2422$as_echo_n "checking $2 presence... " >&6; }
2423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h.  */
2425#include <$2>
2426_ACEOF
2427if ac_fn_cxx_try_cpp "$LINENO"; then :
2428  ac_header_preproc=yes
2429else
2430  ac_header_preproc=no
2431fi
2432rm -f conftest.err conftest.i conftest.$ac_ext
2433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2434$as_echo "$ac_header_preproc" >&6; }
2435
2436# So?  What about this header?
2437case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2438  yes:no: )
2439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2440$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2442$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2443    ;;
2444  no:yes:* )
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2446$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2448$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2450$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2452$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2454$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2455( $as_echo "## ----------------------------------------- ##
2456## Report this to build-dev@openjdk.java.net ##
2457## ----------------------------------------- ##"
2458     ) | sed "s/^/$as_me: WARNING:     /" >&2
2459    ;;
2460esac
2461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462$as_echo_n "checking for $2... " >&6; }
2463if eval \${$3+:} false; then :
2464  $as_echo_n "(cached) " >&6
2465else
2466  eval "$3=\$ac_header_compiler"
2467fi
2468eval ac_res=\$$3
2469	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2470$as_echo "$ac_res" >&6; }
2471fi
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473
2474} # ac_fn_cxx_check_header_mongrel
2475
2476# ac_fn_cxx_try_run LINENO
2477# ------------------------
2478# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2479# that executables *can* be run.
2480ac_fn_cxx_try_run ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  if { { ac_try="$ac_link"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_link") 2>&5
2491  ac_status=$?
2492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2493  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2494  { { case "(($ac_try" in
2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496  *) ac_try_echo=$ac_try;;
2497esac
2498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499$as_echo "$ac_try_echo"; } >&5
2500  (eval "$ac_try") 2>&5
2501  ac_status=$?
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; }; }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: program exited with status $ac_status" >&5
2507       $as_echo "$as_me: failed program was:" >&5
2508sed 's/^/| /' conftest.$ac_ext >&5
2509
2510       ac_retval=$ac_status
2511fi
2512  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514  as_fn_set_status $ac_retval
2515
2516} # ac_fn_cxx_try_run
2517
2518# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2519# ---------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_cxx_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval \${$3+:} false; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_cxx_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546
2547} # ac_fn_cxx_check_header_compile
2548
2549# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2550# ----------------------------------------------
2551# Tries to find the compile-time value of EXPR in a program that includes
2552# INCLUDES, setting VAR accordingly. Returns whether the value could be
2553# computed
2554ac_fn_cxx_compute_int ()
2555{
2556  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557  if test "$cross_compiling" = yes; then
2558    # Depending upon the size, compute the lo and hi bounds.
2559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562int
2563main ()
2564{
2565static int test_array [1 - 2 * !(($2) >= 0)];
2566test_array [0] = 0;
2567return test_array [0];
2568
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_compile "$LINENO"; then :
2574  ac_lo=0 ac_mid=0
2575  while :; do
2576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h.  */
2578$4
2579int
2580main ()
2581{
2582static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2583test_array [0] = 0;
2584return test_array [0];
2585
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_compile "$LINENO"; then :
2591  ac_hi=$ac_mid; break
2592else
2593  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2594			if test $ac_lo -le $ac_mid; then
2595			  ac_lo= ac_hi=
2596			  break
2597			fi
2598			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2599fi
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601  done
2602else
2603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606int
2607main ()
2608{
2609static int test_array [1 - 2 * !(($2) < 0)];
2610test_array [0] = 0;
2611return test_array [0];
2612
2613  ;
2614  return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_hi=-1 ac_mid=-1
2619  while :; do
2620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623int
2624main ()
2625{
2626static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2627test_array [0] = 0;
2628return test_array [0];
2629
2630  ;
2631  return 0;
2632}
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_lo=$ac_mid; break
2636else
2637  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2638			if test $ac_mid -le $ac_hi; then
2639			  ac_lo= ac_hi=
2640			  break
2641			fi
2642			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2643fi
2644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2645  done
2646else
2647  ac_lo= ac_hi=
2648fi
2649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652# Binary search between lo and hi bounds.
2653while test "x$ac_lo" != "x$ac_hi"; do
2654  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2656/* end confdefs.h.  */
2657$4
2658int
2659main ()
2660{
2661static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2662test_array [0] = 0;
2663return test_array [0];
2664
2665  ;
2666  return 0;
2667}
2668_ACEOF
2669if ac_fn_cxx_try_compile "$LINENO"; then :
2670  ac_hi=$ac_mid
2671else
2672  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675done
2676case $ac_lo in #((
2677?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2678'') ac_retval=1 ;;
2679esac
2680  else
2681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h.  */
2683$4
2684static long int longval () { return $2; }
2685static unsigned long int ulongval () { return $2; }
2686#include <stdio.h>
2687#include <stdlib.h>
2688int
2689main ()
2690{
2691
2692  FILE *f = fopen ("conftest.val", "w");
2693  if (! f)
2694    return 1;
2695  if (($2) < 0)
2696    {
2697      long int i = longval ();
2698      if (i != ($2))
2699	return 1;
2700      fprintf (f, "%ld", i);
2701    }
2702  else
2703    {
2704      unsigned long int i = ulongval ();
2705      if (i != ($2))
2706	return 1;
2707      fprintf (f, "%lu", i);
2708    }
2709  /* Do not output a trailing newline, as this causes \r\n confusion
2710     on some platforms.  */
2711  return ferror (f) || fclose (f) != 0;
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_run "$LINENO"; then :
2718  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2719else
2720  ac_retval=1
2721fi
2722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2723  conftest.$ac_objext conftest.beam conftest.$ac_ext
2724rm -f conftest.val
2725
2726  fi
2727  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728  as_fn_set_status $ac_retval
2729
2730} # ac_fn_cxx_compute_int
2731
2732# ac_fn_cxx_try_link LINENO
2733# -------------------------
2734# Try to link conftest.$ac_ext, and return whether this succeeded.
2735ac_fn_cxx_try_link ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  rm -f conftest.$ac_objext conftest$ac_exeext
2739  if { { ac_try="$ac_link"
2740case "(($ac_try" in
2741  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2742  *) ac_try_echo=$ac_try;;
2743esac
2744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2745$as_echo "$ac_try_echo"; } >&5
2746  (eval "$ac_link") 2>conftest.err
2747  ac_status=$?
2748  if test -s conftest.err; then
2749    grep -v '^ *+' conftest.err >conftest.er1
2750    cat conftest.er1 >&5
2751    mv -f conftest.er1 conftest.err
2752  fi
2753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2754  test $ac_status = 0; } && {
2755	 test -z "$ac_cxx_werror_flag" ||
2756	 test ! -s conftest.err
2757       } && test -s conftest$ac_exeext && {
2758	 test "$cross_compiling" = yes ||
2759	 test -x conftest$ac_exeext
2760       }; then :
2761  ac_retval=0
2762else
2763  $as_echo "$as_me: failed program was:" >&5
2764sed 's/^/| /' conftest.$ac_ext >&5
2765
2766	ac_retval=1
2767fi
2768  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2769  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2770  # interfere with the next link command; also delete a directory that is
2771  # left behind by Apple's compiler.  We do this before executing the actions.
2772  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2773  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2774  as_fn_set_status $ac_retval
2775
2776} # ac_fn_cxx_try_link
2777
2778# ac_fn_cxx_check_func LINENO FUNC VAR
2779# ------------------------------------
2780# Tests whether FUNC exists, setting the cache variable VAR accordingly
2781ac_fn_cxx_check_func ()
2782{
2783  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2785$as_echo_n "checking for $2... " >&6; }
2786if eval \${$3+:} false; then :
2787  $as_echo_n "(cached) " >&6
2788else
2789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h.  */
2791/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2792   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2793#define $2 innocuous_$2
2794
2795/* System header to define __stub macros and hopefully few prototypes,
2796    which can conflict with char $2 (); below.
2797    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2798    <limits.h> exists even on freestanding compilers.  */
2799
2800#ifdef __STDC__
2801# include <limits.h>
2802#else
2803# include <assert.h>
2804#endif
2805
2806#undef $2
2807
2808/* Override any GCC internal prototype to avoid an error.
2809   Use char because int might match the return type of a GCC
2810   builtin and then its argument prototype would still apply.  */
2811#ifdef __cplusplus
2812extern "C"
2813#endif
2814char $2 ();
2815/* The GNU C library defines this for functions which it implements
2816    to always fail with ENOSYS.  Some functions are actually named
2817    something starting with __ and the normal name is an alias.  */
2818#if defined __stub_$2 || defined __stub___$2
2819choke me
2820#endif
2821
2822int
2823main ()
2824{
2825return $2 ();
2826  ;
2827  return 0;
2828}
2829_ACEOF
2830if ac_fn_cxx_try_link "$LINENO"; then :
2831  eval "$3=yes"
2832else
2833  eval "$3=no"
2834fi
2835rm -f core conftest.err conftest.$ac_objext \
2836    conftest$ac_exeext conftest.$ac_ext
2837fi
2838eval ac_res=\$$3
2839	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2840$as_echo "$ac_res" >&6; }
2841  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2842
2843} # ac_fn_cxx_check_func
2844
2845# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2846# -------------------------------------------------------
2847# Tests whether HEADER exists and can be compiled using the include files in
2848# INCLUDES, setting the cache variable VAR accordingly.
2849ac_fn_c_check_header_compile ()
2850{
2851  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2853$as_echo_n "checking for $2... " >&6; }
2854if eval \${$3+:} false; then :
2855  $as_echo_n "(cached) " >&6
2856else
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860#include <$2>
2861_ACEOF
2862if ac_fn_c_try_compile "$LINENO"; then :
2863  eval "$3=yes"
2864else
2865  eval "$3=no"
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_c_check_header_compile
2875cat >config.log <<_ACEOF
2876This file contains any messages produced by compilers while
2877running configure, to aid debugging if configure makes a mistake.
2878
2879It was created by OpenJDK $as_me jdk9, which was
2880generated by GNU Autoconf 2.69.  Invocation command line was
2881
2882  $ $0 $@
2883
2884_ACEOF
2885exec 5>>config.log
2886{
2887cat <<_ASUNAME
2888## --------- ##
2889## Platform. ##
2890## --------- ##
2891
2892hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2893uname -m = `(uname -m) 2>/dev/null || echo unknown`
2894uname -r = `(uname -r) 2>/dev/null || echo unknown`
2895uname -s = `(uname -s) 2>/dev/null || echo unknown`
2896uname -v = `(uname -v) 2>/dev/null || echo unknown`
2897
2898/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2899/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2900
2901/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2902/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2903/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2904/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2905/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2906/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2907/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2908
2909_ASUNAME
2910
2911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912for as_dir in $PATH
2913do
2914  IFS=$as_save_IFS
2915  test -z "$as_dir" && as_dir=.
2916    $as_echo "PATH: $as_dir"
2917  done
2918IFS=$as_save_IFS
2919
2920} >&5
2921
2922cat >&5 <<_ACEOF
2923
2924
2925## ----------- ##
2926## Core tests. ##
2927## ----------- ##
2928
2929_ACEOF
2930
2931
2932# Keep a trace of the command line.
2933# Strip out --no-create and --no-recursion so they do not pile up.
2934# Strip out --silent because we don't want to record it for future runs.
2935# Also quote any args containing shell meta-characters.
2936# Make two passes to allow for proper duplicate-argument suppression.
2937ac_configure_args=
2938ac_configure_args0=
2939ac_configure_args1=
2940ac_must_keep_next=false
2941for ac_pass in 1 2
2942do
2943  for ac_arg
2944  do
2945    case $ac_arg in
2946    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2947    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2948    | -silent | --silent | --silen | --sile | --sil)
2949      continue ;;
2950    *\'*)
2951      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2952    esac
2953    case $ac_pass in
2954    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2955    2)
2956      as_fn_append ac_configure_args1 " '$ac_arg'"
2957      if test $ac_must_keep_next = true; then
2958	ac_must_keep_next=false # Got value, back to normal.
2959      else
2960	case $ac_arg in
2961	  *=* | --config-cache | -C | -disable-* | --disable-* \
2962	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2963	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2964	  | -with-* | --with-* | -without-* | --without-* | --x)
2965	    case "$ac_configure_args0 " in
2966	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2967	    esac
2968	    ;;
2969	  -* ) ac_must_keep_next=true ;;
2970	esac
2971      fi
2972      as_fn_append ac_configure_args " '$ac_arg'"
2973      ;;
2974    esac
2975  done
2976done
2977{ ac_configure_args0=; unset ac_configure_args0;}
2978{ ac_configure_args1=; unset ac_configure_args1;}
2979
2980# When interrupted or exit'd, cleanup temporary files, and complete
2981# config.log.  We remove comments because anyway the quotes in there
2982# would cause problems or look ugly.
2983# WARNING: Use '\'' to represent an apostrophe within the trap.
2984# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2985trap 'exit_status=$?
2986  # Save into config.log some information that might help in debugging.
2987  {
2988    echo
2989
2990    $as_echo "## ---------------- ##
2991## Cache variables. ##
2992## ---------------- ##"
2993    echo
2994    # The following way of writing the cache mishandles newlines in values,
2995(
2996  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2997    eval ac_val=\$$ac_var
2998    case $ac_val in #(
2999    *${as_nl}*)
3000      case $ac_var in #(
3001      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3002$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3003      esac
3004      case $ac_var in #(
3005      _ | IFS | as_nl) ;; #(
3006      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3007      *) { eval $ac_var=; unset $ac_var;} ;;
3008      esac ;;
3009    esac
3010  done
3011  (set) 2>&1 |
3012    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3013    *${as_nl}ac_space=\ *)
3014      sed -n \
3015	"s/'\''/'\''\\\\'\'''\''/g;
3016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3017      ;; #(
3018    *)
3019      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3020      ;;
3021    esac |
3022    sort
3023)
3024    echo
3025
3026    $as_echo "## ----------------- ##
3027## Output variables. ##
3028## ----------------- ##"
3029    echo
3030    for ac_var in $ac_subst_vars
3031    do
3032      eval ac_val=\$$ac_var
3033      case $ac_val in
3034      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3035      esac
3036      $as_echo "$ac_var='\''$ac_val'\''"
3037    done | sort
3038    echo
3039
3040    if test -n "$ac_subst_files"; then
3041      $as_echo "## ------------------- ##
3042## File substitutions. ##
3043## ------------------- ##"
3044      echo
3045      for ac_var in $ac_subst_files
3046      do
3047	eval ac_val=\$$ac_var
3048	case $ac_val in
3049	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3050	esac
3051	$as_echo "$ac_var='\''$ac_val'\''"
3052      done | sort
3053      echo
3054    fi
3055
3056    if test -s confdefs.h; then
3057      $as_echo "## ----------- ##
3058## confdefs.h. ##
3059## ----------- ##"
3060      echo
3061      cat confdefs.h
3062      echo
3063    fi
3064    test "$ac_signal" != 0 &&
3065      $as_echo "$as_me: caught signal $ac_signal"
3066    $as_echo "$as_me: exit $exit_status"
3067  } >&5
3068  rm -f core *.core core.conftest.* &&
3069    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3070    exit $exit_status
3071' 0
3072for ac_signal in 1 2 13 15; do
3073  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3074done
3075ac_signal=0
3076
3077# confdefs.h avoids OS command line length limits that DEFS can exceed.
3078rm -f -r conftest* confdefs.h
3079
3080$as_echo "/* confdefs.h */" > confdefs.h
3081
3082# Predefined preprocessor variables.
3083
3084cat >>confdefs.h <<_ACEOF
3085#define PACKAGE_NAME "$PACKAGE_NAME"
3086_ACEOF
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_VERSION "$PACKAGE_VERSION"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_STRING "$PACKAGE_STRING"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_URL "$PACKAGE_URL"
3106_ACEOF
3107
3108
3109# Let the site file select an alternate cache file if it wants to.
3110# Prefer an explicitly selected file to automatically selected ones.
3111ac_site_file1=NONE
3112ac_site_file2=NONE
3113if test -n "$CONFIG_SITE"; then
3114  # We do not want a PATH search for config.site.
3115  case $CONFIG_SITE in #((
3116    -*)  ac_site_file1=./$CONFIG_SITE;;
3117    */*) ac_site_file1=$CONFIG_SITE;;
3118    *)   ac_site_file1=./$CONFIG_SITE;;
3119  esac
3120elif test "x$prefix" != xNONE; then
3121  ac_site_file1=$prefix/share/config.site
3122  ac_site_file2=$prefix/etc/config.site
3123else
3124  ac_site_file1=$ac_default_prefix/share/config.site
3125  ac_site_file2=$ac_default_prefix/etc/config.site
3126fi
3127for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3128do
3129  test "x$ac_site_file" = xNONE && continue
3130  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3131    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3132$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3133    sed 's/^/| /' "$ac_site_file" >&5
3134    . "$ac_site_file" \
3135      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3137as_fn_error $? "failed to load site script $ac_site_file
3138See \`config.log' for more details" "$LINENO" 5; }
3139  fi
3140done
3141
3142if test -r "$cache_file"; then
3143  # Some versions of bash will fail to source /dev/null (special files
3144  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3145  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3146    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3147$as_echo "$as_me: loading cache $cache_file" >&6;}
3148    case $cache_file in
3149      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3150      *)                      . "./$cache_file";;
3151    esac
3152  fi
3153else
3154  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3155$as_echo "$as_me: creating cache $cache_file" >&6;}
3156  >$cache_file
3157fi
3158
3159# Check that the precious variables saved in the cache have kept the same
3160# value.
3161ac_cache_corrupted=false
3162for ac_var in $ac_precious_vars; do
3163  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3164  eval ac_new_set=\$ac_env_${ac_var}_set
3165  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3166  eval ac_new_val=\$ac_env_${ac_var}_value
3167  case $ac_old_set,$ac_new_set in
3168    set,)
3169      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3170$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3171      ac_cache_corrupted=: ;;
3172    ,set)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,);;
3177    *)
3178      if test "x$ac_old_val" != "x$ac_new_val"; then
3179	# differences in whitespace do not lead to failure.
3180	ac_old_val_w=`echo x $ac_old_val`
3181	ac_new_val_w=`echo x $ac_new_val`
3182	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3183	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3184$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3185	  ac_cache_corrupted=:
3186	else
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3188$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3189	  eval $ac_var=\$ac_old_val
3190	fi
3191	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3192$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3194$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3195      fi;;
3196  esac
3197  # Pass precious variables to config.status.
3198  if test "$ac_new_set" = set; then
3199    case $ac_new_val in
3200    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3201    *) ac_arg=$ac_var=$ac_new_val ;;
3202    esac
3203    case " $ac_configure_args " in
3204      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3205      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3206    esac
3207  fi
3208done
3209if $ac_cache_corrupted; then
3210  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3213$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3214  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3215fi
3216## -------------------- ##
3217## Main body of script. ##
3218## -------------------- ##
3219
3220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
3225
3226
3227
3228ac_aux_dir=
3229for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3230  if test -f "$ac_dir/install-sh"; then
3231    ac_aux_dir=$ac_dir
3232    ac_install_sh="$ac_aux_dir/install-sh -c"
3233    break
3234  elif test -f "$ac_dir/install.sh"; then
3235    ac_aux_dir=$ac_dir
3236    ac_install_sh="$ac_aux_dir/install.sh -c"
3237    break
3238  elif test -f "$ac_dir/shtool"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/shtool install -c"
3241    break
3242  fi
3243done
3244if test -z "$ac_aux_dir"; then
3245  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
3246fi
3247
3248# These three variables are undocumented and unsupported,
3249# and are intended to be withdrawn in a future Autoconf release.
3250# They can cause serious problems if a builder's source tree is in a directory
3251# whose full name contains unusual characters.
3252ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3253ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3254ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3255
3256
3257# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3258
3259#
3260# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284#
3285# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3286#
3287# This program is free software; you can redistribute it and/or modify
3288# it under the terms of the GNU General Public License as published by
3289# the Free Software Foundation; either version 2 of the License, or
3290# (at your option) any later version.
3291#
3292# This program is distributed in the hope that it will be useful, but
3293# WITHOUT ANY WARRANTY; without even the implied warranty of
3294# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3295# General Public License for more details.
3296#
3297# You should have received a copy of the GNU General Public License
3298# along with this program; if not, write to the Free Software
3299# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3300#
3301# As a special exception to the GNU General Public License, if you
3302# distribute this file as part of a program that contains a
3303# configuration script generated by Autoconf, you may include it under
3304# the same distribution terms that you use for the rest of that program.
3305
3306# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3307# ----------------------------------
3308# PKG_PROG_PKG_CONFIG
3309
3310# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3311#
3312# Check to see whether a particular set of modules exists.  Similar
3313# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3314#
3315#
3316# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3317# this or PKG_CHECK_MODULES is called, or make sure to call
3318# PKG_CHECK_EXISTS manually
3319# --------------------------------------------------------------
3320
3321
3322
3323# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3324# ---------------------------------------------
3325# _PKG_CONFIG
3326
3327# _PKG_SHORT_ERRORS_SUPPORTED
3328# -----------------------------
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330
3331
3332# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3333# [ACTION-IF-NOT-FOUND])
3334#
3335#
3336# Note that if there is a possibility the first call to
3337# PKG_CHECK_MODULES might not happen, you should be sure to include an
3338# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3339#
3340#
3341# --------------------------------------------------------------
3342# PKG_CHECK_MODULES
3343
3344
3345# Include these first...
3346#
3347# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3348# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3349#
3350# This code is free software; you can redistribute it and/or modify it
3351# under the terms of the GNU General Public License version 2 only, as
3352# published by the Free Software Foundation.  Oracle designates this
3353# particular file as subject to the "Classpath" exception as provided
3354# by Oracle in the LICENSE file that accompanied this code.
3355#
3356# This code is distributed in the hope that it will be useful, but WITHOUT
3357# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3358# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3359# version 2 for more details (a copy is included in the LICENSE file that
3360# accompanied this code).
3361#
3362# You should have received a copy of the GNU General Public License version
3363# 2 along with this work; if not, write to the Free Software Foundation,
3364# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3365#
3366# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3367# or visit www.oracle.com if you need additional information or have any
3368# questions.
3369#
3370
3371# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3372# If so, then append $1 to $2 \
3373# Also set JVM_ARG_OK to true/false depending on outcome.
3374
3375
3376# Appends a string to a path variable, only adding the : when needed.
3377
3378
3379# Prepends a string to a path variable, only adding the : when needed.
3380
3381
3382# This will make sure the given variable points to a full and proper
3383# path. This means:
3384# 1) There will be no spaces in the path. On unix platforms,
3385#    spaces in the path will result in an error. On Windows,
3386#    the path will be rewritten using short-style to be space-free.
3387# 2) The path will be absolute, and it will be in unix-style (on
3388#     cygwin).
3389# $1: The name of the variable to fix
3390
3391
3392# This will make sure the given variable points to a executable
3393# with a full and proper path. This means:
3394# 1) There will be no spaces in the path. On unix platforms,
3395#    spaces in the path will result in an error. On Windows,
3396#    the path will be rewritten using short-style to be space-free.
3397# 2) The path will be absolute, and it will be in unix-style (on
3398#     cygwin).
3399# Any arguments given to the executable is preserved.
3400# If the input variable does not have a directory specification, then
3401# it need to be in the PATH.
3402# $1: The name of the variable to fix
3403
3404
3405
3406
3407# Register a --with argument but mark it as deprecated
3408# $1: The name of the with argument to deprecate, not including --with-
3409
3410
3411# Register a --enable argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --enable-
3413# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3414
3415
3416
3417
3418# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3419# $1: variable to check
3420
3421
3422# Check that there are no unprocessed overridden variables left.
3423# If so, they are an incorrect argument and we will exit with an error.
3424
3425
3426# Setup a tool for the given variable. If correctly specified by the user,
3427# use that value, otherwise search for the tool using the supplied code snippet.
3428# $1: variable to set
3429# $2: code snippet to call to look for the tool
3430
3431
3432# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3433# $1: variable to set
3434# $2: executable name (or list of names) to look for
3435
3436
3437# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3438# $1: variable to set
3439# $2: executable name (or list of names) to look for
3440
3441
3442# Like BASIC_PATH_PROGS but fails if no tool was found.
3443# $1: variable to set
3444# $2: executable name (or list of names) to look for
3445
3446
3447# Like BASIC_SETUP_TOOL but fails if no tool was found.
3448# $1: variable to set
3449# $2: autoconf macro to call to look for the special tool
3450
3451
3452# Setup the most fundamental tools that relies on not much else to set up,
3453# but is used by much of the early bootstrap code.
3454
3455
3456# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3457
3458
3459# Evaluates platform specific overrides for devkit variables.
3460# $1: Name of variable
3461
3462
3463
3464
3465
3466
3467#%%% Simple tools %%%
3468
3469# Check if we have found a usable version of make
3470# $1: the path to a potential make binary (or empty)
3471# $2: the description on how we found this
3472
3473
3474
3475
3476# Goes looking for a usable version of GNU make.
3477
3478
3479
3480
3481
3482
3483# Check if build directory is on local disk. If not possible to determine,
3484# we prefer to claim it's local.
3485# Argument 1: directory to test
3486# Argument 2: what to do if it is on local disk
3487# Argument 3: what to do otherwise (remote disk or failure)
3488
3489
3490# Check that source files have basic read permissions set. This might
3491# not be the case in cygwin in certain conditions.
3492
3493
3494
3495
3496# Check for support for specific options in bash
3497
3498
3499#
3500# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3501# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3502#
3503# This code is free software; you can redistribute it and/or modify it
3504# under the terms of the GNU General Public License version 2 only, as
3505# published by the Free Software Foundation.  Oracle designates this
3506# particular file as subject to the "Classpath" exception as provided
3507# by Oracle in the LICENSE file that accompanied this code.
3508#
3509# This code is distributed in the hope that it will be useful, but WITHOUT
3510# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3511# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3512# version 2 for more details (a copy is included in the LICENSE file that
3513# accompanied this code).
3514#
3515# You should have received a copy of the GNU General Public License version
3516# 2 along with this work; if not, write to the Free Software Foundation,
3517# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3518#
3519# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3520# or visit www.oracle.com if you need additional information or have any
3521# questions.
3522#
3523
3524
3525
3526
3527
3528# Helper function which possibly converts a path using DOS-style short mode.
3529# If so, the updated path is stored in $new_path.
3530# $1: The path to check
3531
3532
3533# Helper function which possibly converts a path using DOS-style short mode.
3534# If so, the updated path is stored in $new_path.
3535# $1: The path to check
3536
3537
3538# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3539# and could probably be heavily simplified. However, all changes in this
3540# area tend to need lot of testing in different scenarios, and in lack of
3541# proper unit testing, cleaning this up has not been deemed worth the effort
3542# at the moment.
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3553
3554
3555
3556
3557#
3558# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3559# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560#
3561# This code is free software; you can redistribute it and/or modify it
3562# under the terms of the GNU General Public License version 2 only, as
3563# published by the Free Software Foundation.  Oracle designates this
3564# particular file as subject to the "Classpath" exception as provided
3565# by Oracle in the LICENSE file that accompanied this code.
3566#
3567# This code is distributed in the hope that it will be useful, but WITHOUT
3568# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570# version 2 for more details (a copy is included in the LICENSE file that
3571# accompanied this code).
3572#
3573# You should have received a copy of the GNU General Public License version
3574# 2 along with this work; if not, write to the Free Software Foundation,
3575# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576#
3577# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578# or visit www.oracle.com if you need additional information or have any
3579# questions.
3580#
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592# ... then the rest
3593#
3594# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3596#
3597# This code is free software; you can redistribute it and/or modify it
3598# under the terms of the GNU General Public License version 2 only, as
3599# published by the Free Software Foundation.  Oracle designates this
3600# particular file as subject to the "Classpath" exception as provided
3601# by Oracle in the LICENSE file that accompanied this code.
3602#
3603# This code is distributed in the hope that it will be useful, but WITHOUT
3604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3606# version 2 for more details (a copy is included in the LICENSE file that
3607# accompanied this code).
3608#
3609# You should have received a copy of the GNU General Public License version
3610# 2 along with this work; if not, write to the Free Software Foundation,
3611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3612#
3613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3614# or visit www.oracle.com if you need additional information or have any
3615# questions.
3616#
3617
3618########################################################################
3619# This file handles detection of the Boot JDK. The Boot JDK detection
3620# process has been developed as a response to solve a complex real-world
3621# problem. Initially, it was simple, but it has grown as platform after
3622# platform, idiosyncracy after idiosyncracy has been supported.
3623#
3624# The basic idea is this:
3625# 1) You need an acceptable *) JDK to use as a Boot JDK
3626# 2) There are several ways to locate a JDK, that are mostly platform
3627#    dependent **)
3628# 3) You can have multiple JDKs installed
3629# 4) If possible, configure should try to dig out an acceptable JDK
3630#    automatically, without having to resort to command-line options
3631#
3632# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3633#     javac) and not a JRE, etc.
3634#
3635# **) On Windows we typically use a well-known path.
3636#     On MacOSX we typically use the tool java_home.
3637#     On Linux we typically find javac in the $PATH, and then follow a
3638#     chain of symlinks that often ends up in a real JDK.
3639#
3640# This leads to the code where we check in different ways to locate a
3641# JDK, and if one is found, check if it is acceptable. If not, we print
3642# our reasons for rejecting it (useful when debugging non-working
3643# configure situations) and continue checking the next one.
3644########################################################################
3645
3646# Execute the check given as argument, and verify the result
3647# If the Boot JDK was previously found, do nothing
3648# $1 A command line (typically autoconf macro) to execute
3649
3650
3651# Test: Is bootjdk explicitely set by command line arguments?
3652
3653
3654# Test: Is bootjdk available from builddeps?
3655
3656
3657# Test: Is $JAVA_HOME set?
3658
3659
3660# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3661
3662
3663# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3664# $1: Argument to the java_home binary (optional)
3665
3666
3667# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3668
3669
3670# Look for a jdk in the given path. If there are multiple, try to select the newest.
3671# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3672# $1 = Path to directory containing jdk installations.
3673# $2 = String to append to the found JDK directory to get the proper JDK home
3674
3675
3676# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3677# environmental variable as base for where to look.
3678# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3679
3680
3681# Test: Is there a JDK installed in default, well-known locations?
3682
3683
3684# Check that a command-line tool in the Boot JDK is correct
3685# $1 = name of variable to assign
3686# $2 = name of binary
3687
3688
3689###############################################################################
3690#
3691# We need a Boot JDK to bootstrap the build.
3692#
3693
3694
3695
3696
3697
3698#
3699# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3700# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3701#
3702# This code is free software; you can redistribute it and/or modify it
3703# under the terms of the GNU General Public License version 2 only, as
3704# published by the Free Software Foundation.  Oracle designates this
3705# particular file as subject to the "Classpath" exception as provided
3706# by Oracle in the LICENSE file that accompanied this code.
3707#
3708# This code is distributed in the hope that it will be useful, but WITHOUT
3709# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3710# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3711# version 2 for more details (a copy is included in the LICENSE file that
3712# accompanied this code).
3713#
3714# You should have received a copy of the GNU General Public License version
3715# 2 along with this work; if not, write to the Free Software Foundation,
3716# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3717#
3718# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3719# or visit www.oracle.com if you need additional information or have any
3720# questions.
3721#
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742#
3743# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3744# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3745#
3746# This code is free software; you can redistribute it and/or modify it
3747# under the terms of the GNU General Public License version 2 only, as
3748# published by the Free Software Foundation.  Oracle designates this
3749# particular file as subject to the "Classpath" exception as provided
3750# by Oracle in the LICENSE file that accompanied this code.
3751#
3752# This code is distributed in the hope that it will be useful, but WITHOUT
3753# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3754# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3755# version 2 for more details (a copy is included in the LICENSE file that
3756# accompanied this code).
3757#
3758# You should have received a copy of the GNU General Public License version
3759# 2 along with this work; if not, write to the Free Software Foundation,
3760# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3761#
3762# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3763# or visit www.oracle.com if you need additional information or have any
3764# questions.
3765#
3766
3767
3768
3769
3770
3771# Documentation on common flags used for solstudio in HIGHEST.
3772#
3773# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3774#          done with care, there are some assumptions below that need to
3775#          be understood about the use of pointers, and IEEE behavior.
3776#
3777# -fns: Use non-standard floating point mode (not IEEE 754)
3778# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3779# -fsingle: Use single precision floating point with 'float'
3780# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3781#   (Source with excessing pointer casting and data access with mixed
3782#    pointer types are not recommended)
3783# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3784#   (If you expect perfect errno behavior, do not use this)
3785# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3786# -xrestrict: Pointer parameters to functions do not overlap
3787#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3788#    If you pass in multiple pointers to the same data, do not use this)
3789# -xlibmil: Inline some library routines
3790#   (If you expect perfect errno behavior, do not use this)
3791# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3792#   (If you expect perfect errno behavior, do not use this)
3793#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3794
3795    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3796    # Bug?
3797    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3798    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3799    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3800    #fi
3801
3802
3803
3804
3805
3806# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3807#                                   [RUN-IF-FALSE])
3808# ------------------------------------------------------------
3809# Check that the c and c++ compilers support an argument
3810
3811
3812# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3813#                                    [RUN-IF-FALSE])
3814# ------------------------------------------------------------
3815# Check that the linker support an argument
3816
3817
3818
3819
3820#
3821# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845
3846
3847
3848
3849cygwin_help() {
3850  case $1 in
3851    unzip)
3852      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3854      ;;
3855    zip)
3856      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3857      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3858      ;;
3859    make)
3860      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3862      ;;
3863    freetype)
3864      HELP_MSG="
3865The freetype library can now be build during the configure process.
3866Download the freetype sources and unpack them into an arbitrary directory:
3867
3868wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3869tar -xzf freetype-2.5.3.tar.gz
3870
3871Then run configure with '--with-freetype-src=<freetype_src>'. This will
3872automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3873builds or into '<freetype_src>/lib32' for 32-bit builds.
3874Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3875and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3876      ;;
3877  esac
3878}
3879
3880msys_help() {
3881  PKGHANDLER_COMMAND=""
3882}
3883
3884apt_help() {
3885  case $1 in
3886    devkit)
3887      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3888    openjdk)
3889      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3890    alsa)
3891      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3892    cups)
3893      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3894    freetype)
3895      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3896    pulse)
3897      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3898    x11)
3899      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3900    ccache)
3901      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3902  esac
3903}
3904
3905yum_help() {
3906  case $1 in
3907    devkit)
3908      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3909    openjdk)
3910      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3911    alsa)
3912      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3913    cups)
3914      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3915    freetype)
3916      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3917    pulse)
3918      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3919    x11)
3920      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3921    ccache)
3922      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3923  esac
3924}
3925
3926port_help() {
3927  PKGHANDLER_COMMAND=""
3928}
3929
3930pkgutil_help() {
3931  PKGHANDLER_COMMAND=""
3932}
3933
3934pkgadd_help() {
3935  PKGHANDLER_COMMAND=""
3936}
3937
3938# This function will check if we're called from the "configure" wrapper while
3939# printing --help. If so, we will print out additional information that can
3940# only be extracted within the autoconf script, and then exit. This must be
3941# called at the very beginning in configure.ac.
3942
3943
3944
3945
3946
3947
3948#
3949# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3950# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3951#
3952# This code is free software; you can redistribute it and/or modify it
3953# under the terms of the GNU General Public License version 2 only, as
3954# published by the Free Software Foundation.  Oracle designates this
3955# particular file as subject to the "Classpath" exception as provided
3956# by Oracle in the LICENSE file that accompanied this code.
3957#
3958# This code is distributed in the hope that it will be useful, but WITHOUT
3959# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3960# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3961# version 2 for more details (a copy is included in the LICENSE file that
3962# accompanied this code).
3963#
3964# You should have received a copy of the GNU General Public License version
3965# 2 along with this work; if not, write to the Free Software Foundation,
3966# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3967#
3968# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3969# or visit www.oracle.com if you need additional information or have any
3970# questions.
3971#
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982###############################################################################
3983#
3984# Should we build only OpenJDK even if closed sources are present?
3985#
3986
3987
3988
3989
3990###############################################################################
3991#
3992# Setup version numbers
3993#
3994
3995
3996
3997
3998
3999
4000################################################################################
4001#
4002# Gcov coverage data for hotspot
4003#
4004
4005
4006#
4007# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4008# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4009#
4010# This code is free software; you can redistribute it and/or modify it
4011# under the terms of the GNU General Public License version 2 only, as
4012# published by the Free Software Foundation.  Oracle designates this
4013# particular file as subject to the "Classpath" exception as provided
4014# by Oracle in the LICENSE file that accompanied this code.
4015#
4016# This code is distributed in the hope that it will be useful, but WITHOUT
4017# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4018# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4019# version 2 for more details (a copy is included in the LICENSE file that
4020# accompanied this code).
4021#
4022# You should have received a copy of the GNU General Public License version
4023# 2 along with this work; if not, write to the Free Software Foundation,
4024# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4025#
4026# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4027# or visit www.oracle.com if you need additional information or have any
4028# questions.
4029#
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051#
4052# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4053# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4054#
4055# This code is free software; you can redistribute it and/or modify it
4056# under the terms of the GNU General Public License version 2 only, as
4057# published by the Free Software Foundation.  Oracle designates this
4058# particular file as subject to the "Classpath" exception as provided
4059# by Oracle in the LICENSE file that accompanied this code.
4060#
4061# This code is distributed in the hope that it will be useful, but WITHOUT
4062# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4063# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4064# version 2 for more details (a copy is included in the LICENSE file that
4065# accompanied this code).
4066#
4067# You should have received a copy of the GNU General Public License version
4068# 2 along with this work; if not, write to the Free Software Foundation,
4069# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4070#
4071# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4072# or visit www.oracle.com if you need additional information or have any
4073# questions.
4074#
4075
4076# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4077# Converts autoconf style CPU name to OpenJDK style, into
4078# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4079
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style OS name to OpenJDK style, into
4083# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4084
4085
4086# Expects $host_os $host_cpu $build_os and $build_cpu
4087# and $with_target_bits to have been setup!
4088#
4089# Translate the standard triplet(quadruplet) definition
4090# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4091# OPENJDK_BUILD_OS, etc.
4092
4093
4094# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4095# accordingly. Must be done after setting up build and target system, but before
4096# doing anything else with these values.
4097
4098
4099# Setup the legacy variables, for controlling the old makefiles.
4100#
4101
4102
4103
4104
4105#%%% Build and target systems %%%
4106
4107
4108
4109
4110# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4111# Add -mX to various FLAGS variables.
4112
4113
4114
4115
4116
4117
4118#
4119# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4120# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4121#
4122# This code is free software; you can redistribute it and/or modify it
4123# under the terms of the GNU General Public License version 2 only, as
4124# published by the Free Software Foundation.  Oracle designates this
4125# particular file as subject to the "Classpath" exception as provided
4126# by Oracle in the LICENSE file that accompanied this code.
4127#
4128# This code is distributed in the hope that it will be useful, but WITHOUT
4129# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4130# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4131# version 2 for more details (a copy is included in the LICENSE file that
4132# accompanied this code).
4133#
4134# You should have received a copy of the GNU General Public License version
4135# 2 along with this work; if not, write to the Free Software Foundation,
4136# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4137#
4138# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4139# or visit www.oracle.com if you need additional information or have any
4140# questions.
4141#
4142
4143
4144
4145
4146
4147
4148
4149
4150#
4151# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4153#
4154# This code is free software; you can redistribute it and/or modify it
4155# under the terms of the GNU General Public License version 2 only, as
4156# published by the Free Software Foundation.  Oracle designates this
4157# particular file as subject to the "Classpath" exception as provided
4158# by Oracle in the LICENSE file that accompanied this code.
4159#
4160# This code is distributed in the hope that it will be useful, but WITHOUT
4161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4163# version 2 for more details (a copy is included in the LICENSE file that
4164# accompanied this code).
4165#
4166# You should have received a copy of the GNU General Public License version
4167# 2 along with this work; if not, write to the Free Software Foundation,
4168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4169#
4170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4171# or visit www.oracle.com if you need additional information or have any
4172# questions.
4173#
4174
4175########################################################################
4176# This file is responsible for detecting, verifying and setting up the
4177# toolchain, i.e. the compiler, linker and related utilities. It will setup
4178# proper paths to the binaries, but it will not setup any flags.
4179#
4180# The binaries used is determined by the toolchain type, which is the family of
4181# compilers and related tools that are used.
4182########################################################################
4183
4184
4185# All valid toolchains, regardless of platform (used by help.m4)
4186VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4187
4188# These toolchains are valid on different platforms
4189VALID_TOOLCHAINS_linux="gcc clang"
4190VALID_TOOLCHAINS_solaris="solstudio"
4191VALID_TOOLCHAINS_macosx="gcc clang"
4192VALID_TOOLCHAINS_aix="xlc"
4193VALID_TOOLCHAINS_windows="microsoft"
4194
4195# Toolchain descriptions
4196TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4197TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4198TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4199TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4200TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4201
4202# Setup a number of variables describing how native output files are
4203# named on this platform/toolchain.
4204
4205
4206# Determine which toolchain type to use, and make sure it is valid for this
4207# platform. Setup various information about the selected toolchain.
4208
4209
4210# Before we start detecting the toolchain executables, we might need some
4211# special setup, e.g. additional paths etc.
4212
4213
4214# Restore path, etc
4215
4216
4217# Check if a compiler is of the toolchain type we expect, and save the version
4218# information from it. If the compiler does not match the expected type,
4219# this function will abort using AC_MSG_ERROR. If it matches, the version will
4220# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4221# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4222#
4223# $1 = compiler to test (CC or CXX)
4224# $2 = human readable name of compiler (C or C++)
4225
4226
4227# Try to locate the given C or C++ compiler in the path, or otherwise.
4228#
4229# $1 = compiler to test (CC or CXX)
4230# $2 = human readable name of compiler (C or C++)
4231# $3 = list of compiler names to search for
4232
4233
4234# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4235# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4236# archiver (AR). Verify that the compilers are correct according to the
4237# toolchain type.
4238
4239
4240# Setup additional tools that is considered a part of the toolchain, but not the
4241# core part. Many of these are highly platform-specific and do not exist,
4242# and/or are not needed on all platforms.
4243
4244
4245# Setup the build tools (i.e, the compiler and linker used to build programs
4246# that should be run on the build platform, not the target platform, as a build
4247# helper). Since the non-cross-compile case uses the normal, target compilers
4248# for this, we can only do this after these have been setup.
4249
4250
4251# Setup legacy variables that are still needed as alternative ways to refer to
4252# parts of the toolchain.
4253
4254
4255# Do some additional checks on the detected tools.
4256
4257
4258# Setup the JTReg Regression Test Harness.
4259
4260
4261#
4262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264#
4265# This code is free software; you can redistribute it and/or modify it
4266# under the terms of the GNU General Public License version 2 only, as
4267# published by the Free Software Foundation.  Oracle designates this
4268# particular file as subject to the "Classpath" exception as provided
4269# by Oracle in the LICENSE file that accompanied this code.
4270#
4271# This code is distributed in the hope that it will be useful, but WITHOUT
4272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4274# version 2 for more details (a copy is included in the LICENSE file that
4275# accompanied this code).
4276#
4277# You should have received a copy of the GNU General Public License version
4278# 2 along with this work; if not, write to the Free Software Foundation,
4279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4280#
4281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4282# or visit www.oracle.com if you need additional information or have any
4283# questions.
4284#
4285
4286################################################################################
4287# The order of these defines the priority by which we try to find them.
4288VALID_VS_VERSIONS="2013 2012 2010"
4289
4290VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4291VS_VERSION_INTERNAL_2010=100
4292VS_MSVCR_2010=msvcr100.dll
4293# We don't use msvcp on Visual Studio 2010
4294#VS_MSVCP_2010=msvcp100.dll
4295VS_ENVVAR_2010="VS100COMNTOOLS"
4296VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4297VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4298VS_VS_PLATFORM_NAME_2010="v100"
4299VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4300
4301VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4302VS_VERSION_INTERNAL_2012=110
4303VS_MSVCR_2012=msvcr110.dll
4304VS_MSVCP_2012=msvcp110.dll
4305VS_ENVVAR_2012="VS110COMNTOOLS"
4306VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4307VS_SDK_INSTALLDIR_2012=
4308VS_VS_PLATFORM_NAME_2012="v110"
4309VS_SDK_PLATFORM_NAME_2012=
4310
4311VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4312VS_VERSION_INTERNAL_2013=120
4313VS_MSVCR_2013=msvcr120.dll
4314VS_MSVCP_2013=msvcp120.dll
4315VS_ENVVAR_2013="VS120COMNTOOLS"
4316VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4317VS_SDK_INSTALLDIR_2013=
4318VS_VS_PLATFORM_NAME_2013="v120"
4319VS_SDK_PLATFORM_NAME_2013=
4320
4321################################################################################
4322
4323
4324
4325################################################################################
4326
4327
4328
4329################################################################################
4330# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4331# build environment and assigns it to VS_ENV_CMD
4332
4333
4334################################################################################
4335
4336
4337
4338################################################################################
4339# Check if the VS env variables were setup prior to running configure.
4340# If not, then find vcvarsall.bat and run it automatically, and integrate
4341# the set env variables into the spec file.
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356# This line needs to be here, verbatim, after all includes and the dummy hook
4357# definitions. It is replaced with custom functionality when building
4358# custom sources.
4359#CUSTOM_AUTOCONF_INCLUDE
4360
4361# Do not change or remove the following line, it is needed for consistency checks:
4362DATE_WHEN_GENERATED=1430918902
4363
4364###############################################################################
4365#
4366# Initialization / Boot-strapping
4367#
4368# The bootstrapping process needs to solve the "chicken or the egg" problem,
4369# thus it jumps back and forth, each time gaining something needed later on.
4370#
4371###############################################################################
4372
4373# If we are requested to print additional help, do that and then exit.
4374# This must be the very first call.
4375
4376  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4377    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4378    $PRINTF "Which are valid to use depends on the build platform.\n"
4379    for toolchain in $VALID_TOOLCHAINS_all; do
4380      # Use indirect variable referencing
4381      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4382      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4383      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4384    done
4385
4386    # And now exit directly
4387    exit 0
4388  fi
4389
4390
4391# Basic initialization that must happen first of all in the normal process.
4392
4393  # Save the original command line. This is passed to us by the wrapper configure script.
4394
4395  # Save the path variable before it gets changed
4396  ORIGINAL_PATH="$PATH"
4397
4398  DATE_WHEN_CONFIGURED=`LANG=C date`
4399
4400  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4401$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4402  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4403$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4404
4405
4406  # Start with tools that do not need have cross compilation support
4407  # and can be expected to be found in the default PATH. These tools are
4408  # used by configure. Nor are these tools expected to be found in the
4409  # devkit from the builddeps server either, since they are
4410  # needed to download the devkit.
4411
4412  # First are all the simple required tools.
4413
4414
4415
4416  # Publish this variable in the help.
4417
4418
4419  if test "x$BASENAME" = x; then
4420    # The variable is not set by user, try to locate tool using the code snippet
4421    for ac_prog in basename
4422do
4423  # Extract the first word of "$ac_prog", so it can be a program name with args.
4424set dummy $ac_prog; ac_word=$2
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4426$as_echo_n "checking for $ac_word... " >&6; }
4427if ${ac_cv_path_BASENAME+:} false; then :
4428  $as_echo_n "(cached) " >&6
4429else
4430  case $BASENAME in
4431  [\\/]* | ?:[\\/]*)
4432  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4433  ;;
4434  *)
4435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4436for as_dir in $PATH
4437do
4438  IFS=$as_save_IFS
4439  test -z "$as_dir" && as_dir=.
4440    for ac_exec_ext in '' $ac_executable_extensions; do
4441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4442    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4444    break 2
4445  fi
4446done
4447  done
4448IFS=$as_save_IFS
4449
4450  ;;
4451esac
4452fi
4453BASENAME=$ac_cv_path_BASENAME
4454if test -n "$BASENAME"; then
4455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4456$as_echo "$BASENAME" >&6; }
4457else
4458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4459$as_echo "no" >&6; }
4460fi
4461
4462
4463  test -n "$BASENAME" && break
4464done
4465
4466  else
4467    # The variable is set, but is it from the command line or the environment?
4468
4469    # Try to remove the string !BASENAME! from our list.
4470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4472      # If it failed, the variable was not from the command line. Ignore it,
4473      # but warn the user (except for BASH, which is always set by the calling BASH).
4474      if test "xBASENAME" != xBASH; then
4475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4476$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4477      fi
4478      # Try to locate tool using the code snippet
4479      for ac_prog in basename
4480do
4481  # Extract the first word of "$ac_prog", so it can be a program name with args.
4482set dummy $ac_prog; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
4485if ${ac_cv_path_BASENAME+:} false; then :
4486  $as_echo_n "(cached) " >&6
4487else
4488  case $BASENAME in
4489  [\\/]* | ?:[\\/]*)
4490  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4491  ;;
4492  *)
4493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4494for as_dir in $PATH
4495do
4496  IFS=$as_save_IFS
4497  test -z "$as_dir" && as_dir=.
4498    for ac_exec_ext in '' $ac_executable_extensions; do
4499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4500    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4502    break 2
4503  fi
4504done
4505  done
4506IFS=$as_save_IFS
4507
4508  ;;
4509esac
4510fi
4511BASENAME=$ac_cv_path_BASENAME
4512if test -n "$BASENAME"; then
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4514$as_echo "$BASENAME" >&6; }
4515else
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517$as_echo "no" >&6; }
4518fi
4519
4520
4521  test -n "$BASENAME" && break
4522done
4523
4524    else
4525      # If it succeeded, then it was overridden by the user. We will use it
4526      # for the tool.
4527
4528      # First remove it from the list of overridden variables, so we can test
4529      # for unknown variables in the end.
4530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4531
4532      # Check if the provided tool contains a complete path.
4533      tool_specified="$BASENAME"
4534      tool_basename="${tool_specified##*/}"
4535      if test "x$tool_basename" = "x$tool_specified"; then
4536        # A command without a complete path is provided, search $PATH.
4537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4538$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4539        # Extract the first word of "$tool_basename", so it can be a program name with args.
4540set dummy $tool_basename; ac_word=$2
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
4543if ${ac_cv_path_BASENAME+:} false; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546  case $BASENAME in
4547  [\\/]* | ?:[\\/]*)
4548  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4549  ;;
4550  *)
4551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in $PATH
4553do
4554  IFS=$as_save_IFS
4555  test -z "$as_dir" && as_dir=.
4556    for ac_exec_ext in '' $ac_executable_extensions; do
4557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4558    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560    break 2
4561  fi
4562done
4563  done
4564IFS=$as_save_IFS
4565
4566  ;;
4567esac
4568fi
4569BASENAME=$ac_cv_path_BASENAME
4570if test -n "$BASENAME"; then
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4572$as_echo "$BASENAME" >&6; }
4573else
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
4576fi
4577
4578
4579        if test "x$BASENAME" = x; then
4580          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4581        fi
4582      else
4583        # Otherwise we believe it is a complete path. Use it as it is.
4584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4585$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4587$as_echo_n "checking for BASENAME... " >&6; }
4588        if test ! -x "$tool_specified"; then
4589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4590$as_echo "not found" >&6; }
4591          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4592        fi
4593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4594$as_echo "$tool_specified" >&6; }
4595      fi
4596    fi
4597  fi
4598
4599
4600
4601  if test "x$BASENAME" = x; then
4602    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4603  fi
4604
4605
4606
4607
4608
4609  # Publish this variable in the help.
4610
4611
4612  if test "x$BASH" = x; then
4613    # The variable is not set by user, try to locate tool using the code snippet
4614    for ac_prog in bash
4615do
4616  # Extract the first word of "$ac_prog", so it can be a program name with args.
4617set dummy $ac_prog; 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_BASH+:} false; then :
4621  $as_echo_n "(cached) " >&6
4622else
4623  case $BASH in
4624  [\\/]* | ?:[\\/]*)
4625  ac_cv_path_BASH="$BASH" # 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_BASH="$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
4646BASH=$ac_cv_path_BASH
4647if test -n "$BASH"; then
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4649$as_echo "$BASH" >&6; }
4650else
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656  test -n "$BASH" && break
4657done
4658
4659  else
4660    # The variable is set, but is it from the command line or the environment?
4661
4662    # Try to remove the string !BASH! from our list.
4663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4665      # If it failed, the variable was not from the command line. Ignore it,
4666      # but warn the user (except for BASH, which is always set by the calling BASH).
4667      if test "xBASH" != xBASH; then
4668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4669$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4670      fi
4671      # Try to locate tool using the code snippet
4672      for ac_prog in bash
4673do
4674  # Extract the first word of "$ac_prog", so it can be a program name with args.
4675set dummy $ac_prog; ac_word=$2
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677$as_echo_n "checking for $ac_word... " >&6; }
4678if ${ac_cv_path_BASH+:} false; then :
4679  $as_echo_n "(cached) " >&6
4680else
4681  case $BASH in
4682  [\\/]* | ?:[\\/]*)
4683  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4684  ;;
4685  *)
4686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687for as_dir in $PATH
4688do
4689  IFS=$as_save_IFS
4690  test -z "$as_dir" && as_dir=.
4691    for ac_exec_ext in '' $ac_executable_extensions; do
4692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4693    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4695    break 2
4696  fi
4697done
4698  done
4699IFS=$as_save_IFS
4700
4701  ;;
4702esac
4703fi
4704BASH=$ac_cv_path_BASH
4705if test -n "$BASH"; then
4706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4707$as_echo "$BASH" >&6; }
4708else
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710$as_echo "no" >&6; }
4711fi
4712
4713
4714  test -n "$BASH" && break
4715done
4716
4717    else
4718      # If it succeeded, then it was overridden by the user. We will use it
4719      # for the tool.
4720
4721      # First remove it from the list of overridden variables, so we can test
4722      # for unknown variables in the end.
4723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4724
4725      # Check if the provided tool contains a complete path.
4726      tool_specified="$BASH"
4727      tool_basename="${tool_specified##*/}"
4728      if test "x$tool_basename" = "x$tool_specified"; then
4729        # A command without a complete path is provided, search $PATH.
4730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4731$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4732        # Extract the first word of "$tool_basename", so it can be a program name with args.
4733set dummy $tool_basename; ac_word=$2
4734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735$as_echo_n "checking for $ac_word... " >&6; }
4736if ${ac_cv_path_BASH+:} false; then :
4737  $as_echo_n "(cached) " >&6
4738else
4739  case $BASH in
4740  [\\/]* | ?:[\\/]*)
4741  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4742  ;;
4743  *)
4744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in $PATH
4746do
4747  IFS=$as_save_IFS
4748  test -z "$as_dir" && as_dir=.
4749    for ac_exec_ext in '' $ac_executable_extensions; do
4750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4751    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4753    break 2
4754  fi
4755done
4756  done
4757IFS=$as_save_IFS
4758
4759  ;;
4760esac
4761fi
4762BASH=$ac_cv_path_BASH
4763if test -n "$BASH"; then
4764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4765$as_echo "$BASH" >&6; }
4766else
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771
4772        if test "x$BASH" = x; then
4773          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4774        fi
4775      else
4776        # Otherwise we believe it is a complete path. Use it as it is.
4777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4778$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4780$as_echo_n "checking for BASH... " >&6; }
4781        if test ! -x "$tool_specified"; then
4782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4783$as_echo "not found" >&6; }
4784          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4785        fi
4786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4787$as_echo "$tool_specified" >&6; }
4788      fi
4789    fi
4790  fi
4791
4792
4793
4794  if test "x$BASH" = x; then
4795    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4796  fi
4797
4798
4799
4800
4801
4802  # Publish this variable in the help.
4803
4804
4805  if test "x$CAT" = x; then
4806    # The variable is not set by user, try to locate tool using the code snippet
4807    for ac_prog in cat
4808do
4809  # Extract the first word of "$ac_prog", so it can be a program name with args.
4810set dummy $ac_prog; 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_CAT+:} false; then :
4814  $as_echo_n "(cached) " >&6
4815else
4816  case $CAT in
4817  [\\/]* | ?:[\\/]*)
4818  ac_cv_path_CAT="$CAT" # 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_CAT="$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
4839CAT=$ac_cv_path_CAT
4840if test -n "$CAT"; then
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4842$as_echo "$CAT" >&6; }
4843else
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
4846fi
4847
4848
4849  test -n "$CAT" && break
4850done
4851
4852  else
4853    # The variable is set, but is it from the command line or the environment?
4854
4855    # Try to remove the string !CAT! from our list.
4856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4858      # If it failed, the variable was not from the command line. Ignore it,
4859      # but warn the user (except for BASH, which is always set by the calling BASH).
4860      if test "xCAT" != xBASH; then
4861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4862$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4863      fi
4864      # Try to locate tool using the code snippet
4865      for ac_prog in cat
4866do
4867  # Extract the first word of "$ac_prog", so it can be a program name with args.
4868set dummy $ac_prog; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if ${ac_cv_path_CAT+:} false; then :
4872  $as_echo_n "(cached) " >&6
4873else
4874  case $CAT in
4875  [\\/]* | ?:[\\/]*)
4876  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4877  ;;
4878  *)
4879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in $PATH
4881do
4882  IFS=$as_save_IFS
4883  test -z "$as_dir" && as_dir=.
4884    for ac_exec_ext in '' $ac_executable_extensions; do
4885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4886    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888    break 2
4889  fi
4890done
4891  done
4892IFS=$as_save_IFS
4893
4894  ;;
4895esac
4896fi
4897CAT=$ac_cv_path_CAT
4898if test -n "$CAT"; then
4899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4900$as_echo "$CAT" >&6; }
4901else
4902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
4906
4907  test -n "$CAT" && break
4908done
4909
4910    else
4911      # If it succeeded, then it was overridden by the user. We will use it
4912      # for the tool.
4913
4914      # First remove it from the list of overridden variables, so we can test
4915      # for unknown variables in the end.
4916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4917
4918      # Check if the provided tool contains a complete path.
4919      tool_specified="$CAT"
4920      tool_basename="${tool_specified##*/}"
4921      if test "x$tool_basename" = "x$tool_specified"; then
4922        # A command without a complete path is provided, search $PATH.
4923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4924$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4925        # Extract the first word of "$tool_basename", so it can be a program name with args.
4926set dummy $tool_basename; ac_word=$2
4927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4928$as_echo_n "checking for $ac_word... " >&6; }
4929if ${ac_cv_path_CAT+:} false; then :
4930  $as_echo_n "(cached) " >&6
4931else
4932  case $CAT in
4933  [\\/]* | ?:[\\/]*)
4934  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4935  ;;
4936  *)
4937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4938for as_dir in $PATH
4939do
4940  IFS=$as_save_IFS
4941  test -z "$as_dir" && as_dir=.
4942    for ac_exec_ext in '' $ac_executable_extensions; do
4943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4944    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4946    break 2
4947  fi
4948done
4949  done
4950IFS=$as_save_IFS
4951
4952  ;;
4953esac
4954fi
4955CAT=$ac_cv_path_CAT
4956if test -n "$CAT"; then
4957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4958$as_echo "$CAT" >&6; }
4959else
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4961$as_echo "no" >&6; }
4962fi
4963
4964
4965        if test "x$CAT" = x; then
4966          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4967        fi
4968      else
4969        # Otherwise we believe it is a complete path. Use it as it is.
4970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4971$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4973$as_echo_n "checking for CAT... " >&6; }
4974        if test ! -x "$tool_specified"; then
4975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4976$as_echo "not found" >&6; }
4977          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4978        fi
4979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4980$as_echo "$tool_specified" >&6; }
4981      fi
4982    fi
4983  fi
4984
4985
4986
4987  if test "x$CAT" = x; then
4988    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4989  fi
4990
4991
4992
4993
4994
4995  # Publish this variable in the help.
4996
4997
4998  if test "x$CHMOD" = x; then
4999    # The variable is not set by user, try to locate tool using the code snippet
5000    for ac_prog in chmod
5001do
5002  # Extract the first word of "$ac_prog", so it can be a program name with args.
5003set dummy $ac_prog; 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_CHMOD+:} false; then :
5007  $as_echo_n "(cached) " >&6
5008else
5009  case $CHMOD in
5010  [\\/]* | ?:[\\/]*)
5011  ac_cv_path_CHMOD="$CHMOD" # 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_CHMOD="$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
5032CHMOD=$ac_cv_path_CHMOD
5033if test -n "$CHMOD"; then
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5035$as_echo "$CHMOD" >&6; }
5036else
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041
5042  test -n "$CHMOD" && break
5043done
5044
5045  else
5046    # The variable is set, but is it from the command line or the environment?
5047
5048    # Try to remove the string !CHMOD! from our list.
5049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5051      # If it failed, the variable was not from the command line. Ignore it,
5052      # but warn the user (except for BASH, which is always set by the calling BASH).
5053      if test "xCHMOD" != xBASH; then
5054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5055$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5056      fi
5057      # Try to locate tool using the code snippet
5058      for ac_prog in chmod
5059do
5060  # Extract the first word of "$ac_prog", so it can be a program name with args.
5061set dummy $ac_prog; ac_word=$2
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5063$as_echo_n "checking for $ac_word... " >&6; }
5064if ${ac_cv_path_CHMOD+:} false; then :
5065  $as_echo_n "(cached) " >&6
5066else
5067  case $CHMOD in
5068  [\\/]* | ?:[\\/]*)
5069  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5070  ;;
5071  *)
5072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075  IFS=$as_save_IFS
5076  test -z "$as_dir" && as_dir=.
5077    for ac_exec_ext in '' $ac_executable_extensions; do
5078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5079    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081    break 2
5082  fi
5083done
5084  done
5085IFS=$as_save_IFS
5086
5087  ;;
5088esac
5089fi
5090CHMOD=$ac_cv_path_CHMOD
5091if test -n "$CHMOD"; then
5092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5093$as_echo "$CHMOD" >&6; }
5094else
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
5097fi
5098
5099
5100  test -n "$CHMOD" && break
5101done
5102
5103    else
5104      # If it succeeded, then it was overridden by the user. We will use it
5105      # for the tool.
5106
5107      # First remove it from the list of overridden variables, so we can test
5108      # for unknown variables in the end.
5109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5110
5111      # Check if the provided tool contains a complete path.
5112      tool_specified="$CHMOD"
5113      tool_basename="${tool_specified##*/}"
5114      if test "x$tool_basename" = "x$tool_specified"; then
5115        # A command without a complete path is provided, search $PATH.
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5117$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5118        # Extract the first word of "$tool_basename", so it can be a program name with args.
5119set dummy $tool_basename; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if ${ac_cv_path_CHMOD+:} false; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $CHMOD in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5137    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148CHMOD=$ac_cv_path_CHMOD
5149if test -n "$CHMOD"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5151$as_echo "$CHMOD" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158        if test "x$CHMOD" = x; then
5159          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5160        fi
5161      else
5162        # Otherwise we believe it is a complete path. Use it as it is.
5163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5164$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5166$as_echo_n "checking for CHMOD... " >&6; }
5167        if test ! -x "$tool_specified"; then
5168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5169$as_echo "not found" >&6; }
5170          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5171        fi
5172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5173$as_echo "$tool_specified" >&6; }
5174      fi
5175    fi
5176  fi
5177
5178
5179
5180  if test "x$CHMOD" = x; then
5181    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5182  fi
5183
5184
5185
5186
5187
5188  # Publish this variable in the help.
5189
5190
5191  if test "x$CMP" = x; then
5192    # The variable is not set by user, try to locate tool using the code snippet
5193    for ac_prog in cmp
5194do
5195  # Extract the first word of "$ac_prog", so it can be a program name with args.
5196set dummy $ac_prog; 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_CMP+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  case $CMP in
5203  [\\/]* | ?:[\\/]*)
5204  ac_cv_path_CMP="$CMP" # 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_CMP="$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
5225CMP=$ac_cv_path_CMP
5226if test -n "$CMP"; then
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5228$as_echo "$CMP" >&6; }
5229else
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
5232fi
5233
5234
5235  test -n "$CMP" && break
5236done
5237
5238  else
5239    # The variable is set, but is it from the command line or the environment?
5240
5241    # Try to remove the string !CMP! from our list.
5242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5244      # If it failed, the variable was not from the command line. Ignore it,
5245      # but warn the user (except for BASH, which is always set by the calling BASH).
5246      if test "xCMP" != xBASH; then
5247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5248$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5249      fi
5250      # Try to locate tool using the code snippet
5251      for ac_prog in cmp
5252do
5253  # Extract the first word of "$ac_prog", so it can be a program name with args.
5254set dummy $ac_prog; ac_word=$2
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5256$as_echo_n "checking for $ac_word... " >&6; }
5257if ${ac_cv_path_CMP+:} false; then :
5258  $as_echo_n "(cached) " >&6
5259else
5260  case $CMP in
5261  [\\/]* | ?:[\\/]*)
5262  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5263  ;;
5264  *)
5265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5266for as_dir in $PATH
5267do
5268  IFS=$as_save_IFS
5269  test -z "$as_dir" && as_dir=.
5270    for ac_exec_ext in '' $ac_executable_extensions; do
5271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5272    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5274    break 2
5275  fi
5276done
5277  done
5278IFS=$as_save_IFS
5279
5280  ;;
5281esac
5282fi
5283CMP=$ac_cv_path_CMP
5284if test -n "$CMP"; then
5285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5286$as_echo "$CMP" >&6; }
5287else
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289$as_echo "no" >&6; }
5290fi
5291
5292
5293  test -n "$CMP" && break
5294done
5295
5296    else
5297      # If it succeeded, then it was overridden by the user. We will use it
5298      # for the tool.
5299
5300      # First remove it from the list of overridden variables, so we can test
5301      # for unknown variables in the end.
5302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5303
5304      # Check if the provided tool contains a complete path.
5305      tool_specified="$CMP"
5306      tool_basename="${tool_specified##*/}"
5307      if test "x$tool_basename" = "x$tool_specified"; then
5308        # A command without a complete path is provided, search $PATH.
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5310$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5311        # Extract the first word of "$tool_basename", so it can be a program name with args.
5312set dummy $tool_basename; ac_word=$2
5313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5314$as_echo_n "checking for $ac_word... " >&6; }
5315if ${ac_cv_path_CMP+:} false; then :
5316  $as_echo_n "(cached) " >&6
5317else
5318  case $CMP in
5319  [\\/]* | ?:[\\/]*)
5320  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5321  ;;
5322  *)
5323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5324for as_dir in $PATH
5325do
5326  IFS=$as_save_IFS
5327  test -z "$as_dir" && as_dir=.
5328    for ac_exec_ext in '' $ac_executable_extensions; do
5329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5330    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5332    break 2
5333  fi
5334done
5335  done
5336IFS=$as_save_IFS
5337
5338  ;;
5339esac
5340fi
5341CMP=$ac_cv_path_CMP
5342if test -n "$CMP"; then
5343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5344$as_echo "$CMP" >&6; }
5345else
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5347$as_echo "no" >&6; }
5348fi
5349
5350
5351        if test "x$CMP" = x; then
5352          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5353        fi
5354      else
5355        # Otherwise we believe it is a complete path. Use it as it is.
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5357$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5359$as_echo_n "checking for CMP... " >&6; }
5360        if test ! -x "$tool_specified"; then
5361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5362$as_echo "not found" >&6; }
5363          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5364        fi
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5366$as_echo "$tool_specified" >&6; }
5367      fi
5368    fi
5369  fi
5370
5371
5372
5373  if test "x$CMP" = x; then
5374    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5375  fi
5376
5377
5378
5379
5380
5381  # Publish this variable in the help.
5382
5383
5384  if test "x$COMM" = x; then
5385    # The variable is not set by user, try to locate tool using the code snippet
5386    for ac_prog in comm
5387do
5388  # Extract the first word of "$ac_prog", so it can be a program name with args.
5389set dummy $ac_prog; 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_COMM+:} false; then :
5393  $as_echo_n "(cached) " >&6
5394else
5395  case $COMM in
5396  [\\/]* | ?:[\\/]*)
5397  ac_cv_path_COMM="$COMM" # 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_COMM="$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
5418COMM=$ac_cv_path_COMM
5419if test -n "$COMM"; then
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5421$as_echo "$COMM" >&6; }
5422else
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5424$as_echo "no" >&6; }
5425fi
5426
5427
5428  test -n "$COMM" && break
5429done
5430
5431  else
5432    # The variable is set, but is it from the command line or the environment?
5433
5434    # Try to remove the string !COMM! from our list.
5435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5437      # If it failed, the variable was not from the command line. Ignore it,
5438      # but warn the user (except for BASH, which is always set by the calling BASH).
5439      if test "xCOMM" != xBASH; then
5440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5441$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5442      fi
5443      # Try to locate tool using the code snippet
5444      for ac_prog in comm
5445do
5446  # Extract the first word of "$ac_prog", so it can be a program name with args.
5447set dummy $ac_prog; ac_word=$2
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449$as_echo_n "checking for $ac_word... " >&6; }
5450if ${ac_cv_path_COMM+:} false; then :
5451  $as_echo_n "(cached) " >&6
5452else
5453  case $COMM in
5454  [\\/]* | ?:[\\/]*)
5455  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5456  ;;
5457  *)
5458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5459for as_dir in $PATH
5460do
5461  IFS=$as_save_IFS
5462  test -z "$as_dir" && as_dir=.
5463    for ac_exec_ext in '' $ac_executable_extensions; do
5464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5465    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5467    break 2
5468  fi
5469done
5470  done
5471IFS=$as_save_IFS
5472
5473  ;;
5474esac
5475fi
5476COMM=$ac_cv_path_COMM
5477if test -n "$COMM"; then
5478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5479$as_echo "$COMM" >&6; }
5480else
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5482$as_echo "no" >&6; }
5483fi
5484
5485
5486  test -n "$COMM" && break
5487done
5488
5489    else
5490      # If it succeeded, then it was overridden by the user. We will use it
5491      # for the tool.
5492
5493      # First remove it from the list of overridden variables, so we can test
5494      # for unknown variables in the end.
5495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5496
5497      # Check if the provided tool contains a complete path.
5498      tool_specified="$COMM"
5499      tool_basename="${tool_specified##*/}"
5500      if test "x$tool_basename" = "x$tool_specified"; then
5501        # A command without a complete path is provided, search $PATH.
5502        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5503$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5504        # Extract the first word of "$tool_basename", so it can be a program name with args.
5505set dummy $tool_basename; ac_word=$2
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
5508if ${ac_cv_path_COMM+:} false; then :
5509  $as_echo_n "(cached) " >&6
5510else
5511  case $COMM in
5512  [\\/]* | ?:[\\/]*)
5513  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5514  ;;
5515  *)
5516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5517for as_dir in $PATH
5518do
5519  IFS=$as_save_IFS
5520  test -z "$as_dir" && as_dir=.
5521    for ac_exec_ext in '' $ac_executable_extensions; do
5522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5523    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5525    break 2
5526  fi
5527done
5528  done
5529IFS=$as_save_IFS
5530
5531  ;;
5532esac
5533fi
5534COMM=$ac_cv_path_COMM
5535if test -n "$COMM"; then
5536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5537$as_echo "$COMM" >&6; }
5538else
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5540$as_echo "no" >&6; }
5541fi
5542
5543
5544        if test "x$COMM" = x; then
5545          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5546        fi
5547      else
5548        # Otherwise we believe it is a complete path. Use it as it is.
5549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5550$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5552$as_echo_n "checking for COMM... " >&6; }
5553        if test ! -x "$tool_specified"; then
5554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5555$as_echo "not found" >&6; }
5556          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5557        fi
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5559$as_echo "$tool_specified" >&6; }
5560      fi
5561    fi
5562  fi
5563
5564
5565
5566  if test "x$COMM" = x; then
5567    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5568  fi
5569
5570
5571
5572
5573
5574  # Publish this variable in the help.
5575
5576
5577  if test "x$CP" = x; then
5578    # The variable is not set by user, try to locate tool using the code snippet
5579    for ac_prog in cp
5580do
5581  # Extract the first word of "$ac_prog", so it can be a program name with args.
5582set dummy $ac_prog; 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_CP+:} false; then :
5586  $as_echo_n "(cached) " >&6
5587else
5588  case $CP in
5589  [\\/]* | ?:[\\/]*)
5590  ac_cv_path_CP="$CP" # 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_CP="$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
5611CP=$ac_cv_path_CP
5612if test -n "$CP"; then
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5614$as_echo "$CP" >&6; }
5615else
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617$as_echo "no" >&6; }
5618fi
5619
5620
5621  test -n "$CP" && break
5622done
5623
5624  else
5625    # The variable is set, but is it from the command line or the environment?
5626
5627    # Try to remove the string !CP! from our list.
5628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5630      # If it failed, the variable was not from the command line. Ignore it,
5631      # but warn the user (except for BASH, which is always set by the calling BASH).
5632      if test "xCP" != xBASH; then
5633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5634$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5635      fi
5636      # Try to locate tool using the code snippet
5637      for ac_prog in cp
5638do
5639  # Extract the first word of "$ac_prog", so it can be a program name with args.
5640set dummy $ac_prog; ac_word=$2
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642$as_echo_n "checking for $ac_word... " >&6; }
5643if ${ac_cv_path_CP+:} false; then :
5644  $as_echo_n "(cached) " >&6
5645else
5646  case $CP in
5647  [\\/]* | ?:[\\/]*)
5648  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5649  ;;
5650  *)
5651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652for as_dir in $PATH
5653do
5654  IFS=$as_save_IFS
5655  test -z "$as_dir" && as_dir=.
5656    for ac_exec_ext in '' $ac_executable_extensions; do
5657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5658    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5660    break 2
5661  fi
5662done
5663  done
5664IFS=$as_save_IFS
5665
5666  ;;
5667esac
5668fi
5669CP=$ac_cv_path_CP
5670if test -n "$CP"; then
5671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5672$as_echo "$CP" >&6; }
5673else
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
5676fi
5677
5678
5679  test -n "$CP" && break
5680done
5681
5682    else
5683      # If it succeeded, then it was overridden by the user. We will use it
5684      # for the tool.
5685
5686      # First remove it from the list of overridden variables, so we can test
5687      # for unknown variables in the end.
5688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5689
5690      # Check if the provided tool contains a complete path.
5691      tool_specified="$CP"
5692      tool_basename="${tool_specified##*/}"
5693      if test "x$tool_basename" = "x$tool_specified"; then
5694        # A command without a complete path is provided, search $PATH.
5695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5696$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5697        # Extract the first word of "$tool_basename", so it can be a program name with args.
5698set dummy $tool_basename; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700$as_echo_n "checking for $ac_word... " >&6; }
5701if ${ac_cv_path_CP+:} false; then :
5702  $as_echo_n "(cached) " >&6
5703else
5704  case $CP in
5705  [\\/]* | ?:[\\/]*)
5706  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5707  ;;
5708  *)
5709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712  IFS=$as_save_IFS
5713  test -z "$as_dir" && as_dir=.
5714    for ac_exec_ext in '' $ac_executable_extensions; do
5715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718    break 2
5719  fi
5720done
5721  done
5722IFS=$as_save_IFS
5723
5724  ;;
5725esac
5726fi
5727CP=$ac_cv_path_CP
5728if test -n "$CP"; then
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5730$as_echo "$CP" >&6; }
5731else
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734fi
5735
5736
5737        if test "x$CP" = x; then
5738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739        fi
5740      else
5741        # Otherwise we believe it is a complete path. Use it as it is.
5742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5743$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5745$as_echo_n "checking for CP... " >&6; }
5746        if test ! -x "$tool_specified"; then
5747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748$as_echo "not found" >&6; }
5749          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5750        fi
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752$as_echo "$tool_specified" >&6; }
5753      fi
5754    fi
5755  fi
5756
5757
5758
5759  if test "x$CP" = x; then
5760    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5761  fi
5762
5763
5764
5765
5766
5767  # Publish this variable in the help.
5768
5769
5770  if test "x$CUT" = x; then
5771    # The variable is not set by user, try to locate tool using the code snippet
5772    for ac_prog in cut
5773do
5774  # Extract the first word of "$ac_prog", so it can be a program name with args.
5775set dummy $ac_prog; 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_CUT+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CUT in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CUT="$CUT" # 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_CUT="$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
5804CUT=$ac_cv_path_CUT
5805if test -n "$CUT"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5807$as_echo "$CUT" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$CUT" && break
5815done
5816
5817  else
5818    # The variable is set, but is it from the command line or the environment?
5819
5820    # Try to remove the string !CUT! from our list.
5821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5823      # If it failed, the variable was not from the command line. Ignore it,
5824      # but warn the user (except for BASH, which is always set by the calling BASH).
5825      if test "xCUT" != xBASH; then
5826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5827$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5828      fi
5829      # Try to locate tool using the code snippet
5830      for ac_prog in cut
5831do
5832  # Extract the first word of "$ac_prog", so it can be a program name with args.
5833set dummy $ac_prog; ac_word=$2
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835$as_echo_n "checking for $ac_word... " >&6; }
5836if ${ac_cv_path_CUT+:} false; then :
5837  $as_echo_n "(cached) " >&6
5838else
5839  case $CUT in
5840  [\\/]* | ?:[\\/]*)
5841  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5842  ;;
5843  *)
5844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847  IFS=$as_save_IFS
5848  test -z "$as_dir" && as_dir=.
5849    for ac_exec_ext in '' $ac_executable_extensions; do
5850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5851    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853    break 2
5854  fi
5855done
5856  done
5857IFS=$as_save_IFS
5858
5859  ;;
5860esac
5861fi
5862CUT=$ac_cv_path_CUT
5863if test -n "$CUT"; then
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5865$as_echo "$CUT" >&6; }
5866else
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868$as_echo "no" >&6; }
5869fi
5870
5871
5872  test -n "$CUT" && break
5873done
5874
5875    else
5876      # If it succeeded, then it was overridden by the user. We will use it
5877      # for the tool.
5878
5879      # First remove it from the list of overridden variables, so we can test
5880      # for unknown variables in the end.
5881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5882
5883      # Check if the provided tool contains a complete path.
5884      tool_specified="$CUT"
5885      tool_basename="${tool_specified##*/}"
5886      if test "x$tool_basename" = "x$tool_specified"; then
5887        # A command without a complete path is provided, search $PATH.
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5889$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5890        # Extract the first word of "$tool_basename", so it can be a program name with args.
5891set dummy $tool_basename; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_path_CUT+:} false; then :
5895  $as_echo_n "(cached) " >&6
5896else
5897  case $CUT in
5898  [\\/]* | ?:[\\/]*)
5899  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5900  ;;
5901  *)
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_exec_ext in '' $ac_executable_extensions; do
5908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5909    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911    break 2
5912  fi
5913done
5914  done
5915IFS=$as_save_IFS
5916
5917  ;;
5918esac
5919fi
5920CUT=$ac_cv_path_CUT
5921if test -n "$CUT"; then
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5923$as_echo "$CUT" >&6; }
5924else
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927fi
5928
5929
5930        if test "x$CUT" = x; then
5931          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5932        fi
5933      else
5934        # Otherwise we believe it is a complete path. Use it as it is.
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5936$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5938$as_echo_n "checking for CUT... " >&6; }
5939        if test ! -x "$tool_specified"; then
5940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5941$as_echo "not found" >&6; }
5942          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5943        fi
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5945$as_echo "$tool_specified" >&6; }
5946      fi
5947    fi
5948  fi
5949
5950
5951
5952  if test "x$CUT" = x; then
5953    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5954  fi
5955
5956
5957
5958
5959
5960  # Publish this variable in the help.
5961
5962
5963  if test "x$DATE" = x; then
5964    # The variable is not set by user, try to locate tool using the code snippet
5965    for ac_prog in date
5966do
5967  # Extract the first word of "$ac_prog", so it can be a program name with args.
5968set dummy $ac_prog; 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_DATE+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  case $DATE in
5975  [\\/]* | ?:[\\/]*)
5976  ac_cv_path_DATE="$DATE" # 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_DATE="$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
5997DATE=$ac_cv_path_DATE
5998if test -n "$DATE"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6000$as_echo "$DATE" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007  test -n "$DATE" && break
6008done
6009
6010  else
6011    # The variable is set, but is it from the command line or the environment?
6012
6013    # Try to remove the string !DATE! from our list.
6014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6016      # If it failed, the variable was not from the command line. Ignore it,
6017      # but warn the user (except for BASH, which is always set by the calling BASH).
6018      if test "xDATE" != xBASH; then
6019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6020$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6021      fi
6022      # Try to locate tool using the code snippet
6023      for ac_prog in date
6024do
6025  # Extract the first word of "$ac_prog", so it can be a program name with args.
6026set dummy $ac_prog; ac_word=$2
6027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6028$as_echo_n "checking for $ac_word... " >&6; }
6029if ${ac_cv_path_DATE+:} false; then :
6030  $as_echo_n "(cached) " >&6
6031else
6032  case $DATE in
6033  [\\/]* | ?:[\\/]*)
6034  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6035  ;;
6036  *)
6037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH
6039do
6040  IFS=$as_save_IFS
6041  test -z "$as_dir" && as_dir=.
6042    for ac_exec_ext in '' $ac_executable_extensions; do
6043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6044    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6046    break 2
6047  fi
6048done
6049  done
6050IFS=$as_save_IFS
6051
6052  ;;
6053esac
6054fi
6055DATE=$ac_cv_path_DATE
6056if test -n "$DATE"; then
6057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6058$as_echo "$DATE" >&6; }
6059else
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
6062fi
6063
6064
6065  test -n "$DATE" && break
6066done
6067
6068    else
6069      # If it succeeded, then it was overridden by the user. We will use it
6070      # for the tool.
6071
6072      # First remove it from the list of overridden variables, so we can test
6073      # for unknown variables in the end.
6074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6075
6076      # Check if the provided tool contains a complete path.
6077      tool_specified="$DATE"
6078      tool_basename="${tool_specified##*/}"
6079      if test "x$tool_basename" = "x$tool_specified"; then
6080        # A command without a complete path is provided, search $PATH.
6081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6082$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6083        # Extract the first word of "$tool_basename", so it can be a program name with args.
6084set dummy $tool_basename; ac_word=$2
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
6087if ${ac_cv_path_DATE+:} false; then :
6088  $as_echo_n "(cached) " >&6
6089else
6090  case $DATE in
6091  [\\/]* | ?:[\\/]*)
6092  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6093  ;;
6094  *)
6095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6096for as_dir in $PATH
6097do
6098  IFS=$as_save_IFS
6099  test -z "$as_dir" && as_dir=.
6100    for ac_exec_ext in '' $ac_executable_extensions; do
6101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6102    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6104    break 2
6105  fi
6106done
6107  done
6108IFS=$as_save_IFS
6109
6110  ;;
6111esac
6112fi
6113DATE=$ac_cv_path_DATE
6114if test -n "$DATE"; then
6115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6116$as_echo "$DATE" >&6; }
6117else
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
6120fi
6121
6122
6123        if test "x$DATE" = x; then
6124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6125        fi
6126      else
6127        # Otherwise we believe it is a complete path. Use it as it is.
6128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6129$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6131$as_echo_n "checking for DATE... " >&6; }
6132        if test ! -x "$tool_specified"; then
6133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6134$as_echo "not found" >&6; }
6135          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6136        fi
6137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6138$as_echo "$tool_specified" >&6; }
6139      fi
6140    fi
6141  fi
6142
6143
6144
6145  if test "x$DATE" = x; then
6146    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6147  fi
6148
6149
6150
6151
6152
6153  # Publish this variable in the help.
6154
6155
6156  if test "x$DIFF" = x; then
6157    # The variable is not set by user, try to locate tool using the code snippet
6158    for ac_prog in gdiff diff
6159do
6160  # Extract the first word of "$ac_prog", so it can be a program name with args.
6161set dummy $ac_prog; 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_DIFF+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $DIFF in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_DIFF="$DIFF" # 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_DIFF="$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
6190DIFF=$ac_cv_path_DIFF
6191if test -n "$DIFF"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6193$as_echo "$DIFF" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200  test -n "$DIFF" && break
6201done
6202
6203  else
6204    # The variable is set, but is it from the command line or the environment?
6205
6206    # Try to remove the string !DIFF! from our list.
6207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6209      # If it failed, the variable was not from the command line. Ignore it,
6210      # but warn the user (except for BASH, which is always set by the calling BASH).
6211      if test "xDIFF" != xBASH; then
6212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6213$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6214      fi
6215      # Try to locate tool using the code snippet
6216      for ac_prog in gdiff diff
6217do
6218  # Extract the first word of "$ac_prog", so it can be a program name with args.
6219set dummy $ac_prog; ac_word=$2
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6221$as_echo_n "checking for $ac_word... " >&6; }
6222if ${ac_cv_path_DIFF+:} false; then :
6223  $as_echo_n "(cached) " >&6
6224else
6225  case $DIFF in
6226  [\\/]* | ?:[\\/]*)
6227  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6228  ;;
6229  *)
6230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6231for as_dir in $PATH
6232do
6233  IFS=$as_save_IFS
6234  test -z "$as_dir" && as_dir=.
6235    for ac_exec_ext in '' $ac_executable_extensions; do
6236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6237    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6239    break 2
6240  fi
6241done
6242  done
6243IFS=$as_save_IFS
6244
6245  ;;
6246esac
6247fi
6248DIFF=$ac_cv_path_DIFF
6249if test -n "$DIFF"; then
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6251$as_echo "$DIFF" >&6; }
6252else
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258  test -n "$DIFF" && break
6259done
6260
6261    else
6262      # If it succeeded, then it was overridden by the user. We will use it
6263      # for the tool.
6264
6265      # First remove it from the list of overridden variables, so we can test
6266      # for unknown variables in the end.
6267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6268
6269      # Check if the provided tool contains a complete path.
6270      tool_specified="$DIFF"
6271      tool_basename="${tool_specified##*/}"
6272      if test "x$tool_basename" = "x$tool_specified"; then
6273        # A command without a complete path is provided, search $PATH.
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6275$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6276        # Extract the first word of "$tool_basename", so it can be a program name with args.
6277set dummy $tool_basename; ac_word=$2
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279$as_echo_n "checking for $ac_word... " >&6; }
6280if ${ac_cv_path_DIFF+:} false; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  case $DIFF in
6284  [\\/]* | ?:[\\/]*)
6285  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6286  ;;
6287  *)
6288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291  IFS=$as_save_IFS
6292  test -z "$as_dir" && as_dir=.
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6295    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297    break 2
6298  fi
6299done
6300  done
6301IFS=$as_save_IFS
6302
6303  ;;
6304esac
6305fi
6306DIFF=$ac_cv_path_DIFF
6307if test -n "$DIFF"; then
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6309$as_echo "$DIFF" >&6; }
6310else
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312$as_echo "no" >&6; }
6313fi
6314
6315
6316        if test "x$DIFF" = x; then
6317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6318        fi
6319      else
6320        # Otherwise we believe it is a complete path. Use it as it is.
6321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6322$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6324$as_echo_n "checking for DIFF... " >&6; }
6325        if test ! -x "$tool_specified"; then
6326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6327$as_echo "not found" >&6; }
6328          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6329        fi
6330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6331$as_echo "$tool_specified" >&6; }
6332      fi
6333    fi
6334  fi
6335
6336
6337
6338  if test "x$DIFF" = x; then
6339    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6340  fi
6341
6342
6343
6344
6345
6346  # Publish this variable in the help.
6347
6348
6349  if test "x$DIRNAME" = x; then
6350    # The variable is not set by user, try to locate tool using the code snippet
6351    for ac_prog in dirname
6352do
6353  # Extract the first word of "$ac_prog", so it can be a program name with args.
6354set dummy $ac_prog; 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_DIRNAME+:} false; then :
6358  $as_echo_n "(cached) " >&6
6359else
6360  case $DIRNAME in
6361  [\\/]* | ?:[\\/]*)
6362  ac_cv_path_DIRNAME="$DIRNAME" # 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_DIRNAME="$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
6383DIRNAME=$ac_cv_path_DIRNAME
6384if test -n "$DIRNAME"; then
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6386$as_echo "$DIRNAME" >&6; }
6387else
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; }
6390fi
6391
6392
6393  test -n "$DIRNAME" && break
6394done
6395
6396  else
6397    # The variable is set, but is it from the command line or the environment?
6398
6399    # Try to remove the string !DIRNAME! from our list.
6400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6402      # If it failed, the variable was not from the command line. Ignore it,
6403      # but warn the user (except for BASH, which is always set by the calling BASH).
6404      if test "xDIRNAME" != xBASH; then
6405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6406$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6407      fi
6408      # Try to locate tool using the code snippet
6409      for ac_prog in dirname
6410do
6411  # Extract the first word of "$ac_prog", so it can be a program name with args.
6412set dummy $ac_prog; ac_word=$2
6413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414$as_echo_n "checking for $ac_word... " >&6; }
6415if ${ac_cv_path_DIRNAME+:} false; then :
6416  $as_echo_n "(cached) " >&6
6417else
6418  case $DIRNAME in
6419  [\\/]* | ?:[\\/]*)
6420  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6421  ;;
6422  *)
6423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424for as_dir in $PATH
6425do
6426  IFS=$as_save_IFS
6427  test -z "$as_dir" && as_dir=.
6428    for ac_exec_ext in '' $ac_executable_extensions; do
6429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6430    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6432    break 2
6433  fi
6434done
6435  done
6436IFS=$as_save_IFS
6437
6438  ;;
6439esac
6440fi
6441DIRNAME=$ac_cv_path_DIRNAME
6442if test -n "$DIRNAME"; then
6443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6444$as_echo "$DIRNAME" >&6; }
6445else
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; }
6448fi
6449
6450
6451  test -n "$DIRNAME" && break
6452done
6453
6454    else
6455      # If it succeeded, then it was overridden by the user. We will use it
6456      # for the tool.
6457
6458      # First remove it from the list of overridden variables, so we can test
6459      # for unknown variables in the end.
6460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6461
6462      # Check if the provided tool contains a complete path.
6463      tool_specified="$DIRNAME"
6464      tool_basename="${tool_specified##*/}"
6465      if test "x$tool_basename" = "x$tool_specified"; then
6466        # A command without a complete path is provided, search $PATH.
6467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6468$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6469        # Extract the first word of "$tool_basename", so it can be a program name with args.
6470set dummy $tool_basename; ac_word=$2
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472$as_echo_n "checking for $ac_word... " >&6; }
6473if ${ac_cv_path_DIRNAME+:} false; then :
6474  $as_echo_n "(cached) " >&6
6475else
6476  case $DIRNAME in
6477  [\\/]* | ?:[\\/]*)
6478  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6479  ;;
6480  *)
6481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6482for as_dir in $PATH
6483do
6484  IFS=$as_save_IFS
6485  test -z "$as_dir" && as_dir=.
6486    for ac_exec_ext in '' $ac_executable_extensions; do
6487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6488    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6490    break 2
6491  fi
6492done
6493  done
6494IFS=$as_save_IFS
6495
6496  ;;
6497esac
6498fi
6499DIRNAME=$ac_cv_path_DIRNAME
6500if test -n "$DIRNAME"; then
6501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6502$as_echo "$DIRNAME" >&6; }
6503else
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505$as_echo "no" >&6; }
6506fi
6507
6508
6509        if test "x$DIRNAME" = x; then
6510          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6511        fi
6512      else
6513        # Otherwise we believe it is a complete path. Use it as it is.
6514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6515$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6517$as_echo_n "checking for DIRNAME... " >&6; }
6518        if test ! -x "$tool_specified"; then
6519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6520$as_echo "not found" >&6; }
6521          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6522        fi
6523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6524$as_echo "$tool_specified" >&6; }
6525      fi
6526    fi
6527  fi
6528
6529
6530
6531  if test "x$DIRNAME" = x; then
6532    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6533  fi
6534
6535
6536
6537
6538
6539  # Publish this variable in the help.
6540
6541
6542  if test "x$ECHO" = x; then
6543    # The variable is not set by user, try to locate tool using the code snippet
6544    for ac_prog in echo
6545do
6546  # Extract the first word of "$ac_prog", so it can be a program name with args.
6547set dummy $ac_prog; 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_ECHO+:} false; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  case $ECHO in
6554  [\\/]* | ?:[\\/]*)
6555  ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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
6576ECHO=$ac_cv_path_ECHO
6577if test -n "$ECHO"; then
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6579$as_echo "$ECHO" >&6; }
6580else
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585
6586  test -n "$ECHO" && break
6587done
6588
6589  else
6590    # The variable is set, but is it from the command line or the environment?
6591
6592    # Try to remove the string !ECHO! from our list.
6593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6595      # If it failed, the variable was not from the command line. Ignore it,
6596      # but warn the user (except for BASH, which is always set by the calling BASH).
6597      if test "xECHO" != xBASH; then
6598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6599$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6600      fi
6601      # Try to locate tool using the code snippet
6602      for ac_prog in echo
6603do
6604  # Extract the first word of "$ac_prog", so it can be a program name with args.
6605set dummy $ac_prog; ac_word=$2
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607$as_echo_n "checking for $ac_word... " >&6; }
6608if ${ac_cv_path_ECHO+:} false; then :
6609  $as_echo_n "(cached) " >&6
6610else
6611  case $ECHO in
6612  [\\/]* | ?:[\\/]*)
6613  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6614  ;;
6615  *)
6616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6617for as_dir in $PATH
6618do
6619  IFS=$as_save_IFS
6620  test -z "$as_dir" && as_dir=.
6621    for ac_exec_ext in '' $ac_executable_extensions; do
6622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6623    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6625    break 2
6626  fi
6627done
6628  done
6629IFS=$as_save_IFS
6630
6631  ;;
6632esac
6633fi
6634ECHO=$ac_cv_path_ECHO
6635if test -n "$ECHO"; then
6636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6637$as_echo "$ECHO" >&6; }
6638else
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6640$as_echo "no" >&6; }
6641fi
6642
6643
6644  test -n "$ECHO" && break
6645done
6646
6647    else
6648      # If it succeeded, then it was overridden by the user. We will use it
6649      # for the tool.
6650
6651      # First remove it from the list of overridden variables, so we can test
6652      # for unknown variables in the end.
6653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6654
6655      # Check if the provided tool contains a complete path.
6656      tool_specified="$ECHO"
6657      tool_basename="${tool_specified##*/}"
6658      if test "x$tool_basename" = "x$tool_specified"; then
6659        # A command without a complete path is provided, search $PATH.
6660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6661$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6662        # Extract the first word of "$tool_basename", so it can be a program name with args.
6663set dummy $tool_basename; ac_word=$2
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6665$as_echo_n "checking for $ac_word... " >&6; }
6666if ${ac_cv_path_ECHO+:} false; then :
6667  $as_echo_n "(cached) " >&6
6668else
6669  case $ECHO in
6670  [\\/]* | ?:[\\/]*)
6671  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6672  ;;
6673  *)
6674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6675for as_dir in $PATH
6676do
6677  IFS=$as_save_IFS
6678  test -z "$as_dir" && as_dir=.
6679    for ac_exec_ext in '' $ac_executable_extensions; do
6680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6681    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6683    break 2
6684  fi
6685done
6686  done
6687IFS=$as_save_IFS
6688
6689  ;;
6690esac
6691fi
6692ECHO=$ac_cv_path_ECHO
6693if test -n "$ECHO"; then
6694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6695$as_echo "$ECHO" >&6; }
6696else
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700
6701
6702        if test "x$ECHO" = x; then
6703          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6704        fi
6705      else
6706        # Otherwise we believe it is a complete path. Use it as it is.
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6708$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6710$as_echo_n "checking for ECHO... " >&6; }
6711        if test ! -x "$tool_specified"; then
6712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6713$as_echo "not found" >&6; }
6714          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6715        fi
6716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6717$as_echo "$tool_specified" >&6; }
6718      fi
6719    fi
6720  fi
6721
6722
6723
6724  if test "x$ECHO" = x; then
6725    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6726  fi
6727
6728
6729
6730
6731
6732  # Publish this variable in the help.
6733
6734
6735  if test "x$EXPR" = x; then
6736    # The variable is not set by user, try to locate tool using the code snippet
6737    for ac_prog in expr
6738do
6739  # Extract the first word of "$ac_prog", so it can be a program name with args.
6740set dummy $ac_prog; 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_EXPR+:} false; then :
6744  $as_echo_n "(cached) " >&6
6745else
6746  case $EXPR in
6747  [\\/]* | ?:[\\/]*)
6748  ac_cv_path_EXPR="$EXPR" # 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_EXPR="$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
6769EXPR=$ac_cv_path_EXPR
6770if test -n "$EXPR"; then
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6772$as_echo "$EXPR" >&6; }
6773else
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6775$as_echo "no" >&6; }
6776fi
6777
6778
6779  test -n "$EXPR" && break
6780done
6781
6782  else
6783    # The variable is set, but is it from the command line or the environment?
6784
6785    # Try to remove the string !EXPR! from our list.
6786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6788      # If it failed, the variable was not from the command line. Ignore it,
6789      # but warn the user (except for BASH, which is always set by the calling BASH).
6790      if test "xEXPR" != xBASH; then
6791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6792$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6793      fi
6794      # Try to locate tool using the code snippet
6795      for ac_prog in expr
6796do
6797  # Extract the first word of "$ac_prog", so it can be a program name with args.
6798set dummy $ac_prog; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_EXPR+:} false; then :
6802  $as_echo_n "(cached) " >&6
6803else
6804  case $EXPR in
6805  [\\/]* | ?:[\\/]*)
6806  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6807  ;;
6808  *)
6809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in $PATH
6811do
6812  IFS=$as_save_IFS
6813  test -z "$as_dir" && as_dir=.
6814    for ac_exec_ext in '' $ac_executable_extensions; do
6815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818    break 2
6819  fi
6820done
6821  done
6822IFS=$as_save_IFS
6823
6824  ;;
6825esac
6826fi
6827EXPR=$ac_cv_path_EXPR
6828if test -n "$EXPR"; then
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6830$as_echo "$EXPR" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
6836
6837  test -n "$EXPR" && break
6838done
6839
6840    else
6841      # If it succeeded, then it was overridden by the user. We will use it
6842      # for the tool.
6843
6844      # First remove it from the list of overridden variables, so we can test
6845      # for unknown variables in the end.
6846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6847
6848      # Check if the provided tool contains a complete path.
6849      tool_specified="$EXPR"
6850      tool_basename="${tool_specified##*/}"
6851      if test "x$tool_basename" = "x$tool_specified"; then
6852        # A command without a complete path is provided, search $PATH.
6853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6854$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6855        # Extract the first word of "$tool_basename", so it can be a program name with args.
6856set dummy $tool_basename; ac_word=$2
6857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858$as_echo_n "checking for $ac_word... " >&6; }
6859if ${ac_cv_path_EXPR+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  case $EXPR in
6863  [\\/]* | ?:[\\/]*)
6864  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6865  ;;
6866  *)
6867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882  ;;
6883esac
6884fi
6885EXPR=$ac_cv_path_EXPR
6886if test -n "$EXPR"; then
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6888$as_echo "$EXPR" >&6; }
6889else
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892fi
6893
6894
6895        if test "x$EXPR" = x; then
6896          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6897        fi
6898      else
6899        # Otherwise we believe it is a complete path. Use it as it is.
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6901$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6903$as_echo_n "checking for EXPR... " >&6; }
6904        if test ! -x "$tool_specified"; then
6905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6906$as_echo "not found" >&6; }
6907          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6908        fi
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6910$as_echo "$tool_specified" >&6; }
6911      fi
6912    fi
6913  fi
6914
6915
6916
6917  if test "x$EXPR" = x; then
6918    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6919  fi
6920
6921
6922
6923
6924
6925  # Publish this variable in the help.
6926
6927
6928  if test "x$FILE" = x; then
6929    # The variable is not set by user, try to locate tool using the code snippet
6930    for ac_prog in file
6931do
6932  # Extract the first word of "$ac_prog", so it can be a program name with args.
6933set dummy $ac_prog; 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_FILE+:} false; then :
6937  $as_echo_n "(cached) " >&6
6938else
6939  case $FILE in
6940  [\\/]* | ?:[\\/]*)
6941  ac_cv_path_FILE="$FILE" # 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_FILE="$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
6962FILE=$ac_cv_path_FILE
6963if test -n "$FILE"; then
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6965$as_echo "$FILE" >&6; }
6966else
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6968$as_echo "no" >&6; }
6969fi
6970
6971
6972  test -n "$FILE" && break
6973done
6974
6975  else
6976    # The variable is set, but is it from the command line or the environment?
6977
6978    # Try to remove the string !FILE! from our list.
6979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6981      # If it failed, the variable was not from the command line. Ignore it,
6982      # but warn the user (except for BASH, which is always set by the calling BASH).
6983      if test "xFILE" != xBASH; then
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6985$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6986      fi
6987      # Try to locate tool using the code snippet
6988      for ac_prog in file
6989do
6990  # Extract the first word of "$ac_prog", so it can be a program name with args.
6991set dummy $ac_prog; ac_word=$2
6992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6993$as_echo_n "checking for $ac_word... " >&6; }
6994if ${ac_cv_path_FILE+:} false; then :
6995  $as_echo_n "(cached) " >&6
6996else
6997  case $FILE in
6998  [\\/]* | ?:[\\/]*)
6999  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7000  ;;
7001  *)
7002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7003for as_dir in $PATH
7004do
7005  IFS=$as_save_IFS
7006  test -z "$as_dir" && as_dir=.
7007    for ac_exec_ext in '' $ac_executable_extensions; do
7008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7009    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7011    break 2
7012  fi
7013done
7014  done
7015IFS=$as_save_IFS
7016
7017  ;;
7018esac
7019fi
7020FILE=$ac_cv_path_FILE
7021if test -n "$FILE"; then
7022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7023$as_echo "$FILE" >&6; }
7024else
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7026$as_echo "no" >&6; }
7027fi
7028
7029
7030  test -n "$FILE" && break
7031done
7032
7033    else
7034      # If it succeeded, then it was overridden by the user. We will use it
7035      # for the tool.
7036
7037      # First remove it from the list of overridden variables, so we can test
7038      # for unknown variables in the end.
7039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7040
7041      # Check if the provided tool contains a complete path.
7042      tool_specified="$FILE"
7043      tool_basename="${tool_specified##*/}"
7044      if test "x$tool_basename" = "x$tool_specified"; then
7045        # A command without a complete path is provided, search $PATH.
7046        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7047$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7048        # Extract the first word of "$tool_basename", so it can be a program name with args.
7049set dummy $tool_basename; ac_word=$2
7050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7051$as_echo_n "checking for $ac_word... " >&6; }
7052if ${ac_cv_path_FILE+:} false; then :
7053  $as_echo_n "(cached) " >&6
7054else
7055  case $FILE in
7056  [\\/]* | ?:[\\/]*)
7057  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7058  ;;
7059  *)
7060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7061for as_dir in $PATH
7062do
7063  IFS=$as_save_IFS
7064  test -z "$as_dir" && as_dir=.
7065    for ac_exec_ext in '' $ac_executable_extensions; do
7066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7067    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7069    break 2
7070  fi
7071done
7072  done
7073IFS=$as_save_IFS
7074
7075  ;;
7076esac
7077fi
7078FILE=$ac_cv_path_FILE
7079if test -n "$FILE"; then
7080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7081$as_echo "$FILE" >&6; }
7082else
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7084$as_echo "no" >&6; }
7085fi
7086
7087
7088        if test "x$FILE" = x; then
7089          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7090        fi
7091      else
7092        # Otherwise we believe it is a complete path. Use it as it is.
7093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7094$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7096$as_echo_n "checking for FILE... " >&6; }
7097        if test ! -x "$tool_specified"; then
7098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7099$as_echo "not found" >&6; }
7100          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7101        fi
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7103$as_echo "$tool_specified" >&6; }
7104      fi
7105    fi
7106  fi
7107
7108
7109
7110  if test "x$FILE" = x; then
7111    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7112  fi
7113
7114
7115
7116
7117
7118  # Publish this variable in the help.
7119
7120
7121  if test "x$FIND" = x; then
7122    # The variable is not set by user, try to locate tool using the code snippet
7123    for ac_prog in find
7124do
7125  # Extract the first word of "$ac_prog", so it can be a program name with args.
7126set dummy $ac_prog; 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_FIND+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $FIND in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_FIND="$FIND" # 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_FIND="$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
7155FIND=$ac_cv_path_FIND
7156if test -n "$FIND"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7158$as_echo "$FIND" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165  test -n "$FIND" && break
7166done
7167
7168  else
7169    # The variable is set, but is it from the command line or the environment?
7170
7171    # Try to remove the string !FIND! from our list.
7172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7174      # If it failed, the variable was not from the command line. Ignore it,
7175      # but warn the user (except for BASH, which is always set by the calling BASH).
7176      if test "xFIND" != xBASH; then
7177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7178$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7179      fi
7180      # Try to locate tool using the code snippet
7181      for ac_prog in find
7182do
7183  # Extract the first word of "$ac_prog", so it can be a program name with args.
7184set dummy $ac_prog; ac_word=$2
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7186$as_echo_n "checking for $ac_word... " >&6; }
7187if ${ac_cv_path_FIND+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  case $FIND in
7191  [\\/]* | ?:[\\/]*)
7192  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7193  ;;
7194  *)
7195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196for as_dir in $PATH
7197do
7198  IFS=$as_save_IFS
7199  test -z "$as_dir" && as_dir=.
7200    for ac_exec_ext in '' $ac_executable_extensions; do
7201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7202    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7204    break 2
7205  fi
7206done
7207  done
7208IFS=$as_save_IFS
7209
7210  ;;
7211esac
7212fi
7213FIND=$ac_cv_path_FIND
7214if test -n "$FIND"; then
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7216$as_echo "$FIND" >&6; }
7217else
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221
7222
7223  test -n "$FIND" && break
7224done
7225
7226    else
7227      # If it succeeded, then it was overridden by the user. We will use it
7228      # for the tool.
7229
7230      # First remove it from the list of overridden variables, so we can test
7231      # for unknown variables in the end.
7232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7233
7234      # Check if the provided tool contains a complete path.
7235      tool_specified="$FIND"
7236      tool_basename="${tool_specified##*/}"
7237      if test "x$tool_basename" = "x$tool_specified"; then
7238        # A command without a complete path is provided, search $PATH.
7239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7240$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7241        # Extract the first word of "$tool_basename", so it can be a program name with args.
7242set dummy $tool_basename; ac_word=$2
7243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7244$as_echo_n "checking for $ac_word... " >&6; }
7245if ${ac_cv_path_FIND+:} false; then :
7246  $as_echo_n "(cached) " >&6
7247else
7248  case $FIND in
7249  [\\/]* | ?:[\\/]*)
7250  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7251  ;;
7252  *)
7253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7254for as_dir in $PATH
7255do
7256  IFS=$as_save_IFS
7257  test -z "$as_dir" && as_dir=.
7258    for ac_exec_ext in '' $ac_executable_extensions; do
7259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7260    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7262    break 2
7263  fi
7264done
7265  done
7266IFS=$as_save_IFS
7267
7268  ;;
7269esac
7270fi
7271FIND=$ac_cv_path_FIND
7272if test -n "$FIND"; then
7273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7274$as_echo "$FIND" >&6; }
7275else
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7277$as_echo "no" >&6; }
7278fi
7279
7280
7281        if test "x$FIND" = x; then
7282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7283        fi
7284      else
7285        # Otherwise we believe it is a complete path. Use it as it is.
7286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7287$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7289$as_echo_n "checking for FIND... " >&6; }
7290        if test ! -x "$tool_specified"; then
7291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7292$as_echo "not found" >&6; }
7293          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7294        fi
7295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7296$as_echo "$tool_specified" >&6; }
7297      fi
7298    fi
7299  fi
7300
7301
7302
7303  if test "x$FIND" = x; then
7304    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7305  fi
7306
7307
7308
7309
7310
7311  # Publish this variable in the help.
7312
7313
7314  if test "x$HEAD" = x; then
7315    # The variable is not set by user, try to locate tool using the code snippet
7316    for ac_prog in head
7317do
7318  # Extract the first word of "$ac_prog", so it can be a program name with args.
7319set dummy $ac_prog; 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_HEAD+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $HEAD in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_HEAD="$HEAD" # 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_HEAD="$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
7348HEAD=$ac_cv_path_HEAD
7349if test -n "$HEAD"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7351$as_echo "$HEAD" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358  test -n "$HEAD" && break
7359done
7360
7361  else
7362    # The variable is set, but is it from the command line or the environment?
7363
7364    # Try to remove the string !HEAD! from our list.
7365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7367      # If it failed, the variable was not from the command line. Ignore it,
7368      # but warn the user (except for BASH, which is always set by the calling BASH).
7369      if test "xHEAD" != xBASH; then
7370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7371$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7372      fi
7373      # Try to locate tool using the code snippet
7374      for ac_prog in head
7375do
7376  # Extract the first word of "$ac_prog", so it can be a program name with args.
7377set dummy $ac_prog; ac_word=$2
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7379$as_echo_n "checking for $ac_word... " >&6; }
7380if ${ac_cv_path_HEAD+:} false; then :
7381  $as_echo_n "(cached) " >&6
7382else
7383  case $HEAD in
7384  [\\/]* | ?:[\\/]*)
7385  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7386  ;;
7387  *)
7388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7389for as_dir in $PATH
7390do
7391  IFS=$as_save_IFS
7392  test -z "$as_dir" && as_dir=.
7393    for ac_exec_ext in '' $ac_executable_extensions; do
7394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7395    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7397    break 2
7398  fi
7399done
7400  done
7401IFS=$as_save_IFS
7402
7403  ;;
7404esac
7405fi
7406HEAD=$ac_cv_path_HEAD
7407if test -n "$HEAD"; then
7408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7409$as_echo "$HEAD" >&6; }
7410else
7411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7412$as_echo "no" >&6; }
7413fi
7414
7415
7416  test -n "$HEAD" && break
7417done
7418
7419    else
7420      # If it succeeded, then it was overridden by the user. We will use it
7421      # for the tool.
7422
7423      # First remove it from the list of overridden variables, so we can test
7424      # for unknown variables in the end.
7425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7426
7427      # Check if the provided tool contains a complete path.
7428      tool_specified="$HEAD"
7429      tool_basename="${tool_specified##*/}"
7430      if test "x$tool_basename" = "x$tool_specified"; then
7431        # A command without a complete path is provided, search $PATH.
7432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7433$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7434        # Extract the first word of "$tool_basename", so it can be a program name with args.
7435set dummy $tool_basename; ac_word=$2
7436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7437$as_echo_n "checking for $ac_word... " >&6; }
7438if ${ac_cv_path_HEAD+:} false; then :
7439  $as_echo_n "(cached) " >&6
7440else
7441  case $HEAD in
7442  [\\/]* | ?:[\\/]*)
7443  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7444  ;;
7445  *)
7446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447for as_dir in $PATH
7448do
7449  IFS=$as_save_IFS
7450  test -z "$as_dir" && as_dir=.
7451    for ac_exec_ext in '' $ac_executable_extensions; do
7452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7453    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7455    break 2
7456  fi
7457done
7458  done
7459IFS=$as_save_IFS
7460
7461  ;;
7462esac
7463fi
7464HEAD=$ac_cv_path_HEAD
7465if test -n "$HEAD"; then
7466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7467$as_echo "$HEAD" >&6; }
7468else
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7470$as_echo "no" >&6; }
7471fi
7472
7473
7474        if test "x$HEAD" = x; then
7475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7476        fi
7477      else
7478        # Otherwise we believe it is a complete path. Use it as it is.
7479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7480$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7482$as_echo_n "checking for HEAD... " >&6; }
7483        if test ! -x "$tool_specified"; then
7484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7485$as_echo "not found" >&6; }
7486          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7487        fi
7488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7489$as_echo "$tool_specified" >&6; }
7490      fi
7491    fi
7492  fi
7493
7494
7495
7496  if test "x$HEAD" = x; then
7497    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7498  fi
7499
7500
7501
7502
7503
7504  # Publish this variable in the help.
7505
7506
7507  if test "x$LN" = x; then
7508    # The variable is not set by user, try to locate tool using the code snippet
7509    for ac_prog in ln
7510do
7511  # Extract the first word of "$ac_prog", so it can be a program name with args.
7512set dummy $ac_prog; 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_LN+:} false; then :
7516  $as_echo_n "(cached) " >&6
7517else
7518  case $LN in
7519  [\\/]* | ?:[\\/]*)
7520  ac_cv_path_LN="$LN" # 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_LN="$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
7541LN=$ac_cv_path_LN
7542if test -n "$LN"; then
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7544$as_echo "$LN" >&6; }
7545else
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
7548fi
7549
7550
7551  test -n "$LN" && break
7552done
7553
7554  else
7555    # The variable is set, but is it from the command line or the environment?
7556
7557    # Try to remove the string !LN! from our list.
7558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7560      # If it failed, the variable was not from the command line. Ignore it,
7561      # but warn the user (except for BASH, which is always set by the calling BASH).
7562      if test "xLN" != xBASH; then
7563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7564$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7565      fi
7566      # Try to locate tool using the code snippet
7567      for ac_prog in ln
7568do
7569  # Extract the first word of "$ac_prog", so it can be a program name with args.
7570set dummy $ac_prog; ac_word=$2
7571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7572$as_echo_n "checking for $ac_word... " >&6; }
7573if ${ac_cv_path_LN+:} false; then :
7574  $as_echo_n "(cached) " >&6
7575else
7576  case $LN in
7577  [\\/]* | ?:[\\/]*)
7578  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7579  ;;
7580  *)
7581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7582for as_dir in $PATH
7583do
7584  IFS=$as_save_IFS
7585  test -z "$as_dir" && as_dir=.
7586    for ac_exec_ext in '' $ac_executable_extensions; do
7587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7588    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7590    break 2
7591  fi
7592done
7593  done
7594IFS=$as_save_IFS
7595
7596  ;;
7597esac
7598fi
7599LN=$ac_cv_path_LN
7600if test -n "$LN"; then
7601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7602$as_echo "$LN" >&6; }
7603else
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7605$as_echo "no" >&6; }
7606fi
7607
7608
7609  test -n "$LN" && break
7610done
7611
7612    else
7613      # If it succeeded, then it was overridden by the user. We will use it
7614      # for the tool.
7615
7616      # First remove it from the list of overridden variables, so we can test
7617      # for unknown variables in the end.
7618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7619
7620      # Check if the provided tool contains a complete path.
7621      tool_specified="$LN"
7622      tool_basename="${tool_specified##*/}"
7623      if test "x$tool_basename" = "x$tool_specified"; then
7624        # A command without a complete path is provided, search $PATH.
7625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7626$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7627        # Extract the first word of "$tool_basename", so it can be a program name with args.
7628set dummy $tool_basename; ac_word=$2
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630$as_echo_n "checking for $ac_word... " >&6; }
7631if ${ac_cv_path_LN+:} false; then :
7632  $as_echo_n "(cached) " >&6
7633else
7634  case $LN in
7635  [\\/]* | ?:[\\/]*)
7636  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7637  ;;
7638  *)
7639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640for as_dir in $PATH
7641do
7642  IFS=$as_save_IFS
7643  test -z "$as_dir" && as_dir=.
7644    for ac_exec_ext in '' $ac_executable_extensions; do
7645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648    break 2
7649  fi
7650done
7651  done
7652IFS=$as_save_IFS
7653
7654  ;;
7655esac
7656fi
7657LN=$ac_cv_path_LN
7658if test -n "$LN"; then
7659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7660$as_echo "$LN" >&6; }
7661else
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7663$as_echo "no" >&6; }
7664fi
7665
7666
7667        if test "x$LN" = x; then
7668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7669        fi
7670      else
7671        # Otherwise we believe it is a complete path. Use it as it is.
7672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7673$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7675$as_echo_n "checking for LN... " >&6; }
7676        if test ! -x "$tool_specified"; then
7677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7678$as_echo "not found" >&6; }
7679          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7680        fi
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7682$as_echo "$tool_specified" >&6; }
7683      fi
7684    fi
7685  fi
7686
7687
7688
7689  if test "x$LN" = x; then
7690    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7691  fi
7692
7693
7694
7695
7696
7697  # Publish this variable in the help.
7698
7699
7700  if test "x$LS" = x; then
7701    # The variable is not set by user, try to locate tool using the code snippet
7702    for ac_prog in ls
7703do
7704  # Extract the first word of "$ac_prog", so it can be a program name with args.
7705set dummy $ac_prog; 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_LS+:} false; then :
7709  $as_echo_n "(cached) " >&6
7710else
7711  case $LS in
7712  [\\/]* | ?:[\\/]*)
7713  ac_cv_path_LS="$LS" # 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_LS="$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
7734LS=$ac_cv_path_LS
7735if test -n "$LS"; then
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7737$as_echo "$LS" >&6; }
7738else
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
7741fi
7742
7743
7744  test -n "$LS" && break
7745done
7746
7747  else
7748    # The variable is set, but is it from the command line or the environment?
7749
7750    # Try to remove the string !LS! from our list.
7751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7753      # If it failed, the variable was not from the command line. Ignore it,
7754      # but warn the user (except for BASH, which is always set by the calling BASH).
7755      if test "xLS" != xBASH; then
7756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7757$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7758      fi
7759      # Try to locate tool using the code snippet
7760      for ac_prog in ls
7761do
7762  # Extract the first word of "$ac_prog", so it can be a program name with args.
7763set dummy $ac_prog; ac_word=$2
7764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7765$as_echo_n "checking for $ac_word... " >&6; }
7766if ${ac_cv_path_LS+:} false; then :
7767  $as_echo_n "(cached) " >&6
7768else
7769  case $LS in
7770  [\\/]* | ?:[\\/]*)
7771  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7772  ;;
7773  *)
7774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775for as_dir in $PATH
7776do
7777  IFS=$as_save_IFS
7778  test -z "$as_dir" && as_dir=.
7779    for ac_exec_ext in '' $ac_executable_extensions; do
7780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783    break 2
7784  fi
7785done
7786  done
7787IFS=$as_save_IFS
7788
7789  ;;
7790esac
7791fi
7792LS=$ac_cv_path_LS
7793if test -n "$LS"; then
7794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7795$as_echo "$LS" >&6; }
7796else
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7798$as_echo "no" >&6; }
7799fi
7800
7801
7802  test -n "$LS" && break
7803done
7804
7805    else
7806      # If it succeeded, then it was overridden by the user. We will use it
7807      # for the tool.
7808
7809      # First remove it from the list of overridden variables, so we can test
7810      # for unknown variables in the end.
7811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7812
7813      # Check if the provided tool contains a complete path.
7814      tool_specified="$LS"
7815      tool_basename="${tool_specified##*/}"
7816      if test "x$tool_basename" = "x$tool_specified"; then
7817        # A command without a complete path is provided, search $PATH.
7818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7819$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7820        # Extract the first word of "$tool_basename", so it can be a program name with args.
7821set dummy $tool_basename; ac_word=$2
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823$as_echo_n "checking for $ac_word... " >&6; }
7824if ${ac_cv_path_LS+:} false; then :
7825  $as_echo_n "(cached) " >&6
7826else
7827  case $LS in
7828  [\\/]* | ?:[\\/]*)
7829  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7830  ;;
7831  *)
7832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833for as_dir in $PATH
7834do
7835  IFS=$as_save_IFS
7836  test -z "$as_dir" && as_dir=.
7837    for ac_exec_ext in '' $ac_executable_extensions; do
7838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7839    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7841    break 2
7842  fi
7843done
7844  done
7845IFS=$as_save_IFS
7846
7847  ;;
7848esac
7849fi
7850LS=$ac_cv_path_LS
7851if test -n "$LS"; then
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7853$as_echo "$LS" >&6; }
7854else
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856$as_echo "no" >&6; }
7857fi
7858
7859
7860        if test "x$LS" = x; then
7861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7862        fi
7863      else
7864        # Otherwise we believe it is a complete path. Use it as it is.
7865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7866$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7868$as_echo_n "checking for LS... " >&6; }
7869        if test ! -x "$tool_specified"; then
7870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7871$as_echo "not found" >&6; }
7872          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7873        fi
7874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7875$as_echo "$tool_specified" >&6; }
7876      fi
7877    fi
7878  fi
7879
7880
7881
7882  if test "x$LS" = x; then
7883    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7884  fi
7885
7886
7887
7888
7889
7890  # Publish this variable in the help.
7891
7892
7893  if test "x$MKDIR" = x; then
7894    # The variable is not set by user, try to locate tool using the code snippet
7895    for ac_prog in mkdir
7896do
7897  # Extract the first word of "$ac_prog", so it can be a program name with args.
7898set dummy $ac_prog; 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_MKDIR+:} false; then :
7902  $as_echo_n "(cached) " >&6
7903else
7904  case $MKDIR in
7905  [\\/]* | ?:[\\/]*)
7906  ac_cv_path_MKDIR="$MKDIR" # 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_MKDIR="$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
7927MKDIR=$ac_cv_path_MKDIR
7928if test -n "$MKDIR"; then
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7930$as_echo "$MKDIR" >&6; }
7931else
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933$as_echo "no" >&6; }
7934fi
7935
7936
7937  test -n "$MKDIR" && break
7938done
7939
7940  else
7941    # The variable is set, but is it from the command line or the environment?
7942
7943    # Try to remove the string !MKDIR! from our list.
7944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7946      # If it failed, the variable was not from the command line. Ignore it,
7947      # but warn the user (except for BASH, which is always set by the calling BASH).
7948      if test "xMKDIR" != xBASH; then
7949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7950$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7951      fi
7952      # Try to locate tool using the code snippet
7953      for ac_prog in mkdir
7954do
7955  # Extract the first word of "$ac_prog", so it can be a program name with args.
7956set dummy $ac_prog; ac_word=$2
7957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7958$as_echo_n "checking for $ac_word... " >&6; }
7959if ${ac_cv_path_MKDIR+:} false; then :
7960  $as_echo_n "(cached) " >&6
7961else
7962  case $MKDIR in
7963  [\\/]* | ?:[\\/]*)
7964  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7965  ;;
7966  *)
7967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7968for as_dir in $PATH
7969do
7970  IFS=$as_save_IFS
7971  test -z "$as_dir" && as_dir=.
7972    for ac_exec_ext in '' $ac_executable_extensions; do
7973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7974    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7976    break 2
7977  fi
7978done
7979  done
7980IFS=$as_save_IFS
7981
7982  ;;
7983esac
7984fi
7985MKDIR=$ac_cv_path_MKDIR
7986if test -n "$MKDIR"; then
7987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7988$as_echo "$MKDIR" >&6; }
7989else
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7991$as_echo "no" >&6; }
7992fi
7993
7994
7995  test -n "$MKDIR" && break
7996done
7997
7998    else
7999      # If it succeeded, then it was overridden by the user. We will use it
8000      # for the tool.
8001
8002      # First remove it from the list of overridden variables, so we can test
8003      # for unknown variables in the end.
8004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8005
8006      # Check if the provided tool contains a complete path.
8007      tool_specified="$MKDIR"
8008      tool_basename="${tool_specified##*/}"
8009      if test "x$tool_basename" = "x$tool_specified"; then
8010        # A command without a complete path is provided, search $PATH.
8011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8012$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8013        # Extract the first word of "$tool_basename", so it can be a program name with args.
8014set dummy $tool_basename; ac_word=$2
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8016$as_echo_n "checking for $ac_word... " >&6; }
8017if ${ac_cv_path_MKDIR+:} false; then :
8018  $as_echo_n "(cached) " >&6
8019else
8020  case $MKDIR in
8021  [\\/]* | ?:[\\/]*)
8022  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8023  ;;
8024  *)
8025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8026for as_dir in $PATH
8027do
8028  IFS=$as_save_IFS
8029  test -z "$as_dir" && as_dir=.
8030    for ac_exec_ext in '' $ac_executable_extensions; do
8031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8032    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8034    break 2
8035  fi
8036done
8037  done
8038IFS=$as_save_IFS
8039
8040  ;;
8041esac
8042fi
8043MKDIR=$ac_cv_path_MKDIR
8044if test -n "$MKDIR"; then
8045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8046$as_echo "$MKDIR" >&6; }
8047else
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049$as_echo "no" >&6; }
8050fi
8051
8052
8053        if test "x$MKDIR" = x; then
8054          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8055        fi
8056      else
8057        # Otherwise we believe it is a complete path. Use it as it is.
8058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8059$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8061$as_echo_n "checking for MKDIR... " >&6; }
8062        if test ! -x "$tool_specified"; then
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8064$as_echo "not found" >&6; }
8065          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8066        fi
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8068$as_echo "$tool_specified" >&6; }
8069      fi
8070    fi
8071  fi
8072
8073
8074
8075  if test "x$MKDIR" = x; then
8076    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8077  fi
8078
8079
8080
8081
8082
8083  # Publish this variable in the help.
8084
8085
8086  if test "x$MKTEMP" = x; then
8087    # The variable is not set by user, try to locate tool using the code snippet
8088    for ac_prog in mktemp
8089do
8090  # Extract the first word of "$ac_prog", so it can be a program name with args.
8091set dummy $ac_prog; 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_MKTEMP+:} false; then :
8095  $as_echo_n "(cached) " >&6
8096else
8097  case $MKTEMP in
8098  [\\/]* | ?:[\\/]*)
8099  ac_cv_path_MKTEMP="$MKTEMP" # 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_MKTEMP="$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
8120MKTEMP=$ac_cv_path_MKTEMP
8121if test -n "$MKTEMP"; then
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8123$as_echo "$MKTEMP" >&6; }
8124else
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126$as_echo "no" >&6; }
8127fi
8128
8129
8130  test -n "$MKTEMP" && break
8131done
8132
8133  else
8134    # The variable is set, but is it from the command line or the environment?
8135
8136    # Try to remove the string !MKTEMP! from our list.
8137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8139      # If it failed, the variable was not from the command line. Ignore it,
8140      # but warn the user (except for BASH, which is always set by the calling BASH).
8141      if test "xMKTEMP" != xBASH; then
8142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8143$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8144      fi
8145      # Try to locate tool using the code snippet
8146      for ac_prog in mktemp
8147do
8148  # Extract the first word of "$ac_prog", so it can be a program name with args.
8149set dummy $ac_prog; ac_word=$2
8150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8151$as_echo_n "checking for $ac_word... " >&6; }
8152if ${ac_cv_path_MKTEMP+:} false; then :
8153  $as_echo_n "(cached) " >&6
8154else
8155  case $MKTEMP in
8156  [\\/]* | ?:[\\/]*)
8157  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8158  ;;
8159  *)
8160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8161for as_dir in $PATH
8162do
8163  IFS=$as_save_IFS
8164  test -z "$as_dir" && as_dir=.
8165    for ac_exec_ext in '' $ac_executable_extensions; do
8166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8167    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8169    break 2
8170  fi
8171done
8172  done
8173IFS=$as_save_IFS
8174
8175  ;;
8176esac
8177fi
8178MKTEMP=$ac_cv_path_MKTEMP
8179if test -n "$MKTEMP"; then
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8181$as_echo "$MKTEMP" >&6; }
8182else
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8184$as_echo "no" >&6; }
8185fi
8186
8187
8188  test -n "$MKTEMP" && break
8189done
8190
8191    else
8192      # If it succeeded, then it was overridden by the user. We will use it
8193      # for the tool.
8194
8195      # First remove it from the list of overridden variables, so we can test
8196      # for unknown variables in the end.
8197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8198
8199      # Check if the provided tool contains a complete path.
8200      tool_specified="$MKTEMP"
8201      tool_basename="${tool_specified##*/}"
8202      if test "x$tool_basename" = "x$tool_specified"; then
8203        # A command without a complete path is provided, search $PATH.
8204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8205$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8206        # Extract the first word of "$tool_basename", so it can be a program name with args.
8207set dummy $tool_basename; ac_word=$2
8208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8209$as_echo_n "checking for $ac_word... " >&6; }
8210if ${ac_cv_path_MKTEMP+:} false; then :
8211  $as_echo_n "(cached) " >&6
8212else
8213  case $MKTEMP in
8214  [\\/]* | ?:[\\/]*)
8215  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8216  ;;
8217  *)
8218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8219for as_dir in $PATH
8220do
8221  IFS=$as_save_IFS
8222  test -z "$as_dir" && as_dir=.
8223    for ac_exec_ext in '' $ac_executable_extensions; do
8224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8225    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8227    break 2
8228  fi
8229done
8230  done
8231IFS=$as_save_IFS
8232
8233  ;;
8234esac
8235fi
8236MKTEMP=$ac_cv_path_MKTEMP
8237if test -n "$MKTEMP"; then
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8239$as_echo "$MKTEMP" >&6; }
8240else
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8242$as_echo "no" >&6; }
8243fi
8244
8245
8246        if test "x$MKTEMP" = x; then
8247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8248        fi
8249      else
8250        # Otherwise we believe it is a complete path. Use it as it is.
8251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8252$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8254$as_echo_n "checking for MKTEMP... " >&6; }
8255        if test ! -x "$tool_specified"; then
8256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8257$as_echo "not found" >&6; }
8258          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8259        fi
8260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8261$as_echo "$tool_specified" >&6; }
8262      fi
8263    fi
8264  fi
8265
8266
8267
8268  if test "x$MKTEMP" = x; then
8269    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8270  fi
8271
8272
8273
8274
8275
8276  # Publish this variable in the help.
8277
8278
8279  if test "x$MV" = x; then
8280    # The variable is not set by user, try to locate tool using the code snippet
8281    for ac_prog in mv
8282do
8283  # Extract the first word of "$ac_prog", so it can be a program name with args.
8284set dummy $ac_prog; 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_MV+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $MV in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_MV="$MV" # 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_MV="$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
8313MV=$ac_cv_path_MV
8314if test -n "$MV"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8316$as_echo "$MV" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323  test -n "$MV" && break
8324done
8325
8326  else
8327    # The variable is set, but is it from the command line or the environment?
8328
8329    # Try to remove the string !MV! from our list.
8330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8332      # If it failed, the variable was not from the command line. Ignore it,
8333      # but warn the user (except for BASH, which is always set by the calling BASH).
8334      if test "xMV" != xBASH; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8336$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8337      fi
8338      # Try to locate tool using the code snippet
8339      for ac_prog in mv
8340do
8341  # Extract the first word of "$ac_prog", so it can be a program name with args.
8342set dummy $ac_prog; ac_word=$2
8343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8344$as_echo_n "checking for $ac_word... " >&6; }
8345if ${ac_cv_path_MV+:} false; then :
8346  $as_echo_n "(cached) " >&6
8347else
8348  case $MV in
8349  [\\/]* | ?:[\\/]*)
8350  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8351  ;;
8352  *)
8353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8354for as_dir in $PATH
8355do
8356  IFS=$as_save_IFS
8357  test -z "$as_dir" && as_dir=.
8358    for ac_exec_ext in '' $ac_executable_extensions; do
8359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8360    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8362    break 2
8363  fi
8364done
8365  done
8366IFS=$as_save_IFS
8367
8368  ;;
8369esac
8370fi
8371MV=$ac_cv_path_MV
8372if test -n "$MV"; then
8373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8374$as_echo "$MV" >&6; }
8375else
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8377$as_echo "no" >&6; }
8378fi
8379
8380
8381  test -n "$MV" && break
8382done
8383
8384    else
8385      # If it succeeded, then it was overridden by the user. We will use it
8386      # for the tool.
8387
8388      # First remove it from the list of overridden variables, so we can test
8389      # for unknown variables in the end.
8390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8391
8392      # Check if the provided tool contains a complete path.
8393      tool_specified="$MV"
8394      tool_basename="${tool_specified##*/}"
8395      if test "x$tool_basename" = "x$tool_specified"; then
8396        # A command without a complete path is provided, search $PATH.
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8398$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8399        # Extract the first word of "$tool_basename", so it can be a program name with args.
8400set dummy $tool_basename; ac_word=$2
8401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8402$as_echo_n "checking for $ac_word... " >&6; }
8403if ${ac_cv_path_MV+:} false; then :
8404  $as_echo_n "(cached) " >&6
8405else
8406  case $MV in
8407  [\\/]* | ?:[\\/]*)
8408  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8409  ;;
8410  *)
8411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8412for as_dir in $PATH
8413do
8414  IFS=$as_save_IFS
8415  test -z "$as_dir" && as_dir=.
8416    for ac_exec_ext in '' $ac_executable_extensions; do
8417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8418    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8420    break 2
8421  fi
8422done
8423  done
8424IFS=$as_save_IFS
8425
8426  ;;
8427esac
8428fi
8429MV=$ac_cv_path_MV
8430if test -n "$MV"; then
8431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8432$as_echo "$MV" >&6; }
8433else
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8435$as_echo "no" >&6; }
8436fi
8437
8438
8439        if test "x$MV" = x; then
8440          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8441        fi
8442      else
8443        # Otherwise we believe it is a complete path. Use it as it is.
8444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8445$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8447$as_echo_n "checking for MV... " >&6; }
8448        if test ! -x "$tool_specified"; then
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8450$as_echo "not found" >&6; }
8451          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8452        fi
8453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8454$as_echo "$tool_specified" >&6; }
8455      fi
8456    fi
8457  fi
8458
8459
8460
8461  if test "x$MV" = x; then
8462    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8463  fi
8464
8465
8466
8467
8468
8469  # Publish this variable in the help.
8470
8471
8472  if test "x$NAWK" = x; then
8473    # The variable is not set by user, try to locate tool using the code snippet
8474    for ac_prog in nawk gawk awk
8475do
8476  # Extract the first word of "$ac_prog", so it can be a program name with args.
8477set dummy $ac_prog; 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_NAWK+:} false; then :
8481  $as_echo_n "(cached) " >&6
8482else
8483  case $NAWK in
8484  [\\/]* | ?:[\\/]*)
8485  ac_cv_path_NAWK="$NAWK" # 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_NAWK="$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
8506NAWK=$ac_cv_path_NAWK
8507if test -n "$NAWK"; then
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8509$as_echo "$NAWK" >&6; }
8510else
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
8513fi
8514
8515
8516  test -n "$NAWK" && break
8517done
8518
8519  else
8520    # The variable is set, but is it from the command line or the environment?
8521
8522    # Try to remove the string !NAWK! from our list.
8523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8525      # If it failed, the variable was not from the command line. Ignore it,
8526      # but warn the user (except for BASH, which is always set by the calling BASH).
8527      if test "xNAWK" != xBASH; then
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8529$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8530      fi
8531      # Try to locate tool using the code snippet
8532      for ac_prog in nawk gawk awk
8533do
8534  # Extract the first word of "$ac_prog", so it can be a program name with args.
8535set dummy $ac_prog; ac_word=$2
8536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8537$as_echo_n "checking for $ac_word... " >&6; }
8538if ${ac_cv_path_NAWK+:} false; then :
8539  $as_echo_n "(cached) " >&6
8540else
8541  case $NAWK in
8542  [\\/]* | ?:[\\/]*)
8543  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8544  ;;
8545  *)
8546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8547for as_dir in $PATH
8548do
8549  IFS=$as_save_IFS
8550  test -z "$as_dir" && as_dir=.
8551    for ac_exec_ext in '' $ac_executable_extensions; do
8552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8553    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8555    break 2
8556  fi
8557done
8558  done
8559IFS=$as_save_IFS
8560
8561  ;;
8562esac
8563fi
8564NAWK=$ac_cv_path_NAWK
8565if test -n "$NAWK"; then
8566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8567$as_echo "$NAWK" >&6; }
8568else
8569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8570$as_echo "no" >&6; }
8571fi
8572
8573
8574  test -n "$NAWK" && break
8575done
8576
8577    else
8578      # If it succeeded, then it was overridden by the user. We will use it
8579      # for the tool.
8580
8581      # First remove it from the list of overridden variables, so we can test
8582      # for unknown variables in the end.
8583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8584
8585      # Check if the provided tool contains a complete path.
8586      tool_specified="$NAWK"
8587      tool_basename="${tool_specified##*/}"
8588      if test "x$tool_basename" = "x$tool_specified"; then
8589        # A command without a complete path is provided, search $PATH.
8590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8591$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8592        # Extract the first word of "$tool_basename", so it can be a program name with args.
8593set dummy $tool_basename; ac_word=$2
8594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8595$as_echo_n "checking for $ac_word... " >&6; }
8596if ${ac_cv_path_NAWK+:} false; then :
8597  $as_echo_n "(cached) " >&6
8598else
8599  case $NAWK in
8600  [\\/]* | ?:[\\/]*)
8601  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8602  ;;
8603  *)
8604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8605for as_dir in $PATH
8606do
8607  IFS=$as_save_IFS
8608  test -z "$as_dir" && as_dir=.
8609    for ac_exec_ext in '' $ac_executable_extensions; do
8610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8611    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8613    break 2
8614  fi
8615done
8616  done
8617IFS=$as_save_IFS
8618
8619  ;;
8620esac
8621fi
8622NAWK=$ac_cv_path_NAWK
8623if test -n "$NAWK"; then
8624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8625$as_echo "$NAWK" >&6; }
8626else
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8628$as_echo "no" >&6; }
8629fi
8630
8631
8632        if test "x$NAWK" = x; then
8633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8634        fi
8635      else
8636        # Otherwise we believe it is a complete path. Use it as it is.
8637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8638$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8640$as_echo_n "checking for NAWK... " >&6; }
8641        if test ! -x "$tool_specified"; then
8642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8643$as_echo "not found" >&6; }
8644          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8645        fi
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8647$as_echo "$tool_specified" >&6; }
8648      fi
8649    fi
8650  fi
8651
8652
8653
8654  if test "x$NAWK" = x; then
8655    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8656  fi
8657
8658
8659
8660
8661
8662  # Publish this variable in the help.
8663
8664
8665  if test "x$PRINTF" = x; then
8666    # The variable is not set by user, try to locate tool using the code snippet
8667    for ac_prog in printf
8668do
8669  # Extract the first word of "$ac_prog", so it can be a program name with args.
8670set dummy $ac_prog; 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_PRINTF+:} false; then :
8674  $as_echo_n "(cached) " >&6
8675else
8676  case $PRINTF in
8677  [\\/]* | ?:[\\/]*)
8678  ac_cv_path_PRINTF="$PRINTF" # 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_PRINTF="$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
8699PRINTF=$ac_cv_path_PRINTF
8700if test -n "$PRINTF"; then
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8702$as_echo "$PRINTF" >&6; }
8703else
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705$as_echo "no" >&6; }
8706fi
8707
8708
8709  test -n "$PRINTF" && break
8710done
8711
8712  else
8713    # The variable is set, but is it from the command line or the environment?
8714
8715    # Try to remove the string !PRINTF! from our list.
8716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8718      # If it failed, the variable was not from the command line. Ignore it,
8719      # but warn the user (except for BASH, which is always set by the calling BASH).
8720      if test "xPRINTF" != xBASH; then
8721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8722$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8723      fi
8724      # Try to locate tool using the code snippet
8725      for ac_prog in printf
8726do
8727  # Extract the first word of "$ac_prog", so it can be a program name with args.
8728set dummy $ac_prog; ac_word=$2
8729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8730$as_echo_n "checking for $ac_word... " >&6; }
8731if ${ac_cv_path_PRINTF+:} false; then :
8732  $as_echo_n "(cached) " >&6
8733else
8734  case $PRINTF in
8735  [\\/]* | ?:[\\/]*)
8736  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8737  ;;
8738  *)
8739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8740for as_dir in $PATH
8741do
8742  IFS=$as_save_IFS
8743  test -z "$as_dir" && as_dir=.
8744    for ac_exec_ext in '' $ac_executable_extensions; do
8745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8746    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8748    break 2
8749  fi
8750done
8751  done
8752IFS=$as_save_IFS
8753
8754  ;;
8755esac
8756fi
8757PRINTF=$ac_cv_path_PRINTF
8758if test -n "$PRINTF"; then
8759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8760$as_echo "$PRINTF" >&6; }
8761else
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763$as_echo "no" >&6; }
8764fi
8765
8766
8767  test -n "$PRINTF" && break
8768done
8769
8770    else
8771      # If it succeeded, then it was overridden by the user. We will use it
8772      # for the tool.
8773
8774      # First remove it from the list of overridden variables, so we can test
8775      # for unknown variables in the end.
8776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8777
8778      # Check if the provided tool contains a complete path.
8779      tool_specified="$PRINTF"
8780      tool_basename="${tool_specified##*/}"
8781      if test "x$tool_basename" = "x$tool_specified"; then
8782        # A command without a complete path is provided, search $PATH.
8783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8784$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8785        # Extract the first word of "$tool_basename", so it can be a program name with args.
8786set dummy $tool_basename; ac_word=$2
8787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8788$as_echo_n "checking for $ac_word... " >&6; }
8789if ${ac_cv_path_PRINTF+:} false; then :
8790  $as_echo_n "(cached) " >&6
8791else
8792  case $PRINTF in
8793  [\\/]* | ?:[\\/]*)
8794  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8795  ;;
8796  *)
8797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8798for as_dir in $PATH
8799do
8800  IFS=$as_save_IFS
8801  test -z "$as_dir" && as_dir=.
8802    for ac_exec_ext in '' $ac_executable_extensions; do
8803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8804    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8806    break 2
8807  fi
8808done
8809  done
8810IFS=$as_save_IFS
8811
8812  ;;
8813esac
8814fi
8815PRINTF=$ac_cv_path_PRINTF
8816if test -n "$PRINTF"; then
8817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8818$as_echo "$PRINTF" >&6; }
8819else
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8821$as_echo "no" >&6; }
8822fi
8823
8824
8825        if test "x$PRINTF" = x; then
8826          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8827        fi
8828      else
8829        # Otherwise we believe it is a complete path. Use it as it is.
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8831$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8833$as_echo_n "checking for PRINTF... " >&6; }
8834        if test ! -x "$tool_specified"; then
8835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8836$as_echo "not found" >&6; }
8837          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8838        fi
8839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8840$as_echo "$tool_specified" >&6; }
8841      fi
8842    fi
8843  fi
8844
8845
8846
8847  if test "x$PRINTF" = x; then
8848    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8849  fi
8850
8851
8852
8853
8854
8855  # Publish this variable in the help.
8856
8857
8858  if test "x$RM" = x; then
8859    # The variable is not set by user, try to locate tool using the code snippet
8860    for ac_prog in rm
8861do
8862  # Extract the first word of "$ac_prog", so it can be a program name with args.
8863set dummy $ac_prog; 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_RM+:} false; then :
8867  $as_echo_n "(cached) " >&6
8868else
8869  case $RM in
8870  [\\/]* | ?:[\\/]*)
8871  ac_cv_path_RM="$RM" # 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_RM="$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
8892RM=$ac_cv_path_RM
8893if test -n "$RM"; then
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8895$as_echo "$RM" >&6; }
8896else
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898$as_echo "no" >&6; }
8899fi
8900
8901
8902  test -n "$RM" && break
8903done
8904
8905  else
8906    # The variable is set, but is it from the command line or the environment?
8907
8908    # Try to remove the string !RM! from our list.
8909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8911      # If it failed, the variable was not from the command line. Ignore it,
8912      # but warn the user (except for BASH, which is always set by the calling BASH).
8913      if test "xRM" != xBASH; then
8914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8915$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8916      fi
8917      # Try to locate tool using the code snippet
8918      for ac_prog in rm
8919do
8920  # Extract the first word of "$ac_prog", so it can be a program name with args.
8921set dummy $ac_prog; ac_word=$2
8922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923$as_echo_n "checking for $ac_word... " >&6; }
8924if ${ac_cv_path_RM+:} false; then :
8925  $as_echo_n "(cached) " >&6
8926else
8927  case $RM in
8928  [\\/]* | ?:[\\/]*)
8929  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8930  ;;
8931  *)
8932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8933for as_dir in $PATH
8934do
8935  IFS=$as_save_IFS
8936  test -z "$as_dir" && as_dir=.
8937    for ac_exec_ext in '' $ac_executable_extensions; do
8938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8941    break 2
8942  fi
8943done
8944  done
8945IFS=$as_save_IFS
8946
8947  ;;
8948esac
8949fi
8950RM=$ac_cv_path_RM
8951if test -n "$RM"; then
8952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8953$as_echo "$RM" >&6; }
8954else
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956$as_echo "no" >&6; }
8957fi
8958
8959
8960  test -n "$RM" && break
8961done
8962
8963    else
8964      # If it succeeded, then it was overridden by the user. We will use it
8965      # for the tool.
8966
8967      # First remove it from the list of overridden variables, so we can test
8968      # for unknown variables in the end.
8969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8970
8971      # Check if the provided tool contains a complete path.
8972      tool_specified="$RM"
8973      tool_basename="${tool_specified##*/}"
8974      if test "x$tool_basename" = "x$tool_specified"; then
8975        # A command without a complete path is provided, search $PATH.
8976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8977$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8978        # Extract the first word of "$tool_basename", so it can be a program name with args.
8979set dummy $tool_basename; ac_word=$2
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8981$as_echo_n "checking for $ac_word... " >&6; }
8982if ${ac_cv_path_RM+:} false; then :
8983  $as_echo_n "(cached) " >&6
8984else
8985  case $RM in
8986  [\\/]* | ?:[\\/]*)
8987  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8988  ;;
8989  *)
8990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8991for as_dir in $PATH
8992do
8993  IFS=$as_save_IFS
8994  test -z "$as_dir" && as_dir=.
8995    for ac_exec_ext in '' $ac_executable_extensions; do
8996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8997    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8999    break 2
9000  fi
9001done
9002  done
9003IFS=$as_save_IFS
9004
9005  ;;
9006esac
9007fi
9008RM=$ac_cv_path_RM
9009if test -n "$RM"; then
9010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9011$as_echo "$RM" >&6; }
9012else
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
9015fi
9016
9017
9018        if test "x$RM" = x; then
9019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9020        fi
9021      else
9022        # Otherwise we believe it is a complete path. Use it as it is.
9023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9024$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9026$as_echo_n "checking for RM... " >&6; }
9027        if test ! -x "$tool_specified"; then
9028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9029$as_echo "not found" >&6; }
9030          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9031        fi
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9033$as_echo "$tool_specified" >&6; }
9034      fi
9035    fi
9036  fi
9037
9038
9039
9040  if test "x$RM" = x; then
9041    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9042  fi
9043
9044
9045
9046
9047
9048  # Publish this variable in the help.
9049
9050
9051  if test "x$SH" = x; then
9052    # The variable is not set by user, try to locate tool using the code snippet
9053    for ac_prog in sh
9054do
9055  # Extract the first word of "$ac_prog", so it can be a program name with args.
9056set dummy $ac_prog; 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_SH+:} false; then :
9060  $as_echo_n "(cached) " >&6
9061else
9062  case $SH in
9063  [\\/]* | ?:[\\/]*)
9064  ac_cv_path_SH="$SH" # 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_SH="$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
9085SH=$ac_cv_path_SH
9086if test -n "$SH"; then
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9088$as_echo "$SH" >&6; }
9089else
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092fi
9093
9094
9095  test -n "$SH" && break
9096done
9097
9098  else
9099    # The variable is set, but is it from the command line or the environment?
9100
9101    # Try to remove the string !SH! from our list.
9102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9104      # If it failed, the variable was not from the command line. Ignore it,
9105      # but warn the user (except for BASH, which is always set by the calling BASH).
9106      if test "xSH" != xBASH; then
9107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9108$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9109      fi
9110      # Try to locate tool using the code snippet
9111      for ac_prog in sh
9112do
9113  # Extract the first word of "$ac_prog", so it can be a program name with args.
9114set dummy $ac_prog; ac_word=$2
9115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116$as_echo_n "checking for $ac_word... " >&6; }
9117if ${ac_cv_path_SH+:} false; then :
9118  $as_echo_n "(cached) " >&6
9119else
9120  case $SH in
9121  [\\/]* | ?:[\\/]*)
9122  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9123  ;;
9124  *)
9125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9126for as_dir in $PATH
9127do
9128  IFS=$as_save_IFS
9129  test -z "$as_dir" && as_dir=.
9130    for ac_exec_ext in '' $ac_executable_extensions; do
9131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9132    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9134    break 2
9135  fi
9136done
9137  done
9138IFS=$as_save_IFS
9139
9140  ;;
9141esac
9142fi
9143SH=$ac_cv_path_SH
9144if test -n "$SH"; then
9145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9146$as_echo "$SH" >&6; }
9147else
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
9150fi
9151
9152
9153  test -n "$SH" && break
9154done
9155
9156    else
9157      # If it succeeded, then it was overridden by the user. We will use it
9158      # for the tool.
9159
9160      # First remove it from the list of overridden variables, so we can test
9161      # for unknown variables in the end.
9162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9163
9164      # Check if the provided tool contains a complete path.
9165      tool_specified="$SH"
9166      tool_basename="${tool_specified##*/}"
9167      if test "x$tool_basename" = "x$tool_specified"; then
9168        # A command without a complete path is provided, search $PATH.
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9170$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9171        # Extract the first word of "$tool_basename", so it can be a program name with args.
9172set dummy $tool_basename; ac_word=$2
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9174$as_echo_n "checking for $ac_word... " >&6; }
9175if ${ac_cv_path_SH+:} false; then :
9176  $as_echo_n "(cached) " >&6
9177else
9178  case $SH in
9179  [\\/]* | ?:[\\/]*)
9180  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9181  ;;
9182  *)
9183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184for as_dir in $PATH
9185do
9186  IFS=$as_save_IFS
9187  test -z "$as_dir" && as_dir=.
9188    for ac_exec_ext in '' $ac_executable_extensions; do
9189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9190    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9192    break 2
9193  fi
9194done
9195  done
9196IFS=$as_save_IFS
9197
9198  ;;
9199esac
9200fi
9201SH=$ac_cv_path_SH
9202if test -n "$SH"; then
9203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9204$as_echo "$SH" >&6; }
9205else
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207$as_echo "no" >&6; }
9208fi
9209
9210
9211        if test "x$SH" = x; then
9212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9213        fi
9214      else
9215        # Otherwise we believe it is a complete path. Use it as it is.
9216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9217$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9219$as_echo_n "checking for SH... " >&6; }
9220        if test ! -x "$tool_specified"; then
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9222$as_echo "not found" >&6; }
9223          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9224        fi
9225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9226$as_echo "$tool_specified" >&6; }
9227      fi
9228    fi
9229  fi
9230
9231
9232
9233  if test "x$SH" = x; then
9234    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9235  fi
9236
9237
9238
9239
9240
9241  # Publish this variable in the help.
9242
9243
9244  if test "x$SORT" = x; then
9245    # The variable is not set by user, try to locate tool using the code snippet
9246    for ac_prog in sort
9247do
9248  # Extract the first word of "$ac_prog", so it can be a program name with args.
9249set dummy $ac_prog; 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_SORT+:} false; then :
9253  $as_echo_n "(cached) " >&6
9254else
9255  case $SORT in
9256  [\\/]* | ?:[\\/]*)
9257  ac_cv_path_SORT="$SORT" # 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_SORT="$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
9278SORT=$ac_cv_path_SORT
9279if test -n "$SORT"; then
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9281$as_echo "$SORT" >&6; }
9282else
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
9285fi
9286
9287
9288  test -n "$SORT" && break
9289done
9290
9291  else
9292    # The variable is set, but is it from the command line or the environment?
9293
9294    # Try to remove the string !SORT! from our list.
9295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9297      # If it failed, the variable was not from the command line. Ignore it,
9298      # but warn the user (except for BASH, which is always set by the calling BASH).
9299      if test "xSORT" != xBASH; then
9300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9301$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9302      fi
9303      # Try to locate tool using the code snippet
9304      for ac_prog in sort
9305do
9306  # Extract the first word of "$ac_prog", so it can be a program name with args.
9307set dummy $ac_prog; ac_word=$2
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9309$as_echo_n "checking for $ac_word... " >&6; }
9310if ${ac_cv_path_SORT+:} false; then :
9311  $as_echo_n "(cached) " >&6
9312else
9313  case $SORT in
9314  [\\/]* | ?:[\\/]*)
9315  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9316  ;;
9317  *)
9318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319for as_dir in $PATH
9320do
9321  IFS=$as_save_IFS
9322  test -z "$as_dir" && as_dir=.
9323    for ac_exec_ext in '' $ac_executable_extensions; do
9324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327    break 2
9328  fi
9329done
9330  done
9331IFS=$as_save_IFS
9332
9333  ;;
9334esac
9335fi
9336SORT=$ac_cv_path_SORT
9337if test -n "$SORT"; then
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9339$as_echo "$SORT" >&6; }
9340else
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
9343fi
9344
9345
9346  test -n "$SORT" && break
9347done
9348
9349    else
9350      # If it succeeded, then it was overridden by the user. We will use it
9351      # for the tool.
9352
9353      # First remove it from the list of overridden variables, so we can test
9354      # for unknown variables in the end.
9355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9356
9357      # Check if the provided tool contains a complete path.
9358      tool_specified="$SORT"
9359      tool_basename="${tool_specified##*/}"
9360      if test "x$tool_basename" = "x$tool_specified"; then
9361        # A command without a complete path is provided, search $PATH.
9362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9363$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9364        # Extract the first word of "$tool_basename", so it can be a program name with args.
9365set dummy $tool_basename; ac_word=$2
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9367$as_echo_n "checking for $ac_word... " >&6; }
9368if ${ac_cv_path_SORT+:} false; then :
9369  $as_echo_n "(cached) " >&6
9370else
9371  case $SORT in
9372  [\\/]* | ?:[\\/]*)
9373  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9374  ;;
9375  *)
9376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9377for as_dir in $PATH
9378do
9379  IFS=$as_save_IFS
9380  test -z "$as_dir" && as_dir=.
9381    for ac_exec_ext in '' $ac_executable_extensions; do
9382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9383    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9385    break 2
9386  fi
9387done
9388  done
9389IFS=$as_save_IFS
9390
9391  ;;
9392esac
9393fi
9394SORT=$ac_cv_path_SORT
9395if test -n "$SORT"; then
9396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9397$as_echo "$SORT" >&6; }
9398else
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
9401fi
9402
9403
9404        if test "x$SORT" = x; then
9405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9406        fi
9407      else
9408        # Otherwise we believe it is a complete path. Use it as it is.
9409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9410$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9412$as_echo_n "checking for SORT... " >&6; }
9413        if test ! -x "$tool_specified"; then
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9415$as_echo "not found" >&6; }
9416          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9417        fi
9418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9419$as_echo "$tool_specified" >&6; }
9420      fi
9421    fi
9422  fi
9423
9424
9425
9426  if test "x$SORT" = x; then
9427    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9428  fi
9429
9430
9431
9432
9433
9434  # Publish this variable in the help.
9435
9436
9437  if test "x$TAIL" = x; then
9438    # The variable is not set by user, try to locate tool using the code snippet
9439    for ac_prog in tail
9440do
9441  # Extract the first word of "$ac_prog", so it can be a program name with args.
9442set dummy $ac_prog; 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_TAIL+:} false; then :
9446  $as_echo_n "(cached) " >&6
9447else
9448  case $TAIL in
9449  [\\/]* | ?:[\\/]*)
9450  ac_cv_path_TAIL="$TAIL" # 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_TAIL="$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
9471TAIL=$ac_cv_path_TAIL
9472if test -n "$TAIL"; then
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9474$as_echo "$TAIL" >&6; }
9475else
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478fi
9479
9480
9481  test -n "$TAIL" && break
9482done
9483
9484  else
9485    # The variable is set, but is it from the command line or the environment?
9486
9487    # Try to remove the string !TAIL! from our list.
9488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9490      # If it failed, the variable was not from the command line. Ignore it,
9491      # but warn the user (except for BASH, which is always set by the calling BASH).
9492      if test "xTAIL" != xBASH; then
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9494$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9495      fi
9496      # Try to locate tool using the code snippet
9497      for ac_prog in tail
9498do
9499  # Extract the first word of "$ac_prog", so it can be a program name with args.
9500set dummy $ac_prog; ac_word=$2
9501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9502$as_echo_n "checking for $ac_word... " >&6; }
9503if ${ac_cv_path_TAIL+:} false; then :
9504  $as_echo_n "(cached) " >&6
9505else
9506  case $TAIL in
9507  [\\/]* | ?:[\\/]*)
9508  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9509  ;;
9510  *)
9511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  test -z "$as_dir" && as_dir=.
9516    for ac_exec_ext in '' $ac_executable_extensions; do
9517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9518    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9520    break 2
9521  fi
9522done
9523  done
9524IFS=$as_save_IFS
9525
9526  ;;
9527esac
9528fi
9529TAIL=$ac_cv_path_TAIL
9530if test -n "$TAIL"; then
9531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9532$as_echo "$TAIL" >&6; }
9533else
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
9536fi
9537
9538
9539  test -n "$TAIL" && break
9540done
9541
9542    else
9543      # If it succeeded, then it was overridden by the user. We will use it
9544      # for the tool.
9545
9546      # First remove it from the list of overridden variables, so we can test
9547      # for unknown variables in the end.
9548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9549
9550      # Check if the provided tool contains a complete path.
9551      tool_specified="$TAIL"
9552      tool_basename="${tool_specified##*/}"
9553      if test "x$tool_basename" = "x$tool_specified"; then
9554        # A command without a complete path is provided, search $PATH.
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9556$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9557        # Extract the first word of "$tool_basename", so it can be a program name with args.
9558set dummy $tool_basename; ac_word=$2
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9560$as_echo_n "checking for $ac_word... " >&6; }
9561if ${ac_cv_path_TAIL+:} false; then :
9562  $as_echo_n "(cached) " >&6
9563else
9564  case $TAIL in
9565  [\\/]* | ?:[\\/]*)
9566  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9567  ;;
9568  *)
9569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9570for as_dir in $PATH
9571do
9572  IFS=$as_save_IFS
9573  test -z "$as_dir" && as_dir=.
9574    for ac_exec_ext in '' $ac_executable_extensions; do
9575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9576    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9578    break 2
9579  fi
9580done
9581  done
9582IFS=$as_save_IFS
9583
9584  ;;
9585esac
9586fi
9587TAIL=$ac_cv_path_TAIL
9588if test -n "$TAIL"; then
9589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9590$as_echo "$TAIL" >&6; }
9591else
9592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
9594fi
9595
9596
9597        if test "x$TAIL" = x; then
9598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9599        fi
9600      else
9601        # Otherwise we believe it is a complete path. Use it as it is.
9602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9603$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9605$as_echo_n "checking for TAIL... " >&6; }
9606        if test ! -x "$tool_specified"; then
9607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9608$as_echo "not found" >&6; }
9609          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9610        fi
9611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9612$as_echo "$tool_specified" >&6; }
9613      fi
9614    fi
9615  fi
9616
9617
9618
9619  if test "x$TAIL" = x; then
9620    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9621  fi
9622
9623
9624
9625
9626
9627  # Publish this variable in the help.
9628
9629
9630  if test "x$TAR" = x; then
9631    # The variable is not set by user, try to locate tool using the code snippet
9632    for ac_prog in tar
9633do
9634  # Extract the first word of "$ac_prog", so it can be a program name with args.
9635set dummy $ac_prog; 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_TAR+:} false; then :
9639  $as_echo_n "(cached) " >&6
9640else
9641  case $TAR in
9642  [\\/]* | ?:[\\/]*)
9643  ac_cv_path_TAR="$TAR" # 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_TAR="$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
9664TAR=$ac_cv_path_TAR
9665if test -n "$TAR"; then
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9667$as_echo "$TAR" >&6; }
9668else
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
9671fi
9672
9673
9674  test -n "$TAR" && break
9675done
9676
9677  else
9678    # The variable is set, but is it from the command line or the environment?
9679
9680    # Try to remove the string !TAR! from our list.
9681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9683      # If it failed, the variable was not from the command line. Ignore it,
9684      # but warn the user (except for BASH, which is always set by the calling BASH).
9685      if test "xTAR" != xBASH; then
9686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9687$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9688      fi
9689      # Try to locate tool using the code snippet
9690      for ac_prog in tar
9691do
9692  # Extract the first word of "$ac_prog", so it can be a program name with args.
9693set dummy $ac_prog; ac_word=$2
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9695$as_echo_n "checking for $ac_word... " >&6; }
9696if ${ac_cv_path_TAR+:} false; then :
9697  $as_echo_n "(cached) " >&6
9698else
9699  case $TAR in
9700  [\\/]* | ?:[\\/]*)
9701  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9702  ;;
9703  *)
9704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9705for as_dir in $PATH
9706do
9707  IFS=$as_save_IFS
9708  test -z "$as_dir" && as_dir=.
9709    for ac_exec_ext in '' $ac_executable_extensions; do
9710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9711    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9713    break 2
9714  fi
9715done
9716  done
9717IFS=$as_save_IFS
9718
9719  ;;
9720esac
9721fi
9722TAR=$ac_cv_path_TAR
9723if test -n "$TAR"; then
9724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9725$as_echo "$TAR" >&6; }
9726else
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728$as_echo "no" >&6; }
9729fi
9730
9731
9732  test -n "$TAR" && break
9733done
9734
9735    else
9736      # If it succeeded, then it was overridden by the user. We will use it
9737      # for the tool.
9738
9739      # First remove it from the list of overridden variables, so we can test
9740      # for unknown variables in the end.
9741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9742
9743      # Check if the provided tool contains a complete path.
9744      tool_specified="$TAR"
9745      tool_basename="${tool_specified##*/}"
9746      if test "x$tool_basename" = "x$tool_specified"; then
9747        # A command without a complete path is provided, search $PATH.
9748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9749$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9750        # Extract the first word of "$tool_basename", so it can be a program name with args.
9751set dummy $tool_basename; ac_word=$2
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9753$as_echo_n "checking for $ac_word... " >&6; }
9754if ${ac_cv_path_TAR+:} false; then :
9755  $as_echo_n "(cached) " >&6
9756else
9757  case $TAR in
9758  [\\/]* | ?:[\\/]*)
9759  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9760  ;;
9761  *)
9762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763for as_dir in $PATH
9764do
9765  IFS=$as_save_IFS
9766  test -z "$as_dir" && as_dir=.
9767    for ac_exec_ext in '' $ac_executable_extensions; do
9768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9769    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771    break 2
9772  fi
9773done
9774  done
9775IFS=$as_save_IFS
9776
9777  ;;
9778esac
9779fi
9780TAR=$ac_cv_path_TAR
9781if test -n "$TAR"; then
9782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9783$as_echo "$TAR" >&6; }
9784else
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
9787fi
9788
9789
9790        if test "x$TAR" = x; then
9791          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9792        fi
9793      else
9794        # Otherwise we believe it is a complete path. Use it as it is.
9795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9796$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9798$as_echo_n "checking for TAR... " >&6; }
9799        if test ! -x "$tool_specified"; then
9800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9801$as_echo "not found" >&6; }
9802          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9803        fi
9804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9805$as_echo "$tool_specified" >&6; }
9806      fi
9807    fi
9808  fi
9809
9810
9811
9812  if test "x$TAR" = x; then
9813    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9814  fi
9815
9816
9817
9818
9819
9820  # Publish this variable in the help.
9821
9822
9823  if test "x$TEE" = x; then
9824    # The variable is not set by user, try to locate tool using the code snippet
9825    for ac_prog in tee
9826do
9827  # Extract the first word of "$ac_prog", so it can be a program name with args.
9828set dummy $ac_prog; 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_TEE+:} false; then :
9832  $as_echo_n "(cached) " >&6
9833else
9834  case $TEE in
9835  [\\/]* | ?:[\\/]*)
9836  ac_cv_path_TEE="$TEE" # 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_TEE="$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
9857TEE=$ac_cv_path_TEE
9858if test -n "$TEE"; then
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9860$as_echo "$TEE" >&6; }
9861else
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
9867  test -n "$TEE" && break
9868done
9869
9870  else
9871    # The variable is set, but is it from the command line or the environment?
9872
9873    # Try to remove the string !TEE! from our list.
9874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9876      # If it failed, the variable was not from the command line. Ignore it,
9877      # but warn the user (except for BASH, which is always set by the calling BASH).
9878      if test "xTEE" != xBASH; then
9879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9880$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9881      fi
9882      # Try to locate tool using the code snippet
9883      for ac_prog in tee
9884do
9885  # Extract the first word of "$ac_prog", so it can be a program name with args.
9886set dummy $ac_prog; ac_word=$2
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9888$as_echo_n "checking for $ac_word... " >&6; }
9889if ${ac_cv_path_TEE+:} false; then :
9890  $as_echo_n "(cached) " >&6
9891else
9892  case $TEE in
9893  [\\/]* | ?:[\\/]*)
9894  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9895  ;;
9896  *)
9897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9898for as_dir in $PATH
9899do
9900  IFS=$as_save_IFS
9901  test -z "$as_dir" && as_dir=.
9902    for ac_exec_ext in '' $ac_executable_extensions; do
9903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9904    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9906    break 2
9907  fi
9908done
9909  done
9910IFS=$as_save_IFS
9911
9912  ;;
9913esac
9914fi
9915TEE=$ac_cv_path_TEE
9916if test -n "$TEE"; then
9917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9918$as_echo "$TEE" >&6; }
9919else
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
9922fi
9923
9924
9925  test -n "$TEE" && break
9926done
9927
9928    else
9929      # If it succeeded, then it was overridden by the user. We will use it
9930      # for the tool.
9931
9932      # First remove it from the list of overridden variables, so we can test
9933      # for unknown variables in the end.
9934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9935
9936      # Check if the provided tool contains a complete path.
9937      tool_specified="$TEE"
9938      tool_basename="${tool_specified##*/}"
9939      if test "x$tool_basename" = "x$tool_specified"; then
9940        # A command without a complete path is provided, search $PATH.
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9942$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9943        # Extract the first word of "$tool_basename", so it can be a program name with args.
9944set dummy $tool_basename; ac_word=$2
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946$as_echo_n "checking for $ac_word... " >&6; }
9947if ${ac_cv_path_TEE+:} false; then :
9948  $as_echo_n "(cached) " >&6
9949else
9950  case $TEE in
9951  [\\/]* | ?:[\\/]*)
9952  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9953  ;;
9954  *)
9955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960    for ac_exec_ext in '' $ac_executable_extensions; do
9961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9962    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964    break 2
9965  fi
9966done
9967  done
9968IFS=$as_save_IFS
9969
9970  ;;
9971esac
9972fi
9973TEE=$ac_cv_path_TEE
9974if test -n "$TEE"; then
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9976$as_echo "$TEE" >&6; }
9977else
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980fi
9981
9982
9983        if test "x$TEE" = x; then
9984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9985        fi
9986      else
9987        # Otherwise we believe it is a complete path. Use it as it is.
9988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9989$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9991$as_echo_n "checking for TEE... " >&6; }
9992        if test ! -x "$tool_specified"; then
9993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9994$as_echo "not found" >&6; }
9995          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9996        fi
9997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9998$as_echo "$tool_specified" >&6; }
9999      fi
10000    fi
10001  fi
10002
10003
10004
10005  if test "x$TEE" = x; then
10006    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10007  fi
10008
10009
10010
10011
10012
10013  # Publish this variable in the help.
10014
10015
10016  if test "x$TOUCH" = x; then
10017    # The variable is not set by user, try to locate tool using the code snippet
10018    for ac_prog in touch
10019do
10020  # Extract the first word of "$ac_prog", so it can be a program name with args.
10021set dummy $ac_prog; 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_TOUCH+:} false; then :
10025  $as_echo_n "(cached) " >&6
10026else
10027  case $TOUCH in
10028  [\\/]* | ?:[\\/]*)
10029  ac_cv_path_TOUCH="$TOUCH" # 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_TOUCH="$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
10050TOUCH=$ac_cv_path_TOUCH
10051if test -n "$TOUCH"; then
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10053$as_echo "$TOUCH" >&6; }
10054else
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059
10060  test -n "$TOUCH" && break
10061done
10062
10063  else
10064    # The variable is set, but is it from the command line or the environment?
10065
10066    # Try to remove the string !TOUCH! from our list.
10067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10069      # If it failed, the variable was not from the command line. Ignore it,
10070      # but warn the user (except for BASH, which is always set by the calling BASH).
10071      if test "xTOUCH" != xBASH; then
10072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10073$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10074      fi
10075      # Try to locate tool using the code snippet
10076      for ac_prog in touch
10077do
10078  # Extract the first word of "$ac_prog", so it can be a program name with args.
10079set dummy $ac_prog; ac_word=$2
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10081$as_echo_n "checking for $ac_word... " >&6; }
10082if ${ac_cv_path_TOUCH+:} false; then :
10083  $as_echo_n "(cached) " >&6
10084else
10085  case $TOUCH in
10086  [\\/]* | ?:[\\/]*)
10087  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10088  ;;
10089  *)
10090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10091for as_dir in $PATH
10092do
10093  IFS=$as_save_IFS
10094  test -z "$as_dir" && as_dir=.
10095    for ac_exec_ext in '' $ac_executable_extensions; do
10096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10097    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10099    break 2
10100  fi
10101done
10102  done
10103IFS=$as_save_IFS
10104
10105  ;;
10106esac
10107fi
10108TOUCH=$ac_cv_path_TOUCH
10109if test -n "$TOUCH"; then
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10111$as_echo "$TOUCH" >&6; }
10112else
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118  test -n "$TOUCH" && break
10119done
10120
10121    else
10122      # If it succeeded, then it was overridden by the user. We will use it
10123      # for the tool.
10124
10125      # First remove it from the list of overridden variables, so we can test
10126      # for unknown variables in the end.
10127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10128
10129      # Check if the provided tool contains a complete path.
10130      tool_specified="$TOUCH"
10131      tool_basename="${tool_specified##*/}"
10132      if test "x$tool_basename" = "x$tool_specified"; then
10133        # A command without a complete path is provided, search $PATH.
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10135$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10136        # Extract the first word of "$tool_basename", so it can be a program name with args.
10137set dummy $tool_basename; ac_word=$2
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10139$as_echo_n "checking for $ac_word... " >&6; }
10140if ${ac_cv_path_TOUCH+:} false; then :
10141  $as_echo_n "(cached) " >&6
10142else
10143  case $TOUCH in
10144  [\\/]* | ?:[\\/]*)
10145  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10146  ;;
10147  *)
10148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10149for as_dir in $PATH
10150do
10151  IFS=$as_save_IFS
10152  test -z "$as_dir" && as_dir=.
10153    for ac_exec_ext in '' $ac_executable_extensions; do
10154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10155    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10157    break 2
10158  fi
10159done
10160  done
10161IFS=$as_save_IFS
10162
10163  ;;
10164esac
10165fi
10166TOUCH=$ac_cv_path_TOUCH
10167if test -n "$TOUCH"; then
10168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10169$as_echo "$TOUCH" >&6; }
10170else
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
10173fi
10174
10175
10176        if test "x$TOUCH" = x; then
10177          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10178        fi
10179      else
10180        # Otherwise we believe it is a complete path. Use it as it is.
10181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10182$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10184$as_echo_n "checking for TOUCH... " >&6; }
10185        if test ! -x "$tool_specified"; then
10186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10187$as_echo "not found" >&6; }
10188          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10189        fi
10190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10191$as_echo "$tool_specified" >&6; }
10192      fi
10193    fi
10194  fi
10195
10196
10197
10198  if test "x$TOUCH" = x; then
10199    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10200  fi
10201
10202
10203
10204
10205
10206  # Publish this variable in the help.
10207
10208
10209  if test "x$TR" = x; then
10210    # The variable is not set by user, try to locate tool using the code snippet
10211    for ac_prog in tr
10212do
10213  # Extract the first word of "$ac_prog", so it can be a program name with args.
10214set dummy $ac_prog; 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_TR+:} false; then :
10218  $as_echo_n "(cached) " >&6
10219else
10220  case $TR in
10221  [\\/]* | ?:[\\/]*)
10222  ac_cv_path_TR="$TR" # 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_TR="$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
10243TR=$ac_cv_path_TR
10244if test -n "$TR"; then
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10246$as_echo "$TR" >&6; }
10247else
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
10250fi
10251
10252
10253  test -n "$TR" && break
10254done
10255
10256  else
10257    # The variable is set, but is it from the command line or the environment?
10258
10259    # Try to remove the string !TR! from our list.
10260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10262      # If it failed, the variable was not from the command line. Ignore it,
10263      # but warn the user (except for BASH, which is always set by the calling BASH).
10264      if test "xTR" != xBASH; then
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10266$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10267      fi
10268      # Try to locate tool using the code snippet
10269      for ac_prog in tr
10270do
10271  # Extract the first word of "$ac_prog", so it can be a program name with args.
10272set dummy $ac_prog; ac_word=$2
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10274$as_echo_n "checking for $ac_word... " >&6; }
10275if ${ac_cv_path_TR+:} false; then :
10276  $as_echo_n "(cached) " >&6
10277else
10278  case $TR in
10279  [\\/]* | ?:[\\/]*)
10280  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10281  ;;
10282  *)
10283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10284for as_dir in $PATH
10285do
10286  IFS=$as_save_IFS
10287  test -z "$as_dir" && as_dir=.
10288    for ac_exec_ext in '' $ac_executable_extensions; do
10289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10290    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10292    break 2
10293  fi
10294done
10295  done
10296IFS=$as_save_IFS
10297
10298  ;;
10299esac
10300fi
10301TR=$ac_cv_path_TR
10302if test -n "$TR"; then
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10304$as_echo "$TR" >&6; }
10305else
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308fi
10309
10310
10311  test -n "$TR" && break
10312done
10313
10314    else
10315      # If it succeeded, then it was overridden by the user. We will use it
10316      # for the tool.
10317
10318      # First remove it from the list of overridden variables, so we can test
10319      # for unknown variables in the end.
10320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10321
10322      # Check if the provided tool contains a complete path.
10323      tool_specified="$TR"
10324      tool_basename="${tool_specified##*/}"
10325      if test "x$tool_basename" = "x$tool_specified"; then
10326        # A command without a complete path is provided, search $PATH.
10327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10328$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10329        # Extract the first word of "$tool_basename", so it can be a program name with args.
10330set dummy $tool_basename; ac_word=$2
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10332$as_echo_n "checking for $ac_word... " >&6; }
10333if ${ac_cv_path_TR+:} false; then :
10334  $as_echo_n "(cached) " >&6
10335else
10336  case $TR in
10337  [\\/]* | ?:[\\/]*)
10338  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10339  ;;
10340  *)
10341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10342for as_dir in $PATH
10343do
10344  IFS=$as_save_IFS
10345  test -z "$as_dir" && as_dir=.
10346    for ac_exec_ext in '' $ac_executable_extensions; do
10347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10348    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10350    break 2
10351  fi
10352done
10353  done
10354IFS=$as_save_IFS
10355
10356  ;;
10357esac
10358fi
10359TR=$ac_cv_path_TR
10360if test -n "$TR"; then
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10362$as_echo "$TR" >&6; }
10363else
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369        if test "x$TR" = x; then
10370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10371        fi
10372      else
10373        # Otherwise we believe it is a complete path. Use it as it is.
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10375$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10377$as_echo_n "checking for TR... " >&6; }
10378        if test ! -x "$tool_specified"; then
10379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10380$as_echo "not found" >&6; }
10381          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10382        fi
10383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10384$as_echo "$tool_specified" >&6; }
10385      fi
10386    fi
10387  fi
10388
10389
10390
10391  if test "x$TR" = x; then
10392    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10393  fi
10394
10395
10396
10397
10398
10399  # Publish this variable in the help.
10400
10401
10402  if test "x$UNAME" = x; then
10403    # The variable is not set by user, try to locate tool using the code snippet
10404    for ac_prog in uname
10405do
10406  # Extract the first word of "$ac_prog", so it can be a program name with args.
10407set dummy $ac_prog; 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_UNAME+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $UNAME in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_UNAME="$UNAME" # 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_UNAME="$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
10436UNAME=$ac_cv_path_UNAME
10437if test -n "$UNAME"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10439$as_echo "$UNAME" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446  test -n "$UNAME" && break
10447done
10448
10449  else
10450    # The variable is set, but is it from the command line or the environment?
10451
10452    # Try to remove the string !UNAME! from our list.
10453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10455      # If it failed, the variable was not from the command line. Ignore it,
10456      # but warn the user (except for BASH, which is always set by the calling BASH).
10457      if test "xUNAME" != xBASH; then
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10459$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10460      fi
10461      # Try to locate tool using the code snippet
10462      for ac_prog in uname
10463do
10464  # Extract the first word of "$ac_prog", so it can be a program name with args.
10465set dummy $ac_prog; ac_word=$2
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467$as_echo_n "checking for $ac_word... " >&6; }
10468if ${ac_cv_path_UNAME+:} false; then :
10469  $as_echo_n "(cached) " >&6
10470else
10471  case $UNAME in
10472  [\\/]* | ?:[\\/]*)
10473  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10474  ;;
10475  *)
10476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477for as_dir in $PATH
10478do
10479  IFS=$as_save_IFS
10480  test -z "$as_dir" && as_dir=.
10481    for ac_exec_ext in '' $ac_executable_extensions; do
10482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485    break 2
10486  fi
10487done
10488  done
10489IFS=$as_save_IFS
10490
10491  ;;
10492esac
10493fi
10494UNAME=$ac_cv_path_UNAME
10495if test -n "$UNAME"; then
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10497$as_echo "$UNAME" >&6; }
10498else
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501fi
10502
10503
10504  test -n "$UNAME" && break
10505done
10506
10507    else
10508      # If it succeeded, then it was overridden by the user. We will use it
10509      # for the tool.
10510
10511      # First remove it from the list of overridden variables, so we can test
10512      # for unknown variables in the end.
10513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10514
10515      # Check if the provided tool contains a complete path.
10516      tool_specified="$UNAME"
10517      tool_basename="${tool_specified##*/}"
10518      if test "x$tool_basename" = "x$tool_specified"; then
10519        # A command without a complete path is provided, search $PATH.
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10521$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10522        # Extract the first word of "$tool_basename", so it can be a program name with args.
10523set dummy $tool_basename; ac_word=$2
10524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10525$as_echo_n "checking for $ac_word... " >&6; }
10526if ${ac_cv_path_UNAME+:} false; then :
10527  $as_echo_n "(cached) " >&6
10528else
10529  case $UNAME in
10530  [\\/]* | ?:[\\/]*)
10531  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10532  ;;
10533  *)
10534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10535for as_dir in $PATH
10536do
10537  IFS=$as_save_IFS
10538  test -z "$as_dir" && as_dir=.
10539    for ac_exec_ext in '' $ac_executable_extensions; do
10540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10541    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10543    break 2
10544  fi
10545done
10546  done
10547IFS=$as_save_IFS
10548
10549  ;;
10550esac
10551fi
10552UNAME=$ac_cv_path_UNAME
10553if test -n "$UNAME"; then
10554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10555$as_echo "$UNAME" >&6; }
10556else
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558$as_echo "no" >&6; }
10559fi
10560
10561
10562        if test "x$UNAME" = x; then
10563          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10564        fi
10565      else
10566        # Otherwise we believe it is a complete path. Use it as it is.
10567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10568$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10570$as_echo_n "checking for UNAME... " >&6; }
10571        if test ! -x "$tool_specified"; then
10572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10573$as_echo "not found" >&6; }
10574          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10575        fi
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10577$as_echo "$tool_specified" >&6; }
10578      fi
10579    fi
10580  fi
10581
10582
10583
10584  if test "x$UNAME" = x; then
10585    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10586  fi
10587
10588
10589
10590
10591
10592  # Publish this variable in the help.
10593
10594
10595  if test "x$UNIQ" = x; then
10596    # The variable is not set by user, try to locate tool using the code snippet
10597    for ac_prog in uniq
10598do
10599  # Extract the first word of "$ac_prog", so it can be a program name with args.
10600set dummy $ac_prog; 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_UNIQ+:} false; then :
10604  $as_echo_n "(cached) " >&6
10605else
10606  case $UNIQ in
10607  [\\/]* | ?:[\\/]*)
10608  ac_cv_path_UNIQ="$UNIQ" # 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_UNIQ="$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
10629UNIQ=$ac_cv_path_UNIQ
10630if test -n "$UNIQ"; then
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10632$as_echo "$UNIQ" >&6; }
10633else
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10635$as_echo "no" >&6; }
10636fi
10637
10638
10639  test -n "$UNIQ" && break
10640done
10641
10642  else
10643    # The variable is set, but is it from the command line or the environment?
10644
10645    # Try to remove the string !UNIQ! from our list.
10646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10648      # If it failed, the variable was not from the command line. Ignore it,
10649      # but warn the user (except for BASH, which is always set by the calling BASH).
10650      if test "xUNIQ" != xBASH; then
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10652$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10653      fi
10654      # Try to locate tool using the code snippet
10655      for ac_prog in uniq
10656do
10657  # Extract the first word of "$ac_prog", so it can be a program name with args.
10658set dummy $ac_prog; ac_word=$2
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10660$as_echo_n "checking for $ac_word... " >&6; }
10661if ${ac_cv_path_UNIQ+:} false; then :
10662  $as_echo_n "(cached) " >&6
10663else
10664  case $UNIQ in
10665  [\\/]* | ?:[\\/]*)
10666  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10667  ;;
10668  *)
10669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10670for as_dir in $PATH
10671do
10672  IFS=$as_save_IFS
10673  test -z "$as_dir" && as_dir=.
10674    for ac_exec_ext in '' $ac_executable_extensions; do
10675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10676    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10678    break 2
10679  fi
10680done
10681  done
10682IFS=$as_save_IFS
10683
10684  ;;
10685esac
10686fi
10687UNIQ=$ac_cv_path_UNIQ
10688if test -n "$UNIQ"; then
10689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10690$as_echo "$UNIQ" >&6; }
10691else
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10693$as_echo "no" >&6; }
10694fi
10695
10696
10697  test -n "$UNIQ" && break
10698done
10699
10700    else
10701      # If it succeeded, then it was overridden by the user. We will use it
10702      # for the tool.
10703
10704      # First remove it from the list of overridden variables, so we can test
10705      # for unknown variables in the end.
10706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10707
10708      # Check if the provided tool contains a complete path.
10709      tool_specified="$UNIQ"
10710      tool_basename="${tool_specified##*/}"
10711      if test "x$tool_basename" = "x$tool_specified"; then
10712        # A command without a complete path is provided, search $PATH.
10713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10714$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10715        # Extract the first word of "$tool_basename", so it can be a program name with args.
10716set dummy $tool_basename; ac_word=$2
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718$as_echo_n "checking for $ac_word... " >&6; }
10719if ${ac_cv_path_UNIQ+:} false; then :
10720  $as_echo_n "(cached) " >&6
10721else
10722  case $UNIQ in
10723  [\\/]* | ?:[\\/]*)
10724  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10725  ;;
10726  *)
10727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730  IFS=$as_save_IFS
10731  test -z "$as_dir" && as_dir=.
10732    for ac_exec_ext in '' $ac_executable_extensions; do
10733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736    break 2
10737  fi
10738done
10739  done
10740IFS=$as_save_IFS
10741
10742  ;;
10743esac
10744fi
10745UNIQ=$ac_cv_path_UNIQ
10746if test -n "$UNIQ"; then
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10748$as_echo "$UNIQ" >&6; }
10749else
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
10752fi
10753
10754
10755        if test "x$UNIQ" = x; then
10756          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10757        fi
10758      else
10759        # Otherwise we believe it is a complete path. Use it as it is.
10760        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10761$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10763$as_echo_n "checking for UNIQ... " >&6; }
10764        if test ! -x "$tool_specified"; then
10765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10766$as_echo "not found" >&6; }
10767          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10768        fi
10769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10770$as_echo "$tool_specified" >&6; }
10771      fi
10772    fi
10773  fi
10774
10775
10776
10777  if test "x$UNIQ" = x; then
10778    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10779  fi
10780
10781
10782
10783
10784
10785  # Publish this variable in the help.
10786
10787
10788  if test "x$WC" = x; then
10789    # The variable is not set by user, try to locate tool using the code snippet
10790    for ac_prog in wc
10791do
10792  # Extract the first word of "$ac_prog", so it can be a program name with args.
10793set dummy $ac_prog; 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_WC+:} false; then :
10797  $as_echo_n "(cached) " >&6
10798else
10799  case $WC in
10800  [\\/]* | ?:[\\/]*)
10801  ac_cv_path_WC="$WC" # 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_WC="$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
10822WC=$ac_cv_path_WC
10823if test -n "$WC"; then
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10825$as_echo "$WC" >&6; }
10826else
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832  test -n "$WC" && break
10833done
10834
10835  else
10836    # The variable is set, but is it from the command line or the environment?
10837
10838    # Try to remove the string !WC! from our list.
10839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10841      # If it failed, the variable was not from the command line. Ignore it,
10842      # but warn the user (except for BASH, which is always set by the calling BASH).
10843      if test "xWC" != xBASH; then
10844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10845$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10846      fi
10847      # Try to locate tool using the code snippet
10848      for ac_prog in wc
10849do
10850  # Extract the first word of "$ac_prog", so it can be a program name with args.
10851set dummy $ac_prog; ac_word=$2
10852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10853$as_echo_n "checking for $ac_word... " >&6; }
10854if ${ac_cv_path_WC+:} false; then :
10855  $as_echo_n "(cached) " >&6
10856else
10857  case $WC in
10858  [\\/]* | ?:[\\/]*)
10859  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10860  ;;
10861  *)
10862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10863for as_dir in $PATH
10864do
10865  IFS=$as_save_IFS
10866  test -z "$as_dir" && as_dir=.
10867    for ac_exec_ext in '' $ac_executable_extensions; do
10868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10869    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10871    break 2
10872  fi
10873done
10874  done
10875IFS=$as_save_IFS
10876
10877  ;;
10878esac
10879fi
10880WC=$ac_cv_path_WC
10881if test -n "$WC"; then
10882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10883$as_echo "$WC" >&6; }
10884else
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886$as_echo "no" >&6; }
10887fi
10888
10889
10890  test -n "$WC" && break
10891done
10892
10893    else
10894      # If it succeeded, then it was overridden by the user. We will use it
10895      # for the tool.
10896
10897      # First remove it from the list of overridden variables, so we can test
10898      # for unknown variables in the end.
10899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10900
10901      # Check if the provided tool contains a complete path.
10902      tool_specified="$WC"
10903      tool_basename="${tool_specified##*/}"
10904      if test "x$tool_basename" = "x$tool_specified"; then
10905        # A command without a complete path is provided, search $PATH.
10906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10907$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10908        # Extract the first word of "$tool_basename", so it can be a program name with args.
10909set dummy $tool_basename; ac_word=$2
10910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10911$as_echo_n "checking for $ac_word... " >&6; }
10912if ${ac_cv_path_WC+:} false; then :
10913  $as_echo_n "(cached) " >&6
10914else
10915  case $WC in
10916  [\\/]* | ?:[\\/]*)
10917  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10918  ;;
10919  *)
10920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10921for as_dir in $PATH
10922do
10923  IFS=$as_save_IFS
10924  test -z "$as_dir" && as_dir=.
10925    for ac_exec_ext in '' $ac_executable_extensions; do
10926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10927    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10929    break 2
10930  fi
10931done
10932  done
10933IFS=$as_save_IFS
10934
10935  ;;
10936esac
10937fi
10938WC=$ac_cv_path_WC
10939if test -n "$WC"; then
10940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10941$as_echo "$WC" >&6; }
10942else
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
10945fi
10946
10947
10948        if test "x$WC" = x; then
10949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10950        fi
10951      else
10952        # Otherwise we believe it is a complete path. Use it as it is.
10953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10954$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10956$as_echo_n "checking for WC... " >&6; }
10957        if test ! -x "$tool_specified"; then
10958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10959$as_echo "not found" >&6; }
10960          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10961        fi
10962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10963$as_echo "$tool_specified" >&6; }
10964      fi
10965    fi
10966  fi
10967
10968
10969
10970  if test "x$WC" = x; then
10971    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10972  fi
10973
10974
10975
10976
10977
10978  # Publish this variable in the help.
10979
10980
10981  if test "x$WHICH" = x; then
10982    # The variable is not set by user, try to locate tool using the code snippet
10983    for ac_prog in which
10984do
10985  # Extract the first word of "$ac_prog", so it can be a program name with args.
10986set dummy $ac_prog; 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_WHICH+:} false; then :
10990  $as_echo_n "(cached) " >&6
10991else
10992  case $WHICH in
10993  [\\/]* | ?:[\\/]*)
10994  ac_cv_path_WHICH="$WHICH" # 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_WHICH="$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
11015WHICH=$ac_cv_path_WHICH
11016if test -n "$WHICH"; then
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11018$as_echo "$WHICH" >&6; }
11019else
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
11022fi
11023
11024
11025  test -n "$WHICH" && break
11026done
11027
11028  else
11029    # The variable is set, but is it from the command line or the environment?
11030
11031    # Try to remove the string !WHICH! from our list.
11032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11034      # If it failed, the variable was not from the command line. Ignore it,
11035      # but warn the user (except for BASH, which is always set by the calling BASH).
11036      if test "xWHICH" != xBASH; then
11037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11038$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11039      fi
11040      # Try to locate tool using the code snippet
11041      for ac_prog in which
11042do
11043  # Extract the first word of "$ac_prog", so it can be a program name with args.
11044set dummy $ac_prog; ac_word=$2
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046$as_echo_n "checking for $ac_word... " >&6; }
11047if ${ac_cv_path_WHICH+:} false; then :
11048  $as_echo_n "(cached) " >&6
11049else
11050  case $WHICH in
11051  [\\/]* | ?:[\\/]*)
11052  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11053  ;;
11054  *)
11055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056for as_dir in $PATH
11057do
11058  IFS=$as_save_IFS
11059  test -z "$as_dir" && as_dir=.
11060    for ac_exec_ext in '' $ac_executable_extensions; do
11061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064    break 2
11065  fi
11066done
11067  done
11068IFS=$as_save_IFS
11069
11070  ;;
11071esac
11072fi
11073WHICH=$ac_cv_path_WHICH
11074if test -n "$WHICH"; then
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11076$as_echo "$WHICH" >&6; }
11077else
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083  test -n "$WHICH" && break
11084done
11085
11086    else
11087      # If it succeeded, then it was overridden by the user. We will use it
11088      # for the tool.
11089
11090      # First remove it from the list of overridden variables, so we can test
11091      # for unknown variables in the end.
11092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11093
11094      # Check if the provided tool contains a complete path.
11095      tool_specified="$WHICH"
11096      tool_basename="${tool_specified##*/}"
11097      if test "x$tool_basename" = "x$tool_specified"; then
11098        # A command without a complete path is provided, search $PATH.
11099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11100$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11101        # Extract the first word of "$tool_basename", so it can be a program name with args.
11102set dummy $tool_basename; ac_word=$2
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104$as_echo_n "checking for $ac_word... " >&6; }
11105if ${ac_cv_path_WHICH+:} false; then :
11106  $as_echo_n "(cached) " >&6
11107else
11108  case $WHICH in
11109  [\\/]* | ?:[\\/]*)
11110  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11111  ;;
11112  *)
11113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114for as_dir in $PATH
11115do
11116  IFS=$as_save_IFS
11117  test -z "$as_dir" && as_dir=.
11118    for ac_exec_ext in '' $ac_executable_extensions; do
11119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122    break 2
11123  fi
11124done
11125  done
11126IFS=$as_save_IFS
11127
11128  ;;
11129esac
11130fi
11131WHICH=$ac_cv_path_WHICH
11132if test -n "$WHICH"; then
11133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11134$as_echo "$WHICH" >&6; }
11135else
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137$as_echo "no" >&6; }
11138fi
11139
11140
11141        if test "x$WHICH" = x; then
11142          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11143        fi
11144      else
11145        # Otherwise we believe it is a complete path. Use it as it is.
11146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11147$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11149$as_echo_n "checking for WHICH... " >&6; }
11150        if test ! -x "$tool_specified"; then
11151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11152$as_echo "not found" >&6; }
11153          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11154        fi
11155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11156$as_echo "$tool_specified" >&6; }
11157      fi
11158    fi
11159  fi
11160
11161
11162
11163  if test "x$WHICH" = x; then
11164    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11165  fi
11166
11167
11168
11169
11170
11171  # Publish this variable in the help.
11172
11173
11174  if test "x$XARGS" = x; then
11175    # The variable is not set by user, try to locate tool using the code snippet
11176    for ac_prog in xargs
11177do
11178  # Extract the first word of "$ac_prog", so it can be a program name with args.
11179set dummy $ac_prog; 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_XARGS+:} false; then :
11183  $as_echo_n "(cached) " >&6
11184else
11185  case $XARGS in
11186  [\\/]* | ?:[\\/]*)
11187  ac_cv_path_XARGS="$XARGS" # 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_XARGS="$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
11208XARGS=$ac_cv_path_XARGS
11209if test -n "$XARGS"; then
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11211$as_echo "$XARGS" >&6; }
11212else
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
11215fi
11216
11217
11218  test -n "$XARGS" && break
11219done
11220
11221  else
11222    # The variable is set, but is it from the command line or the environment?
11223
11224    # Try to remove the string !XARGS! from our list.
11225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11227      # If it failed, the variable was not from the command line. Ignore it,
11228      # but warn the user (except for BASH, which is always set by the calling BASH).
11229      if test "xXARGS" != xBASH; then
11230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11231$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11232      fi
11233      # Try to locate tool using the code snippet
11234      for ac_prog in xargs
11235do
11236  # Extract the first word of "$ac_prog", so it can be a program name with args.
11237set dummy $ac_prog; ac_word=$2
11238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11239$as_echo_n "checking for $ac_word... " >&6; }
11240if ${ac_cv_path_XARGS+:} false; then :
11241  $as_echo_n "(cached) " >&6
11242else
11243  case $XARGS in
11244  [\\/]* | ?:[\\/]*)
11245  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11246  ;;
11247  *)
11248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11249for as_dir in $PATH
11250do
11251  IFS=$as_save_IFS
11252  test -z "$as_dir" && as_dir=.
11253    for ac_exec_ext in '' $ac_executable_extensions; do
11254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11255    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11257    break 2
11258  fi
11259done
11260  done
11261IFS=$as_save_IFS
11262
11263  ;;
11264esac
11265fi
11266XARGS=$ac_cv_path_XARGS
11267if test -n "$XARGS"; then
11268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11269$as_echo "$XARGS" >&6; }
11270else
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
11273fi
11274
11275
11276  test -n "$XARGS" && break
11277done
11278
11279    else
11280      # If it succeeded, then it was overridden by the user. We will use it
11281      # for the tool.
11282
11283      # First remove it from the list of overridden variables, so we can test
11284      # for unknown variables in the end.
11285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11286
11287      # Check if the provided tool contains a complete path.
11288      tool_specified="$XARGS"
11289      tool_basename="${tool_specified##*/}"
11290      if test "x$tool_basename" = "x$tool_specified"; then
11291        # A command without a complete path is provided, search $PATH.
11292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11293$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11294        # Extract the first word of "$tool_basename", so it can be a program name with args.
11295set dummy $tool_basename; ac_word=$2
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11297$as_echo_n "checking for $ac_word... " >&6; }
11298if ${ac_cv_path_XARGS+:} false; then :
11299  $as_echo_n "(cached) " >&6
11300else
11301  case $XARGS in
11302  [\\/]* | ?:[\\/]*)
11303  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11304  ;;
11305  *)
11306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11307for as_dir in $PATH
11308do
11309  IFS=$as_save_IFS
11310  test -z "$as_dir" && as_dir=.
11311    for ac_exec_ext in '' $ac_executable_extensions; do
11312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11313    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11315    break 2
11316  fi
11317done
11318  done
11319IFS=$as_save_IFS
11320
11321  ;;
11322esac
11323fi
11324XARGS=$ac_cv_path_XARGS
11325if test -n "$XARGS"; then
11326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11327$as_echo "$XARGS" >&6; }
11328else
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
11331fi
11332
11333
11334        if test "x$XARGS" = x; then
11335          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11336        fi
11337      else
11338        # Otherwise we believe it is a complete path. Use it as it is.
11339        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11340$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11341        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11342$as_echo_n "checking for XARGS... " >&6; }
11343        if test ! -x "$tool_specified"; then
11344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11345$as_echo "not found" >&6; }
11346          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11347        fi
11348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11349$as_echo "$tool_specified" >&6; }
11350      fi
11351    fi
11352  fi
11353
11354
11355
11356  if test "x$XARGS" = x; then
11357    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11358  fi
11359
11360
11361
11362  # Then required tools that require some special treatment.
11363
11364
11365  # Publish this variable in the help.
11366
11367
11368  if test "x$AWK" = x; then
11369    # The variable is not set by user, try to locate tool using the code snippet
11370    for ac_prog in gawk mawk nawk awk
11371do
11372  # Extract the first word of "$ac_prog", so it can be a program name with args.
11373set dummy $ac_prog; ac_word=$2
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375$as_echo_n "checking for $ac_word... " >&6; }
11376if ${ac_cv_prog_AWK+:} false; then :
11377  $as_echo_n "(cached) " >&6
11378else
11379  if test -n "$AWK"; then
11380  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11381else
11382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11383for as_dir in $PATH
11384do
11385  IFS=$as_save_IFS
11386  test -z "$as_dir" && as_dir=.
11387    for ac_exec_ext in '' $ac_executable_extensions; do
11388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11389    ac_cv_prog_AWK="$ac_prog"
11390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11391    break 2
11392  fi
11393done
11394  done
11395IFS=$as_save_IFS
11396
11397fi
11398fi
11399AWK=$ac_cv_prog_AWK
11400if test -n "$AWK"; then
11401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11402$as_echo "$AWK" >&6; }
11403else
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
11406fi
11407
11408
11409  test -n "$AWK" && break
11410done
11411
11412  else
11413    # The variable is set, but is it from the command line or the environment?
11414
11415    # Try to remove the string !AWK! from our list.
11416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11418      # If it failed, the variable was not from the command line. Ignore it,
11419      # but warn the user (except for BASH, which is always set by the calling BASH).
11420      if test "xAWK" != xBASH; then
11421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11422$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11423      fi
11424      # Try to locate tool using the code snippet
11425      for ac_prog in gawk mawk nawk awk
11426do
11427  # Extract the first word of "$ac_prog", so it can be a program name with args.
11428set dummy $ac_prog; ac_word=$2
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11430$as_echo_n "checking for $ac_word... " >&6; }
11431if ${ac_cv_prog_AWK+:} false; then :
11432  $as_echo_n "(cached) " >&6
11433else
11434  if test -n "$AWK"; then
11435  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11436else
11437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438for as_dir in $PATH
11439do
11440  IFS=$as_save_IFS
11441  test -z "$as_dir" && as_dir=.
11442    for ac_exec_ext in '' $ac_executable_extensions; do
11443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11444    ac_cv_prog_AWK="$ac_prog"
11445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11446    break 2
11447  fi
11448done
11449  done
11450IFS=$as_save_IFS
11451
11452fi
11453fi
11454AWK=$ac_cv_prog_AWK
11455if test -n "$AWK"; then
11456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11457$as_echo "$AWK" >&6; }
11458else
11459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
11461fi
11462
11463
11464  test -n "$AWK" && break
11465done
11466
11467    else
11468      # If it succeeded, then it was overridden by the user. We will use it
11469      # for the tool.
11470
11471      # First remove it from the list of overridden variables, so we can test
11472      # for unknown variables in the end.
11473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11474
11475      # Check if the provided tool contains a complete path.
11476      tool_specified="$AWK"
11477      tool_basename="${tool_specified##*/}"
11478      if test "x$tool_basename" = "x$tool_specified"; then
11479        # A command without a complete path is provided, search $PATH.
11480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11481$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11482        # Extract the first word of "$tool_basename", so it can be a program name with args.
11483set dummy $tool_basename; ac_word=$2
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11485$as_echo_n "checking for $ac_word... " >&6; }
11486if ${ac_cv_path_AWK+:} false; then :
11487  $as_echo_n "(cached) " >&6
11488else
11489  case $AWK in
11490  [\\/]* | ?:[\\/]*)
11491  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11492  ;;
11493  *)
11494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11495for as_dir in $PATH
11496do
11497  IFS=$as_save_IFS
11498  test -z "$as_dir" && as_dir=.
11499    for ac_exec_ext in '' $ac_executable_extensions; do
11500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11501    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11503    break 2
11504  fi
11505done
11506  done
11507IFS=$as_save_IFS
11508
11509  ;;
11510esac
11511fi
11512AWK=$ac_cv_path_AWK
11513if test -n "$AWK"; then
11514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11515$as_echo "$AWK" >&6; }
11516else
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
11519fi
11520
11521
11522        if test "x$AWK" = x; then
11523          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11524        fi
11525      else
11526        # Otherwise we believe it is a complete path. Use it as it is.
11527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11528$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11530$as_echo_n "checking for AWK... " >&6; }
11531        if test ! -x "$tool_specified"; then
11532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11533$as_echo "not found" >&6; }
11534          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11535        fi
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11537$as_echo "$tool_specified" >&6; }
11538      fi
11539    fi
11540  fi
11541
11542
11543  if test "x$AWK" = x; then
11544    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11545  fi
11546
11547
11548
11549
11550  # Publish this variable in the help.
11551
11552
11553  if test "x$GREP" = x; then
11554    # The variable is not set by user, try to locate tool using the code snippet
11555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11556$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11557if ${ac_cv_path_GREP+:} false; then :
11558  $as_echo_n "(cached) " >&6
11559else
11560  if test -z "$GREP"; then
11561  ac_path_GREP_found=false
11562  # Loop through the user's path and test for each of PROGNAME-LIST
11563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11564for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11565do
11566  IFS=$as_save_IFS
11567  test -z "$as_dir" && as_dir=.
11568    for ac_prog in grep ggrep; do
11569    for ac_exec_ext in '' $ac_executable_extensions; do
11570      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11571      as_fn_executable_p "$ac_path_GREP" || continue
11572# Check for GNU ac_path_GREP and select it if it is found.
11573  # Check for GNU $ac_path_GREP
11574case `"$ac_path_GREP" --version 2>&1` in
11575*GNU*)
11576  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11577*)
11578  ac_count=0
11579  $as_echo_n 0123456789 >"conftest.in"
11580  while :
11581  do
11582    cat "conftest.in" "conftest.in" >"conftest.tmp"
11583    mv "conftest.tmp" "conftest.in"
11584    cp "conftest.in" "conftest.nl"
11585    $as_echo 'GREP' >> "conftest.nl"
11586    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11587    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11588    as_fn_arith $ac_count + 1 && ac_count=$as_val
11589    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11590      # Best one so far, save it but keep looking for a better one
11591      ac_cv_path_GREP="$ac_path_GREP"
11592      ac_path_GREP_max=$ac_count
11593    fi
11594    # 10*(2^10) chars as input seems more than enough
11595    test $ac_count -gt 10 && break
11596  done
11597  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11598esac
11599
11600      $ac_path_GREP_found && break 3
11601    done
11602  done
11603  done
11604IFS=$as_save_IFS
11605  if test -z "$ac_cv_path_GREP"; then
11606    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11607  fi
11608else
11609  ac_cv_path_GREP=$GREP
11610fi
11611
11612fi
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11614$as_echo "$ac_cv_path_GREP" >&6; }
11615 GREP="$ac_cv_path_GREP"
11616
11617
11618  else
11619    # The variable is set, but is it from the command line or the environment?
11620
11621    # Try to remove the string !GREP! from our list.
11622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11624      # If it failed, the variable was not from the command line. Ignore it,
11625      # but warn the user (except for BASH, which is always set by the calling BASH).
11626      if test "xGREP" != xBASH; then
11627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11628$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11629      fi
11630      # Try to locate tool using the code snippet
11631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11632$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11633if ${ac_cv_path_GREP+:} false; then :
11634  $as_echo_n "(cached) " >&6
11635else
11636  if test -z "$GREP"; then
11637  ac_path_GREP_found=false
11638  # Loop through the user's path and test for each of PROGNAME-LIST
11639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11640for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11641do
11642  IFS=$as_save_IFS
11643  test -z "$as_dir" && as_dir=.
11644    for ac_prog in grep ggrep; do
11645    for ac_exec_ext in '' $ac_executable_extensions; do
11646      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11647      as_fn_executable_p "$ac_path_GREP" || continue
11648# Check for GNU ac_path_GREP and select it if it is found.
11649  # Check for GNU $ac_path_GREP
11650case `"$ac_path_GREP" --version 2>&1` in
11651*GNU*)
11652  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11653*)
11654  ac_count=0
11655  $as_echo_n 0123456789 >"conftest.in"
11656  while :
11657  do
11658    cat "conftest.in" "conftest.in" >"conftest.tmp"
11659    mv "conftest.tmp" "conftest.in"
11660    cp "conftest.in" "conftest.nl"
11661    $as_echo 'GREP' >> "conftest.nl"
11662    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11663    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11664    as_fn_arith $ac_count + 1 && ac_count=$as_val
11665    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11666      # Best one so far, save it but keep looking for a better one
11667      ac_cv_path_GREP="$ac_path_GREP"
11668      ac_path_GREP_max=$ac_count
11669    fi
11670    # 10*(2^10) chars as input seems more than enough
11671    test $ac_count -gt 10 && break
11672  done
11673  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11674esac
11675
11676      $ac_path_GREP_found && break 3
11677    done
11678  done
11679  done
11680IFS=$as_save_IFS
11681  if test -z "$ac_cv_path_GREP"; then
11682    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11683  fi
11684else
11685  ac_cv_path_GREP=$GREP
11686fi
11687
11688fi
11689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11690$as_echo "$ac_cv_path_GREP" >&6; }
11691 GREP="$ac_cv_path_GREP"
11692
11693
11694    else
11695      # If it succeeded, then it was overridden by the user. We will use it
11696      # for the tool.
11697
11698      # First remove it from the list of overridden variables, so we can test
11699      # for unknown variables in the end.
11700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11701
11702      # Check if the provided tool contains a complete path.
11703      tool_specified="$GREP"
11704      tool_basename="${tool_specified##*/}"
11705      if test "x$tool_basename" = "x$tool_specified"; then
11706        # A command without a complete path is provided, search $PATH.
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11708$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11709        # Extract the first word of "$tool_basename", so it can be a program name with args.
11710set dummy $tool_basename; ac_word=$2
11711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11712$as_echo_n "checking for $ac_word... " >&6; }
11713if ${ac_cv_path_GREP+:} false; then :
11714  $as_echo_n "(cached) " >&6
11715else
11716  case $GREP in
11717  [\\/]* | ?:[\\/]*)
11718  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11719  ;;
11720  *)
11721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11722for as_dir in $PATH
11723do
11724  IFS=$as_save_IFS
11725  test -z "$as_dir" && as_dir=.
11726    for ac_exec_ext in '' $ac_executable_extensions; do
11727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11728    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11730    break 2
11731  fi
11732done
11733  done
11734IFS=$as_save_IFS
11735
11736  ;;
11737esac
11738fi
11739GREP=$ac_cv_path_GREP
11740if test -n "$GREP"; then
11741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11742$as_echo "$GREP" >&6; }
11743else
11744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
11746fi
11747
11748
11749        if test "x$GREP" = x; then
11750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11751        fi
11752      else
11753        # Otherwise we believe it is a complete path. Use it as it is.
11754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11755$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11757$as_echo_n "checking for GREP... " >&6; }
11758        if test ! -x "$tool_specified"; then
11759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11760$as_echo "not found" >&6; }
11761          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11762        fi
11763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11764$as_echo "$tool_specified" >&6; }
11765      fi
11766    fi
11767  fi
11768
11769
11770  if test "x$GREP" = x; then
11771    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11772  fi
11773
11774
11775
11776
11777  # Publish this variable in the help.
11778
11779
11780  if test "x$EGREP" = x; then
11781    # The variable is not set by user, try to locate tool using the code snippet
11782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11783$as_echo_n "checking for egrep... " >&6; }
11784if ${ac_cv_path_EGREP+:} false; then :
11785  $as_echo_n "(cached) " >&6
11786else
11787  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11788   then ac_cv_path_EGREP="$GREP -E"
11789   else
11790     if test -z "$EGREP"; then
11791  ac_path_EGREP_found=false
11792  # Loop through the user's path and test for each of PROGNAME-LIST
11793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11794for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11795do
11796  IFS=$as_save_IFS
11797  test -z "$as_dir" && as_dir=.
11798    for ac_prog in egrep; do
11799    for ac_exec_ext in '' $ac_executable_extensions; do
11800      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11801      as_fn_executable_p "$ac_path_EGREP" || continue
11802# Check for GNU ac_path_EGREP and select it if it is found.
11803  # Check for GNU $ac_path_EGREP
11804case `"$ac_path_EGREP" --version 2>&1` in
11805*GNU*)
11806  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11807*)
11808  ac_count=0
11809  $as_echo_n 0123456789 >"conftest.in"
11810  while :
11811  do
11812    cat "conftest.in" "conftest.in" >"conftest.tmp"
11813    mv "conftest.tmp" "conftest.in"
11814    cp "conftest.in" "conftest.nl"
11815    $as_echo 'EGREP' >> "conftest.nl"
11816    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11817    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11818    as_fn_arith $ac_count + 1 && ac_count=$as_val
11819    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11820      # Best one so far, save it but keep looking for a better one
11821      ac_cv_path_EGREP="$ac_path_EGREP"
11822      ac_path_EGREP_max=$ac_count
11823    fi
11824    # 10*(2^10) chars as input seems more than enough
11825    test $ac_count -gt 10 && break
11826  done
11827  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11828esac
11829
11830      $ac_path_EGREP_found && break 3
11831    done
11832  done
11833  done
11834IFS=$as_save_IFS
11835  if test -z "$ac_cv_path_EGREP"; then
11836    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11837  fi
11838else
11839  ac_cv_path_EGREP=$EGREP
11840fi
11841
11842   fi
11843fi
11844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11845$as_echo "$ac_cv_path_EGREP" >&6; }
11846 EGREP="$ac_cv_path_EGREP"
11847
11848
11849  else
11850    # The variable is set, but is it from the command line or the environment?
11851
11852    # Try to remove the string !EGREP! from our list.
11853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11855      # If it failed, the variable was not from the command line. Ignore it,
11856      # but warn the user (except for BASH, which is always set by the calling BASH).
11857      if test "xEGREP" != xBASH; then
11858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11859$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11860      fi
11861      # Try to locate tool using the code snippet
11862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11863$as_echo_n "checking for egrep... " >&6; }
11864if ${ac_cv_path_EGREP+:} false; then :
11865  $as_echo_n "(cached) " >&6
11866else
11867  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11868   then ac_cv_path_EGREP="$GREP -E"
11869   else
11870     if test -z "$EGREP"; then
11871  ac_path_EGREP_found=false
11872  # Loop through the user's path and test for each of PROGNAME-LIST
11873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11874for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11875do
11876  IFS=$as_save_IFS
11877  test -z "$as_dir" && as_dir=.
11878    for ac_prog in egrep; do
11879    for ac_exec_ext in '' $ac_executable_extensions; do
11880      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11881      as_fn_executable_p "$ac_path_EGREP" || continue
11882# Check for GNU ac_path_EGREP and select it if it is found.
11883  # Check for GNU $ac_path_EGREP
11884case `"$ac_path_EGREP" --version 2>&1` in
11885*GNU*)
11886  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11887*)
11888  ac_count=0
11889  $as_echo_n 0123456789 >"conftest.in"
11890  while :
11891  do
11892    cat "conftest.in" "conftest.in" >"conftest.tmp"
11893    mv "conftest.tmp" "conftest.in"
11894    cp "conftest.in" "conftest.nl"
11895    $as_echo 'EGREP' >> "conftest.nl"
11896    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11897    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11898    as_fn_arith $ac_count + 1 && ac_count=$as_val
11899    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11900      # Best one so far, save it but keep looking for a better one
11901      ac_cv_path_EGREP="$ac_path_EGREP"
11902      ac_path_EGREP_max=$ac_count
11903    fi
11904    # 10*(2^10) chars as input seems more than enough
11905    test $ac_count -gt 10 && break
11906  done
11907  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11908esac
11909
11910      $ac_path_EGREP_found && break 3
11911    done
11912  done
11913  done
11914IFS=$as_save_IFS
11915  if test -z "$ac_cv_path_EGREP"; then
11916    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11917  fi
11918else
11919  ac_cv_path_EGREP=$EGREP
11920fi
11921
11922   fi
11923fi
11924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11925$as_echo "$ac_cv_path_EGREP" >&6; }
11926 EGREP="$ac_cv_path_EGREP"
11927
11928
11929    else
11930      # If it succeeded, then it was overridden by the user. We will use it
11931      # for the tool.
11932
11933      # First remove it from the list of overridden variables, so we can test
11934      # for unknown variables in the end.
11935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11936
11937      # Check if the provided tool contains a complete path.
11938      tool_specified="$EGREP"
11939      tool_basename="${tool_specified##*/}"
11940      if test "x$tool_basename" = "x$tool_specified"; then
11941        # A command without a complete path is provided, search $PATH.
11942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11943$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11944        # Extract the first word of "$tool_basename", so it can be a program name with args.
11945set dummy $tool_basename; ac_word=$2
11946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11947$as_echo_n "checking for $ac_word... " >&6; }
11948if ${ac_cv_path_EGREP+:} false; then :
11949  $as_echo_n "(cached) " >&6
11950else
11951  case $EGREP in
11952  [\\/]* | ?:[\\/]*)
11953  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11954  ;;
11955  *)
11956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11957for as_dir in $PATH
11958do
11959  IFS=$as_save_IFS
11960  test -z "$as_dir" && as_dir=.
11961    for ac_exec_ext in '' $ac_executable_extensions; do
11962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11963    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11965    break 2
11966  fi
11967done
11968  done
11969IFS=$as_save_IFS
11970
11971  ;;
11972esac
11973fi
11974EGREP=$ac_cv_path_EGREP
11975if test -n "$EGREP"; then
11976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11977$as_echo "$EGREP" >&6; }
11978else
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11980$as_echo "no" >&6; }
11981fi
11982
11983
11984        if test "x$EGREP" = x; then
11985          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11986        fi
11987      else
11988        # Otherwise we believe it is a complete path. Use it as it is.
11989        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11990$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11992$as_echo_n "checking for EGREP... " >&6; }
11993        if test ! -x "$tool_specified"; then
11994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11995$as_echo "not found" >&6; }
11996          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11997        fi
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11999$as_echo "$tool_specified" >&6; }
12000      fi
12001    fi
12002  fi
12003
12004
12005  if test "x$EGREP" = x; then
12006    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12007  fi
12008
12009
12010
12011
12012  # Publish this variable in the help.
12013
12014
12015  if test "x$FGREP" = x; then
12016    # The variable is not set by user, try to locate tool using the code snippet
12017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12018$as_echo_n "checking for fgrep... " >&6; }
12019if ${ac_cv_path_FGREP+:} false; then :
12020  $as_echo_n "(cached) " >&6
12021else
12022  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12023   then ac_cv_path_FGREP="$GREP -F"
12024   else
12025     if test -z "$FGREP"; then
12026  ac_path_FGREP_found=false
12027  # Loop through the user's path and test for each of PROGNAME-LIST
12028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12030do
12031  IFS=$as_save_IFS
12032  test -z "$as_dir" && as_dir=.
12033    for ac_prog in fgrep; do
12034    for ac_exec_ext in '' $ac_executable_extensions; do
12035      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12036      as_fn_executable_p "$ac_path_FGREP" || continue
12037# Check for GNU ac_path_FGREP and select it if it is found.
12038  # Check for GNU $ac_path_FGREP
12039case `"$ac_path_FGREP" --version 2>&1` in
12040*GNU*)
12041  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12042*)
12043  ac_count=0
12044  $as_echo_n 0123456789 >"conftest.in"
12045  while :
12046  do
12047    cat "conftest.in" "conftest.in" >"conftest.tmp"
12048    mv "conftest.tmp" "conftest.in"
12049    cp "conftest.in" "conftest.nl"
12050    $as_echo 'FGREP' >> "conftest.nl"
12051    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12052    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12053    as_fn_arith $ac_count + 1 && ac_count=$as_val
12054    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12055      # Best one so far, save it but keep looking for a better one
12056      ac_cv_path_FGREP="$ac_path_FGREP"
12057      ac_path_FGREP_max=$ac_count
12058    fi
12059    # 10*(2^10) chars as input seems more than enough
12060    test $ac_count -gt 10 && break
12061  done
12062  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12063esac
12064
12065      $ac_path_FGREP_found && break 3
12066    done
12067  done
12068  done
12069IFS=$as_save_IFS
12070  if test -z "$ac_cv_path_FGREP"; then
12071    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12072  fi
12073else
12074  ac_cv_path_FGREP=$FGREP
12075fi
12076
12077   fi
12078fi
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12080$as_echo "$ac_cv_path_FGREP" >&6; }
12081 FGREP="$ac_cv_path_FGREP"
12082
12083
12084  else
12085    # The variable is set, but is it from the command line or the environment?
12086
12087    # Try to remove the string !FGREP! from our list.
12088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12090      # If it failed, the variable was not from the command line. Ignore it,
12091      # but warn the user (except for BASH, which is always set by the calling BASH).
12092      if test "xFGREP" != xBASH; then
12093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12094$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12095      fi
12096      # Try to locate tool using the code snippet
12097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12098$as_echo_n "checking for fgrep... " >&6; }
12099if ${ac_cv_path_FGREP+:} false; then :
12100  $as_echo_n "(cached) " >&6
12101else
12102  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12103   then ac_cv_path_FGREP="$GREP -F"
12104   else
12105     if test -z "$FGREP"; then
12106  ac_path_FGREP_found=false
12107  # Loop through the user's path and test for each of PROGNAME-LIST
12108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12110do
12111  IFS=$as_save_IFS
12112  test -z "$as_dir" && as_dir=.
12113    for ac_prog in fgrep; do
12114    for ac_exec_ext in '' $ac_executable_extensions; do
12115      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12116      as_fn_executable_p "$ac_path_FGREP" || continue
12117# Check for GNU ac_path_FGREP and select it if it is found.
12118  # Check for GNU $ac_path_FGREP
12119case `"$ac_path_FGREP" --version 2>&1` in
12120*GNU*)
12121  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12122*)
12123  ac_count=0
12124  $as_echo_n 0123456789 >"conftest.in"
12125  while :
12126  do
12127    cat "conftest.in" "conftest.in" >"conftest.tmp"
12128    mv "conftest.tmp" "conftest.in"
12129    cp "conftest.in" "conftest.nl"
12130    $as_echo 'FGREP' >> "conftest.nl"
12131    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12132    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12133    as_fn_arith $ac_count + 1 && ac_count=$as_val
12134    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12135      # Best one so far, save it but keep looking for a better one
12136      ac_cv_path_FGREP="$ac_path_FGREP"
12137      ac_path_FGREP_max=$ac_count
12138    fi
12139    # 10*(2^10) chars as input seems more than enough
12140    test $ac_count -gt 10 && break
12141  done
12142  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12143esac
12144
12145      $ac_path_FGREP_found && break 3
12146    done
12147  done
12148  done
12149IFS=$as_save_IFS
12150  if test -z "$ac_cv_path_FGREP"; then
12151    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12152  fi
12153else
12154  ac_cv_path_FGREP=$FGREP
12155fi
12156
12157   fi
12158fi
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12160$as_echo "$ac_cv_path_FGREP" >&6; }
12161 FGREP="$ac_cv_path_FGREP"
12162
12163
12164    else
12165      # If it succeeded, then it was overridden by the user. We will use it
12166      # for the tool.
12167
12168      # First remove it from the list of overridden variables, so we can test
12169      # for unknown variables in the end.
12170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12171
12172      # Check if the provided tool contains a complete path.
12173      tool_specified="$FGREP"
12174      tool_basename="${tool_specified##*/}"
12175      if test "x$tool_basename" = "x$tool_specified"; then
12176        # A command without a complete path is provided, search $PATH.
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12178$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12179        # Extract the first word of "$tool_basename", so it can be a program name with args.
12180set dummy $tool_basename; ac_word=$2
12181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12182$as_echo_n "checking for $ac_word... " >&6; }
12183if ${ac_cv_path_FGREP+:} false; then :
12184  $as_echo_n "(cached) " >&6
12185else
12186  case $FGREP in
12187  [\\/]* | ?:[\\/]*)
12188  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12189  ;;
12190  *)
12191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12192for as_dir in $PATH
12193do
12194  IFS=$as_save_IFS
12195  test -z "$as_dir" && as_dir=.
12196    for ac_exec_ext in '' $ac_executable_extensions; do
12197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12198    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12200    break 2
12201  fi
12202done
12203  done
12204IFS=$as_save_IFS
12205
12206  ;;
12207esac
12208fi
12209FGREP=$ac_cv_path_FGREP
12210if test -n "$FGREP"; then
12211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12212$as_echo "$FGREP" >&6; }
12213else
12214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12215$as_echo "no" >&6; }
12216fi
12217
12218
12219        if test "x$FGREP" = x; then
12220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12221        fi
12222      else
12223        # Otherwise we believe it is a complete path. Use it as it is.
12224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12225$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12227$as_echo_n "checking for FGREP... " >&6; }
12228        if test ! -x "$tool_specified"; then
12229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12230$as_echo "not found" >&6; }
12231          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12232        fi
12233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12234$as_echo "$tool_specified" >&6; }
12235      fi
12236    fi
12237  fi
12238
12239
12240  if test "x$FGREP" = x; then
12241    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12242  fi
12243
12244
12245
12246
12247  # Publish this variable in the help.
12248
12249
12250  if test "x$SED" = x; then
12251    # The variable is not set by user, try to locate tool using the code snippet
12252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12253$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12254if ${ac_cv_path_SED+:} false; then :
12255  $as_echo_n "(cached) " >&6
12256else
12257            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12258     for ac_i in 1 2 3 4 5 6 7; do
12259       ac_script="$ac_script$as_nl$ac_script"
12260     done
12261     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12262     { ac_script=; unset ac_script;}
12263     if test -z "$SED"; then
12264  ac_path_SED_found=false
12265  # Loop through the user's path and test for each of PROGNAME-LIST
12266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12267for as_dir in $PATH
12268do
12269  IFS=$as_save_IFS
12270  test -z "$as_dir" && as_dir=.
12271    for ac_prog in sed gsed; do
12272    for ac_exec_ext in '' $ac_executable_extensions; do
12273      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12274      as_fn_executable_p "$ac_path_SED" || continue
12275# Check for GNU ac_path_SED and select it if it is found.
12276  # Check for GNU $ac_path_SED
12277case `"$ac_path_SED" --version 2>&1` in
12278*GNU*)
12279  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12280*)
12281  ac_count=0
12282  $as_echo_n 0123456789 >"conftest.in"
12283  while :
12284  do
12285    cat "conftest.in" "conftest.in" >"conftest.tmp"
12286    mv "conftest.tmp" "conftest.in"
12287    cp "conftest.in" "conftest.nl"
12288    $as_echo '' >> "conftest.nl"
12289    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12290    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12291    as_fn_arith $ac_count + 1 && ac_count=$as_val
12292    if test $ac_count -gt ${ac_path_SED_max-0}; then
12293      # Best one so far, save it but keep looking for a better one
12294      ac_cv_path_SED="$ac_path_SED"
12295      ac_path_SED_max=$ac_count
12296    fi
12297    # 10*(2^10) chars as input seems more than enough
12298    test $ac_count -gt 10 && break
12299  done
12300  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12301esac
12302
12303      $ac_path_SED_found && break 3
12304    done
12305  done
12306  done
12307IFS=$as_save_IFS
12308  if test -z "$ac_cv_path_SED"; then
12309    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12310  fi
12311else
12312  ac_cv_path_SED=$SED
12313fi
12314
12315fi
12316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12317$as_echo "$ac_cv_path_SED" >&6; }
12318 SED="$ac_cv_path_SED"
12319  rm -f conftest.sed
12320
12321  else
12322    # The variable is set, but is it from the command line or the environment?
12323
12324    # Try to remove the string !SED! from our list.
12325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12327      # If it failed, the variable was not from the command line. Ignore it,
12328      # but warn the user (except for BASH, which is always set by the calling BASH).
12329      if test "xSED" != xBASH; then
12330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12331$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12332      fi
12333      # Try to locate tool using the code snippet
12334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12335$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12336if ${ac_cv_path_SED+:} false; then :
12337  $as_echo_n "(cached) " >&6
12338else
12339            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12340     for ac_i in 1 2 3 4 5 6 7; do
12341       ac_script="$ac_script$as_nl$ac_script"
12342     done
12343     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12344     { ac_script=; unset ac_script;}
12345     if test -z "$SED"; then
12346  ac_path_SED_found=false
12347  # Loop through the user's path and test for each of PROGNAME-LIST
12348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12349for as_dir in $PATH
12350do
12351  IFS=$as_save_IFS
12352  test -z "$as_dir" && as_dir=.
12353    for ac_prog in sed gsed; do
12354    for ac_exec_ext in '' $ac_executable_extensions; do
12355      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12356      as_fn_executable_p "$ac_path_SED" || continue
12357# Check for GNU ac_path_SED and select it if it is found.
12358  # Check for GNU $ac_path_SED
12359case `"$ac_path_SED" --version 2>&1` in
12360*GNU*)
12361  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12362*)
12363  ac_count=0
12364  $as_echo_n 0123456789 >"conftest.in"
12365  while :
12366  do
12367    cat "conftest.in" "conftest.in" >"conftest.tmp"
12368    mv "conftest.tmp" "conftest.in"
12369    cp "conftest.in" "conftest.nl"
12370    $as_echo '' >> "conftest.nl"
12371    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12372    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12373    as_fn_arith $ac_count + 1 && ac_count=$as_val
12374    if test $ac_count -gt ${ac_path_SED_max-0}; then
12375      # Best one so far, save it but keep looking for a better one
12376      ac_cv_path_SED="$ac_path_SED"
12377      ac_path_SED_max=$ac_count
12378    fi
12379    # 10*(2^10) chars as input seems more than enough
12380    test $ac_count -gt 10 && break
12381  done
12382  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12383esac
12384
12385      $ac_path_SED_found && break 3
12386    done
12387  done
12388  done
12389IFS=$as_save_IFS
12390  if test -z "$ac_cv_path_SED"; then
12391    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12392  fi
12393else
12394  ac_cv_path_SED=$SED
12395fi
12396
12397fi
12398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12399$as_echo "$ac_cv_path_SED" >&6; }
12400 SED="$ac_cv_path_SED"
12401  rm -f conftest.sed
12402
12403    else
12404      # If it succeeded, then it was overridden by the user. We will use it
12405      # for the tool.
12406
12407      # First remove it from the list of overridden variables, so we can test
12408      # for unknown variables in the end.
12409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12410
12411      # Check if the provided tool contains a complete path.
12412      tool_specified="$SED"
12413      tool_basename="${tool_specified##*/}"
12414      if test "x$tool_basename" = "x$tool_specified"; then
12415        # A command without a complete path is provided, search $PATH.
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12417$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12418        # Extract the first word of "$tool_basename", so it can be a program name with args.
12419set dummy $tool_basename; ac_word=$2
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12421$as_echo_n "checking for $ac_word... " >&6; }
12422if ${ac_cv_path_SED+:} false; then :
12423  $as_echo_n "(cached) " >&6
12424else
12425  case $SED in
12426  [\\/]* | ?:[\\/]*)
12427  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12428  ;;
12429  *)
12430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12431for as_dir in $PATH
12432do
12433  IFS=$as_save_IFS
12434  test -z "$as_dir" && as_dir=.
12435    for ac_exec_ext in '' $ac_executable_extensions; do
12436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12437    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12439    break 2
12440  fi
12441done
12442  done
12443IFS=$as_save_IFS
12444
12445  ;;
12446esac
12447fi
12448SED=$ac_cv_path_SED
12449if test -n "$SED"; then
12450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12451$as_echo "$SED" >&6; }
12452else
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454$as_echo "no" >&6; }
12455fi
12456
12457
12458        if test "x$SED" = x; then
12459          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12460        fi
12461      else
12462        # Otherwise we believe it is a complete path. Use it as it is.
12463        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12464$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12466$as_echo_n "checking for SED... " >&6; }
12467        if test ! -x "$tool_specified"; then
12468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12469$as_echo "not found" >&6; }
12470          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12471        fi
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12473$as_echo "$tool_specified" >&6; }
12474      fi
12475    fi
12476  fi
12477
12478
12479  if test "x$SED" = x; then
12480    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12481  fi
12482
12483
12484
12485  # Always force rm.
12486  RM="$RM -f"
12487
12488  # pwd behaves differently on various platforms and some don't support the -L flag.
12489  # Always use the bash builtin pwd to get uniform behavior.
12490  THEPWDCMD=pwd
12491
12492  # These are not required on all platforms
12493
12494
12495  # Publish this variable in the help.
12496
12497
12498  if test "x$CYGPATH" = x; then
12499    # The variable is not set by user, try to locate tool using the code snippet
12500    for ac_prog in cygpath
12501do
12502  # Extract the first word of "$ac_prog", so it can be a program name with args.
12503set dummy $ac_prog; ac_word=$2
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12505$as_echo_n "checking for $ac_word... " >&6; }
12506if ${ac_cv_path_CYGPATH+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  case $CYGPATH in
12510  [\\/]* | ?:[\\/]*)
12511  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12512  ;;
12513  *)
12514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12515for as_dir in $PATH
12516do
12517  IFS=$as_save_IFS
12518  test -z "$as_dir" && as_dir=.
12519    for ac_exec_ext in '' $ac_executable_extensions; do
12520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12521    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12523    break 2
12524  fi
12525done
12526  done
12527IFS=$as_save_IFS
12528
12529  ;;
12530esac
12531fi
12532CYGPATH=$ac_cv_path_CYGPATH
12533if test -n "$CYGPATH"; then
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12535$as_echo "$CYGPATH" >&6; }
12536else
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
12539fi
12540
12541
12542  test -n "$CYGPATH" && break
12543done
12544
12545  else
12546    # The variable is set, but is it from the command line or the environment?
12547
12548    # Try to remove the string !CYGPATH! from our list.
12549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12551      # If it failed, the variable was not from the command line. Ignore it,
12552      # but warn the user (except for BASH, which is always set by the calling BASH).
12553      if test "xCYGPATH" != xBASH; then
12554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12555$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12556      fi
12557      # Try to locate tool using the code snippet
12558      for ac_prog in cygpath
12559do
12560  # Extract the first word of "$ac_prog", so it can be a program name with args.
12561set dummy $ac_prog; ac_word=$2
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12563$as_echo_n "checking for $ac_word... " >&6; }
12564if ${ac_cv_path_CYGPATH+:} false; then :
12565  $as_echo_n "(cached) " >&6
12566else
12567  case $CYGPATH in
12568  [\\/]* | ?:[\\/]*)
12569  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12570  ;;
12571  *)
12572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12573for as_dir in $PATH
12574do
12575  IFS=$as_save_IFS
12576  test -z "$as_dir" && as_dir=.
12577    for ac_exec_ext in '' $ac_executable_extensions; do
12578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12579    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12581    break 2
12582  fi
12583done
12584  done
12585IFS=$as_save_IFS
12586
12587  ;;
12588esac
12589fi
12590CYGPATH=$ac_cv_path_CYGPATH
12591if test -n "$CYGPATH"; then
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12593$as_echo "$CYGPATH" >&6; }
12594else
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598
12599
12600  test -n "$CYGPATH" && break
12601done
12602
12603    else
12604      # If it succeeded, then it was overridden by the user. We will use it
12605      # for the tool.
12606
12607      # First remove it from the list of overridden variables, so we can test
12608      # for unknown variables in the end.
12609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12610
12611      # Check if the provided tool contains a complete path.
12612      tool_specified="$CYGPATH"
12613      tool_basename="${tool_specified##*/}"
12614      if test "x$tool_basename" = "x$tool_specified"; then
12615        # A command without a complete path is provided, search $PATH.
12616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12617$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12618        # Extract the first word of "$tool_basename", so it can be a program name with args.
12619set dummy $tool_basename; ac_word=$2
12620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12621$as_echo_n "checking for $ac_word... " >&6; }
12622if ${ac_cv_path_CYGPATH+:} false; then :
12623  $as_echo_n "(cached) " >&6
12624else
12625  case $CYGPATH in
12626  [\\/]* | ?:[\\/]*)
12627  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12628  ;;
12629  *)
12630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12631for as_dir in $PATH
12632do
12633  IFS=$as_save_IFS
12634  test -z "$as_dir" && as_dir=.
12635    for ac_exec_ext in '' $ac_executable_extensions; do
12636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12637    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12639    break 2
12640  fi
12641done
12642  done
12643IFS=$as_save_IFS
12644
12645  ;;
12646esac
12647fi
12648CYGPATH=$ac_cv_path_CYGPATH
12649if test -n "$CYGPATH"; then
12650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12651$as_echo "$CYGPATH" >&6; }
12652else
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12654$as_echo "no" >&6; }
12655fi
12656
12657
12658        if test "x$CYGPATH" = x; then
12659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12660        fi
12661      else
12662        # Otherwise we believe it is a complete path. Use it as it is.
12663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12664$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12666$as_echo_n "checking for CYGPATH... " >&6; }
12667        if test ! -x "$tool_specified"; then
12668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12669$as_echo "not found" >&6; }
12670          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12671        fi
12672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12673$as_echo "$tool_specified" >&6; }
12674      fi
12675    fi
12676  fi
12677
12678
12679
12680
12681  # Publish this variable in the help.
12682
12683
12684  if test "x$READLINK" = x; then
12685    # The variable is not set by user, try to locate tool using the code snippet
12686    for ac_prog in greadlink readlink
12687do
12688  # Extract the first word of "$ac_prog", so it can be a program name with args.
12689set dummy $ac_prog; ac_word=$2
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12691$as_echo_n "checking for $ac_word... " >&6; }
12692if ${ac_cv_path_READLINK+:} false; then :
12693  $as_echo_n "(cached) " >&6
12694else
12695  case $READLINK in
12696  [\\/]* | ?:[\\/]*)
12697  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12698  ;;
12699  *)
12700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715  ;;
12716esac
12717fi
12718READLINK=$ac_cv_path_READLINK
12719if test -n "$READLINK"; then
12720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12721$as_echo "$READLINK" >&6; }
12722else
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
12725fi
12726
12727
12728  test -n "$READLINK" && break
12729done
12730
12731  else
12732    # The variable is set, but is it from the command line or the environment?
12733
12734    # Try to remove the string !READLINK! from our list.
12735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12737      # If it failed, the variable was not from the command line. Ignore it,
12738      # but warn the user (except for BASH, which is always set by the calling BASH).
12739      if test "xREADLINK" != xBASH; then
12740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12741$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12742      fi
12743      # Try to locate tool using the code snippet
12744      for ac_prog in greadlink readlink
12745do
12746  # Extract the first word of "$ac_prog", so it can be a program name with args.
12747set dummy $ac_prog; ac_word=$2
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12749$as_echo_n "checking for $ac_word... " >&6; }
12750if ${ac_cv_path_READLINK+:} false; then :
12751  $as_echo_n "(cached) " >&6
12752else
12753  case $READLINK in
12754  [\\/]* | ?:[\\/]*)
12755  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12756  ;;
12757  *)
12758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12759for as_dir in $PATH
12760do
12761  IFS=$as_save_IFS
12762  test -z "$as_dir" && as_dir=.
12763    for ac_exec_ext in '' $ac_executable_extensions; do
12764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12765    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12767    break 2
12768  fi
12769done
12770  done
12771IFS=$as_save_IFS
12772
12773  ;;
12774esac
12775fi
12776READLINK=$ac_cv_path_READLINK
12777if test -n "$READLINK"; then
12778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12779$as_echo "$READLINK" >&6; }
12780else
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12782$as_echo "no" >&6; }
12783fi
12784
12785
12786  test -n "$READLINK" && break
12787done
12788
12789    else
12790      # If it succeeded, then it was overridden by the user. We will use it
12791      # for the tool.
12792
12793      # First remove it from the list of overridden variables, so we can test
12794      # for unknown variables in the end.
12795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12796
12797      # Check if the provided tool contains a complete path.
12798      tool_specified="$READLINK"
12799      tool_basename="${tool_specified##*/}"
12800      if test "x$tool_basename" = "x$tool_specified"; then
12801        # A command without a complete path is provided, search $PATH.
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12803$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12804        # Extract the first word of "$tool_basename", so it can be a program name with args.
12805set dummy $tool_basename; ac_word=$2
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12807$as_echo_n "checking for $ac_word... " >&6; }
12808if ${ac_cv_path_READLINK+:} false; then :
12809  $as_echo_n "(cached) " >&6
12810else
12811  case $READLINK in
12812  [\\/]* | ?:[\\/]*)
12813  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12814  ;;
12815  *)
12816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12817for as_dir in $PATH
12818do
12819  IFS=$as_save_IFS
12820  test -z "$as_dir" && as_dir=.
12821    for ac_exec_ext in '' $ac_executable_extensions; do
12822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12823    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12825    break 2
12826  fi
12827done
12828  done
12829IFS=$as_save_IFS
12830
12831  ;;
12832esac
12833fi
12834READLINK=$ac_cv_path_READLINK
12835if test -n "$READLINK"; then
12836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12837$as_echo "$READLINK" >&6; }
12838else
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12840$as_echo "no" >&6; }
12841fi
12842
12843
12844        if test "x$READLINK" = x; then
12845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12846        fi
12847      else
12848        # Otherwise we believe it is a complete path. Use it as it is.
12849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12850$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12852$as_echo_n "checking for READLINK... " >&6; }
12853        if test ! -x "$tool_specified"; then
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12855$as_echo "not found" >&6; }
12856          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12857        fi
12858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12859$as_echo "$tool_specified" >&6; }
12860      fi
12861    fi
12862  fi
12863
12864
12865
12866
12867  # Publish this variable in the help.
12868
12869
12870  if test "x$DF" = x; then
12871    # The variable is not set by user, try to locate tool using the code snippet
12872    for ac_prog in df
12873do
12874  # Extract the first word of "$ac_prog", so it can be a program name with args.
12875set dummy $ac_prog; ac_word=$2
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12877$as_echo_n "checking for $ac_word... " >&6; }
12878if ${ac_cv_path_DF+:} false; then :
12879  $as_echo_n "(cached) " >&6
12880else
12881  case $DF in
12882  [\\/]* | ?:[\\/]*)
12883  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12884  ;;
12885  *)
12886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12887for as_dir in $PATH
12888do
12889  IFS=$as_save_IFS
12890  test -z "$as_dir" && as_dir=.
12891    for ac_exec_ext in '' $ac_executable_extensions; do
12892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12893    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12895    break 2
12896  fi
12897done
12898  done
12899IFS=$as_save_IFS
12900
12901  ;;
12902esac
12903fi
12904DF=$ac_cv_path_DF
12905if test -n "$DF"; then
12906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12907$as_echo "$DF" >&6; }
12908else
12909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12910$as_echo "no" >&6; }
12911fi
12912
12913
12914  test -n "$DF" && break
12915done
12916
12917  else
12918    # The variable is set, but is it from the command line or the environment?
12919
12920    # Try to remove the string !DF! from our list.
12921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12923      # If it failed, the variable was not from the command line. Ignore it,
12924      # but warn the user (except for BASH, which is always set by the calling BASH).
12925      if test "xDF" != xBASH; then
12926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12927$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12928      fi
12929      # Try to locate tool using the code snippet
12930      for ac_prog in df
12931do
12932  # Extract the first word of "$ac_prog", so it can be a program name with args.
12933set dummy $ac_prog; ac_word=$2
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12935$as_echo_n "checking for $ac_word... " >&6; }
12936if ${ac_cv_path_DF+:} false; then :
12937  $as_echo_n "(cached) " >&6
12938else
12939  case $DF in
12940  [\\/]* | ?:[\\/]*)
12941  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12942  ;;
12943  *)
12944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12945for as_dir in $PATH
12946do
12947  IFS=$as_save_IFS
12948  test -z "$as_dir" && as_dir=.
12949    for ac_exec_ext in '' $ac_executable_extensions; do
12950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12951    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12953    break 2
12954  fi
12955done
12956  done
12957IFS=$as_save_IFS
12958
12959  ;;
12960esac
12961fi
12962DF=$ac_cv_path_DF
12963if test -n "$DF"; then
12964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12965$as_echo "$DF" >&6; }
12966else
12967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12968$as_echo "no" >&6; }
12969fi
12970
12971
12972  test -n "$DF" && break
12973done
12974
12975    else
12976      # If it succeeded, then it was overridden by the user. We will use it
12977      # for the tool.
12978
12979      # First remove it from the list of overridden variables, so we can test
12980      # for unknown variables in the end.
12981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12982
12983      # Check if the provided tool contains a complete path.
12984      tool_specified="$DF"
12985      tool_basename="${tool_specified##*/}"
12986      if test "x$tool_basename" = "x$tool_specified"; then
12987        # A command without a complete path is provided, search $PATH.
12988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12989$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12990        # Extract the first word of "$tool_basename", so it can be a program name with args.
12991set dummy $tool_basename; ac_word=$2
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12993$as_echo_n "checking for $ac_word... " >&6; }
12994if ${ac_cv_path_DF+:} false; then :
12995  $as_echo_n "(cached) " >&6
12996else
12997  case $DF in
12998  [\\/]* | ?:[\\/]*)
12999  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13000  ;;
13001  *)
13002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13003for as_dir in $PATH
13004do
13005  IFS=$as_save_IFS
13006  test -z "$as_dir" && as_dir=.
13007    for ac_exec_ext in '' $ac_executable_extensions; do
13008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13009    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13011    break 2
13012  fi
13013done
13014  done
13015IFS=$as_save_IFS
13016
13017  ;;
13018esac
13019fi
13020DF=$ac_cv_path_DF
13021if test -n "$DF"; then
13022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13023$as_echo "$DF" >&6; }
13024else
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13026$as_echo "no" >&6; }
13027fi
13028
13029
13030        if test "x$DF" = x; then
13031          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13032        fi
13033      else
13034        # Otherwise we believe it is a complete path. Use it as it is.
13035        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13036$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13038$as_echo_n "checking for DF... " >&6; }
13039        if test ! -x "$tool_specified"; then
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13041$as_echo "not found" >&6; }
13042          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13043        fi
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13045$as_echo "$tool_specified" >&6; }
13046      fi
13047    fi
13048  fi
13049
13050
13051
13052
13053  # Publish this variable in the help.
13054
13055
13056  if test "x$SETFILE" = x; then
13057    # The variable is not set by user, try to locate tool using the code snippet
13058    for ac_prog in SetFile
13059do
13060  # Extract the first word of "$ac_prog", so it can be a program name with args.
13061set dummy $ac_prog; ac_word=$2
13062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13063$as_echo_n "checking for $ac_word... " >&6; }
13064if ${ac_cv_path_SETFILE+:} false; then :
13065  $as_echo_n "(cached) " >&6
13066else
13067  case $SETFILE in
13068  [\\/]* | ?:[\\/]*)
13069  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13070  ;;
13071  *)
13072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13073for as_dir in $PATH
13074do
13075  IFS=$as_save_IFS
13076  test -z "$as_dir" && as_dir=.
13077    for ac_exec_ext in '' $ac_executable_extensions; do
13078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13079    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13081    break 2
13082  fi
13083done
13084  done
13085IFS=$as_save_IFS
13086
13087  ;;
13088esac
13089fi
13090SETFILE=$ac_cv_path_SETFILE
13091if test -n "$SETFILE"; then
13092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13093$as_echo "$SETFILE" >&6; }
13094else
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13096$as_echo "no" >&6; }
13097fi
13098
13099
13100  test -n "$SETFILE" && break
13101done
13102
13103  else
13104    # The variable is set, but is it from the command line or the environment?
13105
13106    # Try to remove the string !SETFILE! from our list.
13107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13109      # If it failed, the variable was not from the command line. Ignore it,
13110      # but warn the user (except for BASH, which is always set by the calling BASH).
13111      if test "xSETFILE" != xBASH; then
13112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13113$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13114      fi
13115      # Try to locate tool using the code snippet
13116      for ac_prog in SetFile
13117do
13118  # Extract the first word of "$ac_prog", so it can be a program name with args.
13119set dummy $ac_prog; ac_word=$2
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13121$as_echo_n "checking for $ac_word... " >&6; }
13122if ${ac_cv_path_SETFILE+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125  case $SETFILE in
13126  [\\/]* | ?:[\\/]*)
13127  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13128  ;;
13129  *)
13130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145  ;;
13146esac
13147fi
13148SETFILE=$ac_cv_path_SETFILE
13149if test -n "$SETFILE"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13151$as_echo "$SETFILE" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158  test -n "$SETFILE" && break
13159done
13160
13161    else
13162      # If it succeeded, then it was overridden by the user. We will use it
13163      # for the tool.
13164
13165      # First remove it from the list of overridden variables, so we can test
13166      # for unknown variables in the end.
13167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13168
13169      # Check if the provided tool contains a complete path.
13170      tool_specified="$SETFILE"
13171      tool_basename="${tool_specified##*/}"
13172      if test "x$tool_basename" = "x$tool_specified"; then
13173        # A command without a complete path is provided, search $PATH.
13174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13175$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13176        # Extract the first word of "$tool_basename", so it can be a program name with args.
13177set dummy $tool_basename; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_path_SETFILE+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  case $SETFILE in
13184  [\\/]* | ?:[\\/]*)
13185  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13186  ;;
13187  *)
13188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189for as_dir in $PATH
13190do
13191  IFS=$as_save_IFS
13192  test -z "$as_dir" && as_dir=.
13193    for ac_exec_ext in '' $ac_executable_extensions; do
13194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13195    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13197    break 2
13198  fi
13199done
13200  done
13201IFS=$as_save_IFS
13202
13203  ;;
13204esac
13205fi
13206SETFILE=$ac_cv_path_SETFILE
13207if test -n "$SETFILE"; then
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13209$as_echo "$SETFILE" >&6; }
13210else
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
13213fi
13214
13215
13216        if test "x$SETFILE" = x; then
13217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13218        fi
13219      else
13220        # Otherwise we believe it is a complete path. Use it as it is.
13221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13222$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13224$as_echo_n "checking for SETFILE... " >&6; }
13225        if test ! -x "$tool_specified"; then
13226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13227$as_echo "not found" >&6; }
13228          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13229        fi
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13231$as_echo "$tool_specified" >&6; }
13232      fi
13233    fi
13234  fi
13235
13236
13237
13238
13239  # Publish this variable in the help.
13240
13241
13242  if test "x$CPIO" = x; then
13243    # The variable is not set by user, try to locate tool using the code snippet
13244    for ac_prog in cpio bsdcpio
13245do
13246  # Extract the first word of "$ac_prog", so it can be a program name with args.
13247set dummy $ac_prog; ac_word=$2
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13249$as_echo_n "checking for $ac_word... " >&6; }
13250if ${ac_cv_path_CPIO+:} false; then :
13251  $as_echo_n "(cached) " >&6
13252else
13253  case $CPIO in
13254  [\\/]* | ?:[\\/]*)
13255  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13256  ;;
13257  *)
13258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13259for as_dir in $PATH
13260do
13261  IFS=$as_save_IFS
13262  test -z "$as_dir" && as_dir=.
13263    for ac_exec_ext in '' $ac_executable_extensions; do
13264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13265    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13267    break 2
13268  fi
13269done
13270  done
13271IFS=$as_save_IFS
13272
13273  ;;
13274esac
13275fi
13276CPIO=$ac_cv_path_CPIO
13277if test -n "$CPIO"; then
13278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13279$as_echo "$CPIO" >&6; }
13280else
13281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13282$as_echo "no" >&6; }
13283fi
13284
13285
13286  test -n "$CPIO" && break
13287done
13288
13289  else
13290    # The variable is set, but is it from the command line or the environment?
13291
13292    # Try to remove the string !CPIO! from our list.
13293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13295      # If it failed, the variable was not from the command line. Ignore it,
13296      # but warn the user (except for BASH, which is always set by the calling BASH).
13297      if test "xCPIO" != xBASH; then
13298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13299$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13300      fi
13301      # Try to locate tool using the code snippet
13302      for ac_prog in cpio bsdcpio
13303do
13304  # Extract the first word of "$ac_prog", so it can be a program name with args.
13305set dummy $ac_prog; ac_word=$2
13306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13307$as_echo_n "checking for $ac_word... " >&6; }
13308if ${ac_cv_path_CPIO+:} false; then :
13309  $as_echo_n "(cached) " >&6
13310else
13311  case $CPIO in
13312  [\\/]* | ?:[\\/]*)
13313  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13314  ;;
13315  *)
13316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13317for as_dir in $PATH
13318do
13319  IFS=$as_save_IFS
13320  test -z "$as_dir" && as_dir=.
13321    for ac_exec_ext in '' $ac_executable_extensions; do
13322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13323    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13325    break 2
13326  fi
13327done
13328  done
13329IFS=$as_save_IFS
13330
13331  ;;
13332esac
13333fi
13334CPIO=$ac_cv_path_CPIO
13335if test -n "$CPIO"; then
13336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13337$as_echo "$CPIO" >&6; }
13338else
13339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13340$as_echo "no" >&6; }
13341fi
13342
13343
13344  test -n "$CPIO" && break
13345done
13346
13347    else
13348      # If it succeeded, then it was overridden by the user. We will use it
13349      # for the tool.
13350
13351      # First remove it from the list of overridden variables, so we can test
13352      # for unknown variables in the end.
13353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13354
13355      # Check if the provided tool contains a complete path.
13356      tool_specified="$CPIO"
13357      tool_basename="${tool_specified##*/}"
13358      if test "x$tool_basename" = "x$tool_specified"; then
13359        # A command without a complete path is provided, search $PATH.
13360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13361$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13362        # Extract the first word of "$tool_basename", so it can be a program name with args.
13363set dummy $tool_basename; ac_word=$2
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13365$as_echo_n "checking for $ac_word... " >&6; }
13366if ${ac_cv_path_CPIO+:} false; then :
13367  $as_echo_n "(cached) " >&6
13368else
13369  case $CPIO in
13370  [\\/]* | ?:[\\/]*)
13371  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13372  ;;
13373  *)
13374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13375for as_dir in $PATH
13376do
13377  IFS=$as_save_IFS
13378  test -z "$as_dir" && as_dir=.
13379    for ac_exec_ext in '' $ac_executable_extensions; do
13380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13381    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13383    break 2
13384  fi
13385done
13386  done
13387IFS=$as_save_IFS
13388
13389  ;;
13390esac
13391fi
13392CPIO=$ac_cv_path_CPIO
13393if test -n "$CPIO"; then
13394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13395$as_echo "$CPIO" >&6; }
13396else
13397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13398$as_echo "no" >&6; }
13399fi
13400
13401
13402        if test "x$CPIO" = x; then
13403          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13404        fi
13405      else
13406        # Otherwise we believe it is a complete path. Use it as it is.
13407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13408$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13410$as_echo_n "checking for CPIO... " >&6; }
13411        if test ! -x "$tool_specified"; then
13412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13413$as_echo "not found" >&6; }
13414          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13415        fi
13416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13417$as_echo "$tool_specified" >&6; }
13418      fi
13419    fi
13420  fi
13421
13422
13423
13424
13425# Now we can determine OpenJDK build and target platforms. This is required to
13426# have early on.
13427# Make sure we can run config.sub.
13428$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13429  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13430
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13432$as_echo_n "checking build system type... " >&6; }
13433if ${ac_cv_build+:} false; then :
13434  $as_echo_n "(cached) " >&6
13435else
13436  ac_build_alias=$build_alias
13437test "x$ac_build_alias" = x &&
13438  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13439test "x$ac_build_alias" = x &&
13440  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13441ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13442  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13443
13444fi
13445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13446$as_echo "$ac_cv_build" >&6; }
13447case $ac_cv_build in
13448*-*-*) ;;
13449*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13450esac
13451build=$ac_cv_build
13452ac_save_IFS=$IFS; IFS='-'
13453set x $ac_cv_build
13454shift
13455build_cpu=$1
13456build_vendor=$2
13457shift; shift
13458# Remember, the first character of IFS is used to create $*,
13459# except with old shells:
13460build_os=$*
13461IFS=$ac_save_IFS
13462case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13463
13464
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13466$as_echo_n "checking host system type... " >&6; }
13467if ${ac_cv_host+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  if test "x$host_alias" = x; then
13471  ac_cv_host=$ac_cv_build
13472else
13473  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13474    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13475fi
13476
13477fi
13478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13479$as_echo "$ac_cv_host" >&6; }
13480case $ac_cv_host in
13481*-*-*) ;;
13482*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13483esac
13484host=$ac_cv_host
13485ac_save_IFS=$IFS; IFS='-'
13486set x $ac_cv_host
13487shift
13488host_cpu=$1
13489host_vendor=$2
13490shift; shift
13491# Remember, the first character of IFS is used to create $*,
13492# except with old shells:
13493host_os=$*
13494IFS=$ac_save_IFS
13495case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13496
13497
13498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13499$as_echo_n "checking target system type... " >&6; }
13500if ${ac_cv_target+:} false; then :
13501  $as_echo_n "(cached) " >&6
13502else
13503  if test "x$target_alias" = x; then
13504  ac_cv_target=$ac_cv_host
13505else
13506  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13507    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13508fi
13509
13510fi
13511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13512$as_echo "$ac_cv_target" >&6; }
13513case $ac_cv_target in
13514*-*-*) ;;
13515*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13516esac
13517target=$ac_cv_target
13518ac_save_IFS=$IFS; IFS='-'
13519set x $ac_cv_target
13520shift
13521target_cpu=$1
13522target_vendor=$2
13523shift; shift
13524# Remember, the first character of IFS is used to create $*,
13525# except with old shells:
13526target_os=$*
13527IFS=$ac_save_IFS
13528case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13529
13530
13531# The aliases save the names the user supplied, while $host etc.
13532# will get canonicalized.
13533test -n "$target_alias" &&
13534  test "$program_prefix$program_suffix$program_transform_name" = \
13535    NONENONEs,x,x, &&
13536  program_prefix=${target_alias}-
13537
13538  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13539  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13540  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13541  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13542  # to use the configure naming style.
13543
13544
13545
13546
13547
13548  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13549  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13550  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13551  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13552  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13553  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13554
13555
13556
13557  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13558
13559  case "$build_os" in
13560    *linux*)
13561      VAR_OS=linux
13562      VAR_OS_TYPE=unix
13563      ;;
13564    *solaris*)
13565      VAR_OS=solaris
13566      VAR_OS_TYPE=unix
13567      ;;
13568    *darwin*)
13569      VAR_OS=macosx
13570      VAR_OS_TYPE=unix
13571      ;;
13572    *bsd*)
13573      VAR_OS=bsd
13574      VAR_OS_TYPE=unix
13575      ;;
13576    *cygwin*)
13577      VAR_OS=windows
13578      VAR_OS_ENV=windows.cygwin
13579      ;;
13580    *mingw*)
13581      VAR_OS=windows
13582      VAR_OS_ENV=windows.msys
13583      ;;
13584    *aix*)
13585      VAR_OS=aix
13586      VAR_OS_TYPE=unix
13587      ;;
13588    *)
13589      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13590      ;;
13591  esac
13592
13593
13594  # First argument is the cpu name from the trip/quad
13595  case "$build_cpu" in
13596    x86_64)
13597      VAR_CPU=x86_64
13598      VAR_CPU_ARCH=x86
13599      VAR_CPU_BITS=64
13600      VAR_CPU_ENDIAN=little
13601      ;;
13602    i?86)
13603      VAR_CPU=x86
13604      VAR_CPU_ARCH=x86
13605      VAR_CPU_BITS=32
13606      VAR_CPU_ENDIAN=little
13607      ;;
13608    arm*)
13609      VAR_CPU=arm
13610      VAR_CPU_ARCH=arm
13611      VAR_CPU_BITS=32
13612      VAR_CPU_ENDIAN=little
13613      ;;
13614    aarch64)
13615      VAR_CPU=aarch64
13616      VAR_CPU_ARCH=aarch64
13617      VAR_CPU_BITS=64
13618      VAR_CPU_ENDIAN=little
13619      ;;
13620    powerpc)
13621      VAR_CPU=ppc
13622      VAR_CPU_ARCH=ppc
13623      VAR_CPU_BITS=32
13624      VAR_CPU_ENDIAN=big
13625      ;;
13626    powerpc64)
13627      VAR_CPU=ppc64
13628      VAR_CPU_ARCH=ppc
13629      VAR_CPU_BITS=64
13630      VAR_CPU_ENDIAN=big
13631      ;;
13632    powerpc64le)
13633      VAR_CPU=ppc64
13634      VAR_CPU_ARCH=ppc
13635      VAR_CPU_BITS=64
13636      VAR_CPU_ENDIAN=little
13637      ;;
13638    s390)
13639      VAR_CPU=s390
13640      VAR_CPU_ARCH=s390
13641      VAR_CPU_BITS=32
13642      VAR_CPU_ENDIAN=big
13643      ;;
13644    s390x)
13645      VAR_CPU=s390x
13646      VAR_CPU_ARCH=s390
13647      VAR_CPU_BITS=64
13648      VAR_CPU_ENDIAN=big
13649      ;;
13650    sparc)
13651      VAR_CPU=sparc
13652      VAR_CPU_ARCH=sparc
13653      VAR_CPU_BITS=32
13654      VAR_CPU_ENDIAN=big
13655      ;;
13656    sparcv9|sparc64)
13657      VAR_CPU=sparcv9
13658      VAR_CPU_ARCH=sparc
13659      VAR_CPU_BITS=64
13660      VAR_CPU_ENDIAN=big
13661      ;;
13662    *)
13663      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13664      ;;
13665  esac
13666
13667  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13668  OPENJDK_BUILD_OS="$VAR_OS"
13669  if test "x$VAR_OS_TYPE" != x; then
13670    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13671  else
13672    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13673  fi
13674  if test "x$VAR_OS_ENV" != x; then
13675    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13676  else
13677    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13678  fi
13679  OPENJDK_BUILD_CPU="$VAR_CPU"
13680  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13681  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13682  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13683
13684
13685
13686
13687
13688
13689
13690
13691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13692$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13694$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13695
13696  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13697
13698  case "$host_os" in
13699    *linux*)
13700      VAR_OS=linux
13701      VAR_OS_TYPE=unix
13702      ;;
13703    *solaris*)
13704      VAR_OS=solaris
13705      VAR_OS_TYPE=unix
13706      ;;
13707    *darwin*)
13708      VAR_OS=macosx
13709      VAR_OS_TYPE=unix
13710      ;;
13711    *bsd*)
13712      VAR_OS=bsd
13713      VAR_OS_TYPE=unix
13714      ;;
13715    *cygwin*)
13716      VAR_OS=windows
13717      VAR_OS_ENV=windows.cygwin
13718      ;;
13719    *mingw*)
13720      VAR_OS=windows
13721      VAR_OS_ENV=windows.msys
13722      ;;
13723    *aix*)
13724      VAR_OS=aix
13725      VAR_OS_TYPE=unix
13726      ;;
13727    *)
13728      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13729      ;;
13730  esac
13731
13732
13733  # First argument is the cpu name from the trip/quad
13734  case "$host_cpu" in
13735    x86_64)
13736      VAR_CPU=x86_64
13737      VAR_CPU_ARCH=x86
13738      VAR_CPU_BITS=64
13739      VAR_CPU_ENDIAN=little
13740      ;;
13741    i?86)
13742      VAR_CPU=x86
13743      VAR_CPU_ARCH=x86
13744      VAR_CPU_BITS=32
13745      VAR_CPU_ENDIAN=little
13746      ;;
13747    arm*)
13748      VAR_CPU=arm
13749      VAR_CPU_ARCH=arm
13750      VAR_CPU_BITS=32
13751      VAR_CPU_ENDIAN=little
13752      ;;
13753    aarch64)
13754      VAR_CPU=aarch64
13755      VAR_CPU_ARCH=aarch64
13756      VAR_CPU_BITS=64
13757      VAR_CPU_ENDIAN=little
13758      ;;
13759    powerpc)
13760      VAR_CPU=ppc
13761      VAR_CPU_ARCH=ppc
13762      VAR_CPU_BITS=32
13763      VAR_CPU_ENDIAN=big
13764      ;;
13765    powerpc64)
13766      VAR_CPU=ppc64
13767      VAR_CPU_ARCH=ppc
13768      VAR_CPU_BITS=64
13769      VAR_CPU_ENDIAN=big
13770      ;;
13771    powerpc64le)
13772      VAR_CPU=ppc64
13773      VAR_CPU_ARCH=ppc
13774      VAR_CPU_BITS=64
13775      VAR_CPU_ENDIAN=little
13776      ;;
13777    s390)
13778      VAR_CPU=s390
13779      VAR_CPU_ARCH=s390
13780      VAR_CPU_BITS=32
13781      VAR_CPU_ENDIAN=big
13782      ;;
13783    s390x)
13784      VAR_CPU=s390x
13785      VAR_CPU_ARCH=s390
13786      VAR_CPU_BITS=64
13787      VAR_CPU_ENDIAN=big
13788      ;;
13789    sparc)
13790      VAR_CPU=sparc
13791      VAR_CPU_ARCH=sparc
13792      VAR_CPU_BITS=32
13793      VAR_CPU_ENDIAN=big
13794      ;;
13795    sparcv9|sparc64)
13796      VAR_CPU=sparcv9
13797      VAR_CPU_ARCH=sparc
13798      VAR_CPU_BITS=64
13799      VAR_CPU_ENDIAN=big
13800      ;;
13801    *)
13802      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13803      ;;
13804  esac
13805
13806  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13807  OPENJDK_TARGET_OS="$VAR_OS"
13808  if test "x$VAR_OS_TYPE" != x; then
13809    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13810  else
13811    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13812  fi
13813  if test "x$VAR_OS_ENV" != x; then
13814    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13815  else
13816    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13817  fi
13818  OPENJDK_TARGET_CPU="$VAR_CPU"
13819  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13820  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13821  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13822
13823
13824
13825
13826
13827
13828
13829
13830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13831$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13833$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13834
13835
13836
13837# Check whether --with-target-bits was given.
13838if test "${with_target_bits+set}" = set; then :
13839  withval=$with_target_bits;
13840fi
13841
13842
13843  # We have three types of compiles:
13844  # native  == normal compilation, target system == build system
13845  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13846  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13847  #
13848  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13849    # We're doing a proper cross-compilation
13850    COMPILE_TYPE="cross"
13851  else
13852    COMPILE_TYPE="native"
13853  fi
13854
13855  if test "x$with_target_bits" != x; then
13856    if test "x$COMPILE_TYPE" = "xcross"; then
13857      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13858    fi
13859
13860    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13861      # A reduced build is requested
13862      COMPILE_TYPE="reduced"
13863      OPENJDK_TARGET_CPU_BITS=32
13864      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13865        OPENJDK_TARGET_CPU=x86
13866      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13867        OPENJDK_TARGET_CPU=sparc
13868      else
13869        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13870      fi
13871    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13872      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
13873    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13874      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13875$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13876    else
13877      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13878    fi
13879  fi
13880
13881
13882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13883$as_echo_n "checking compilation type... " >&6; }
13884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13885$as_echo "$COMPILE_TYPE" >&6; }
13886
13887
13888  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13889    REQUIRED_OS_NAME=SunOS
13890    REQUIRED_OS_VERSION=5.10
13891  fi
13892  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13893    REQUIRED_OS_NAME=Linux
13894    REQUIRED_OS_VERSION=2.6
13895  fi
13896  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13897    REQUIRED_OS_NAME=Windows
13898    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13899      REQUIRED_OS_VERSION=5.2
13900    else
13901      REQUIRED_OS_VERSION=5.1
13902    fi
13903  fi
13904  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13905    REQUIRED_OS_NAME=Darwin
13906    REQUIRED_OS_VERSION=11.2
13907  fi
13908
13909
13910
13911
13912
13913  # Also store the legacy naming of the cpu.
13914  # Ie i586 and amd64 instead of x86 and x86_64
13915  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13916  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13917    OPENJDK_TARGET_CPU_LEGACY="i586"
13918  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13919    # On all platforms except MacOSX replace x86_64 with amd64.
13920    OPENJDK_TARGET_CPU_LEGACY="amd64"
13921  fi
13922
13923
13924  # And the second legacy naming of the cpu.
13925  # Ie i386 and amd64 instead of x86 and x86_64.
13926  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13927  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13928    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13929  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13930    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13931  fi
13932
13933
13934  # This is the name of the cpu (but using i386 and amd64 instead of
13935  # x86 and x86_64, respectively), preceeded by a /, to be used when
13936  # locating libraries. On macosx, it's empty, though.
13937  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13938  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13939    OPENJDK_TARGET_CPU_LIBDIR=""
13940  fi
13941
13942
13943  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13944  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13945  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13946  OPENJDK_TARGET_CPU_ISADIR=""
13947  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13948    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13949      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13950    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13951      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13952    fi
13953  fi
13954
13955
13956  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13957  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13958  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13959    # On linux only, we replace x86 with i386.
13960    OPENJDK_TARGET_CPU_OSARCH="i386"
13961  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13962    # On all platforms except macosx, we replace x86_64 with amd64.
13963    OPENJDK_TARGET_CPU_OSARCH="amd64"
13964  fi
13965
13966
13967  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13968  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13969    OPENJDK_TARGET_CPU_JLI="i386"
13970  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13971    # On all platforms except macosx, we replace x86_64 with amd64.
13972    OPENJDK_TARGET_CPU_JLI="amd64"
13973  fi
13974  # Now setup the -D flags for building libjli.
13975  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13976  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13977    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13978      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13979    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13980      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13981    fi
13982  fi
13983
13984
13985  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13986      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13987  else
13988      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13989  fi
13990
13991
13992  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13993    A_LP64="LP64:="
13994    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13995    # unpack200.exe
13996    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13997      ADD_LP64="-D_LP64=1"
13998    fi
13999  fi
14000  LP64=$A_LP64
14001
14002
14003  if test "x$COMPILE_TYPE" = "xcross"; then
14004    # FIXME: ... or should this include reduced builds..?
14005    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14006  else
14007    DEFINE_CROSS_COMPILE_ARCH=""
14008  fi
14009
14010
14011  # ZERO_ARCHDEF is used to enable architecture-specific code
14012  case "${OPENJDK_TARGET_CPU}" in
14013    ppc)     ZERO_ARCHDEF=PPC32 ;;
14014    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14015    s390*)   ZERO_ARCHDEF=S390  ;;
14016    sparc*)  ZERO_ARCHDEF=SPARC ;;
14017    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14018    x86)     ZERO_ARCHDEF=IA32  ;;
14019    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14020  esac
14021
14022
14023
14024
14025# Continue setting up basic stuff. Most remaining code require fundamental tools.
14026
14027  # Save the current directory this script was started from
14028  CURDIR="$PWD"
14029
14030  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14031    PATH_SEP=";"
14032
14033  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14034  if test $SRC_ROOT_LENGTH -gt 100; then
14035    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14036  fi
14037
14038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14040$as_echo_n "checking cygwin release... " >&6; }
14041    CYGWIN_VERSION=`$UNAME -r`
14042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14043$as_echo "$CYGWIN_VERSION" >&6; }
14044    WINDOWS_ENV_VENDOR='cygwin'
14045    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14046
14047    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14048    if test "x$CYGWIN_VERSION_OLD" != x; then
14049      { $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
14050$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;}
14051      as_fn_error $? "Cannot continue" "$LINENO" 5
14052    fi
14053    if test "x$CYGPATH" = x; then
14054      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14055    fi
14056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14057$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14058    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14059    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14060    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14061    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14063$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14064    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14065    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14066    if test "x$test_cygdrive_prefix" = x; then
14067      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14068    fi
14069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14071$as_echo_n "checking msys release... " >&6; }
14072    MSYS_VERSION=`$UNAME -r`
14073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14074$as_echo "$MSYS_VERSION" >&6; }
14075
14076    WINDOWS_ENV_VENDOR='msys'
14077    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14078
14079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14080$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14081    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14082    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14083
14084  windows_path="$MSYS_ROOT_PATH"
14085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14086    unix_path=`$CYGPATH -u "$windows_path"`
14087    MSYS_ROOT_PATH="$unix_path"
14088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14090    MSYS_ROOT_PATH="$unix_path"
14091  fi
14092
14093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14094$as_echo "$MSYS_ROOT_PATH" >&6; }
14095    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14096  else
14097    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14098  fi
14099
14100  # Test if windows or unix (cygwin/msys) find is first in path.
14101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14102$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14103  FIND_BINARY_OUTPUT=`find --version 2>&1`
14104  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14106$as_echo "unix style" >&6; }
14107  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14109$as_echo "Windows" >&6; }
14110    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14111$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14112    { $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
14113$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14114    as_fn_error $? "Cannot continue" "$LINENO" 5
14115  else
14116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14117$as_echo "unknown" >&6; }
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14119$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14120  fi
14121
14122  else
14123    PATH_SEP=":"
14124  fi
14125
14126
14127  # We get the top-level directory from the supporting wrappers.
14128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14129$as_echo_n "checking for top-level directory... " >&6; }
14130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14131$as_echo "$TOPDIR" >&6; }
14132
14133
14134  # Save the original version of TOPDIR for string comparisons
14135  ORIGINAL_TOPDIR="$TOPDIR"
14136
14137
14138  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14139
14140  # Only process if variable expands to non-empty
14141
14142  if test "x$CURDIR" != x; then
14143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14144
14145  # Input might be given as Windows format, start by converting to
14146  # unix format.
14147  path="$CURDIR"
14148  new_path=`$CYGPATH -u "$path"`
14149
14150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14153  # "foo.exe" is OK but "foo" is an error.
14154  #
14155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14156  # It is also a way to make sure we got the proper file name for the real test later on.
14157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14158  if test "x$test_shortpath" = x; then
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14160$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14161    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14162  fi
14163
14164  # Call helper function which possibly converts this using DOS-style short mode.
14165  # If so, the updated path is stored in $new_path.
14166
14167  input_path="$new_path"
14168  # Check if we need to convert this using DOS-style short mode. If the path
14169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14170  # take no chances and rewrite it.
14171  # Note: m4 eats our [], so we need to use [ and ] instead.
14172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14173  if test "x$has_forbidden_chars" != x; then
14174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14178      # Going to short mode and back again did indeed matter. Since short mode is
14179      # case insensitive, let's make it lowercase to improve readability.
14180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14181      # Now convert it back to Unix-style (cygpath)
14182      input_path=`$CYGPATH -u "$shortmode_path"`
14183      new_path="$input_path"
14184    fi
14185  fi
14186
14187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14188  if test "x$test_cygdrive_prefix" = x; then
14189    # As a simple fix, exclude /usr/bin since it's not a real path.
14190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14192      # a path prefixed by /cygdrive for fixpath to work.
14193      new_path="$CYGWIN_ROOT_PATH$input_path"
14194    fi
14195  fi
14196
14197
14198  if test "x$path" != "x$new_path"; then
14199    CURDIR="$new_path"
14200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14201$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14202  fi
14203
14204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14205
14206  path="$CURDIR"
14207  has_colon=`$ECHO $path | $GREP ^.:`
14208  new_path="$path"
14209  if test "x$has_colon" = x; then
14210    # Not in mixed or Windows style, start by that.
14211    new_path=`cmd //c echo $path`
14212  fi
14213
14214
14215  input_path="$new_path"
14216  # Check if we need to convert this using DOS-style short mode. If the path
14217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14218  # take no chances and rewrite it.
14219  # Note: m4 eats our [], so we need to use [ and ] instead.
14220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14221  if test "x$has_forbidden_chars" != x; then
14222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14224  fi
14225
14226
14227  windows_path="$new_path"
14228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14229    unix_path=`$CYGPATH -u "$windows_path"`
14230    new_path="$unix_path"
14231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14233    new_path="$unix_path"
14234  fi
14235
14236  if test "x$path" != "x$new_path"; then
14237    CURDIR="$new_path"
14238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14239$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14240  fi
14241
14242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14244
14245    else
14246      # We're on a unix platform. Hooray! :)
14247      path="$CURDIR"
14248      has_space=`$ECHO "$path" | $GREP " "`
14249      if test "x$has_space" != x; then
14250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14251$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14253      fi
14254
14255      # Use eval to expand a potential ~
14256      eval path="$path"
14257      if test ! -f "$path" && test ! -d "$path"; then
14258        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14259      fi
14260
14261      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14262    fi
14263  fi
14264
14265
14266  # Only process if variable expands to non-empty
14267
14268  if test "x$TOPDIR" != x; then
14269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14270
14271  # Input might be given as Windows format, start by converting to
14272  # unix format.
14273  path="$TOPDIR"
14274  new_path=`$CYGPATH -u "$path"`
14275
14276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14279  # "foo.exe" is OK but "foo" is an error.
14280  #
14281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14282  # It is also a way to make sure we got the proper file name for the real test later on.
14283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14284  if test "x$test_shortpath" = x; then
14285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14286$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14287    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14288  fi
14289
14290  # Call helper function which possibly converts this using DOS-style short mode.
14291  # If so, the updated path is stored in $new_path.
14292
14293  input_path="$new_path"
14294  # Check if we need to convert this using DOS-style short mode. If the path
14295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14296  # take no chances and rewrite it.
14297  # Note: m4 eats our [], so we need to use [ and ] instead.
14298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14299  if test "x$has_forbidden_chars" != x; then
14300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14304      # Going to short mode and back again did indeed matter. Since short mode is
14305      # case insensitive, let's make it lowercase to improve readability.
14306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14307      # Now convert it back to Unix-style (cygpath)
14308      input_path=`$CYGPATH -u "$shortmode_path"`
14309      new_path="$input_path"
14310    fi
14311  fi
14312
14313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14314  if test "x$test_cygdrive_prefix" = x; then
14315    # As a simple fix, exclude /usr/bin since it's not a real path.
14316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14318      # a path prefixed by /cygdrive for fixpath to work.
14319      new_path="$CYGWIN_ROOT_PATH$input_path"
14320    fi
14321  fi
14322
14323
14324  if test "x$path" != "x$new_path"; then
14325    TOPDIR="$new_path"
14326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14327$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14328  fi
14329
14330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14331
14332  path="$TOPDIR"
14333  has_colon=`$ECHO $path | $GREP ^.:`
14334  new_path="$path"
14335  if test "x$has_colon" = x; then
14336    # Not in mixed or Windows style, start by that.
14337    new_path=`cmd //c echo $path`
14338  fi
14339
14340
14341  input_path="$new_path"
14342  # Check if we need to convert this using DOS-style short mode. If the path
14343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14344  # take no chances and rewrite it.
14345  # Note: m4 eats our [], so we need to use [ and ] instead.
14346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14347  if test "x$has_forbidden_chars" != x; then
14348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14350  fi
14351
14352
14353  windows_path="$new_path"
14354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14355    unix_path=`$CYGPATH -u "$windows_path"`
14356    new_path="$unix_path"
14357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14359    new_path="$unix_path"
14360  fi
14361
14362  if test "x$path" != "x$new_path"; then
14363    TOPDIR="$new_path"
14364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14365$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14366  fi
14367
14368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14370
14371    else
14372      # We're on a unix platform. Hooray! :)
14373      path="$TOPDIR"
14374      has_space=`$ECHO "$path" | $GREP " "`
14375      if test "x$has_space" != x; then
14376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14377$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14379      fi
14380
14381      # Use eval to expand a potential ~
14382      eval path="$path"
14383      if test ! -f "$path" && test ! -d "$path"; then
14384        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14385      fi
14386
14387      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14388    fi
14389  fi
14390
14391  # SRC_ROOT is a traditional alias for TOPDIR.
14392  SRC_ROOT=$TOPDIR
14393
14394  # Calculate a canonical version of TOPDIR for string comparisons
14395  CANONICAL_TOPDIR=$TOPDIR
14396
14397  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14398    # Follow a chain of symbolic links. Use readlink
14399    # where it exists, else fall back to horribly
14400    # complicated shell code.
14401    if test "x$READLINK_TESTED" != yes; then
14402      # On MacOSX there is a readlink tool with a different
14403      # purpose than the GNU readlink tool. Check the found readlink.
14404      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14405      if test "x$ISGNU" = x; then
14406        # A readlink that we do not know how to use.
14407        # Are there other non-GNU readlinks out there?
14408        READLINK_TESTED=yes
14409        READLINK=
14410      fi
14411    fi
14412
14413    if test "x$READLINK" != x; then
14414      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14415    else
14416      # Save the current directory for restoring afterwards
14417      STARTDIR=$PWD
14418      COUNTER=0
14419      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14420      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14421      cd $sym_link_dir
14422      # Use -P flag to resolve symlinks in directories.
14423      cd `$THEPWDCMD -P`
14424      sym_link_dir=`$THEPWDCMD -P`
14425      # Resolve file symlinks
14426      while test $COUNTER -lt 20; do
14427        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14428        if test "x$ISLINK" == x; then
14429          # This is not a symbolic link! We are done!
14430          break
14431        fi
14432        # Again resolve directory symlinks since the target of the just found
14433        # link could be in a different directory
14434        cd `$DIRNAME $ISLINK`
14435        sym_link_dir=`$THEPWDCMD -P`
14436        sym_link_file=`$BASENAME $ISLINK`
14437        let COUNTER=COUNTER+1
14438      done
14439      cd $STARTDIR
14440      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14441    fi
14442  fi
14443
14444
14445
14446  # Locate the directory of this script.
14447  AUTOCONF_DIR=$TOPDIR/common/autoconf
14448
14449
14450# Check if it's a pure open build or if custom sources are to be used.
14451
14452  # Check whether --enable-openjdk-only was given.
14453if test "${enable_openjdk_only+set}" = set; then :
14454  enableval=$enable_openjdk_only;
14455else
14456  enable_openjdk_only="no"
14457fi
14458
14459
14460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14461$as_echo_n "checking for presence of closed sources... " >&6; }
14462  if test -d "$SRC_ROOT/jdk/src/closed"; then
14463    CLOSED_SOURCE_PRESENT=yes
14464  else
14465    CLOSED_SOURCE_PRESENT=no
14466  fi
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14468$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14469
14470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14471$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14472  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14474$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14475
14476  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14477    OPENJDK=true
14478    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14479      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14480$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14481    fi
14482  else
14483    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14484      OPENJDK=true
14485    else
14486      OPENJDK=false
14487    fi
14488  fi
14489
14490  if test "x$OPENJDK" = "xtrue"; then
14491    SET_OPENJDK="OPENJDK=true"
14492  fi
14493
14494
14495
14496  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14497  # the IncludeCustomExtension macro.
14498
14499
14500# Check whether --with-custom-make-dir was given.
14501if test "${with_custom_make_dir+set}" = set; then :
14502  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
14503$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14504fi
14505
14506
14507
14508
14509# These are needed to be able to create a configuration name (and thus the output directory)
14510
14511  ###############################################################################
14512  #
14513  # Check which variant of the JDK that we want to build.
14514  # Currently we have:
14515  #    normal:   standard edition
14516  # but the custom make system may add other variants
14517  #
14518  # Effectively the JDK variant gives a name to a specific set of
14519  # modules to compile into the JDK. In the future, these modules
14520  # might even be Jigsaw modules.
14521  #
14522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14523$as_echo_n "checking which variant of the JDK to build... " >&6; }
14524
14525# Check whether --with-jdk-variant was given.
14526if test "${with_jdk_variant+set}" = set; then :
14527  withval=$with_jdk_variant;
14528fi
14529
14530
14531  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14532    JDK_VARIANT="normal"
14533  else
14534    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14535  fi
14536
14537
14538
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14540$as_echo "$JDK_VARIANT" >&6; }
14541
14542
14543###############################################################################
14544#
14545# Check which interpreter of the JVM we want to build.
14546# Currently we have:
14547#    template: Template interpreter (the default)
14548#    cpp     : C++ interpreter
14549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14550$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14551
14552# Check whether --with-jvm-interpreter was given.
14553if test "${with_jvm_interpreter+set}" = set; then :
14554  withval=$with_jvm_interpreter;
14555fi
14556
14557
14558if test "x$with_jvm_interpreter" = x; then
14559     with_jvm_interpreter="template"
14560fi
14561
14562JVM_INTERPRETER="$with_jvm_interpreter"
14563
14564if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14565   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14566fi
14567
14568
14569
14570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14571$as_echo "$with_jvm_interpreter" >&6; }
14572
14573
14574
14575  ###############################################################################
14576  #
14577  # Check which variants of the JVM that we want to build.
14578  # Currently we have:
14579  #    server: normal interpreter and a tiered C1/C2 compiler
14580  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14581  #    minimal1: reduced form of client with optional VM services and features stripped out
14582  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14583  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14584  #    zero: no machine code interpreter, no compiler
14585  #    zeroshark: zero interpreter and shark/llvm compiler backend
14586#    core: interpreter only, no compiler (only works on some platforms)
14587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14588$as_echo_n "checking which variants of the JVM to build... " >&6; }
14589
14590# Check whether --with-jvm-variants was given.
14591if test "${with_jvm_variants+set}" = set; then :
14592  withval=$with_jvm_variants;
14593fi
14594
14595
14596  if test "x$with_jvm_variants" = x; then
14597    with_jvm_variants="server"
14598  fi
14599
14600  JVM_VARIANTS=",$with_jvm_variants,"
14601  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,//'`
14602
14603  if test "x$TEST_VARIANTS" != "x,"; then
14604     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14605  fi
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14607$as_echo "$with_jvm_variants" >&6; }
14608
14609  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14610  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14611  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14612  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14613  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14614  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14615  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14616
14617  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14618    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14619      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14620    fi
14621  fi
14622  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14623    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14624      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14625    fi
14626  fi
14627  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14628    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14629      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14630    fi
14631  fi
14632
14633  # Replace the commas with AND for use in the build directory name.
14634  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14635  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/'`
14636  if test "x$COUNT_VARIANTS" != "x,1"; then
14637    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14638  else
14639    BUILDING_MULTIPLE_JVM_VARIANTS=no
14640  fi
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651  INCLUDE_SA=true
14652  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14653    INCLUDE_SA=false
14654  fi
14655  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14656    INCLUDE_SA=false
14657  fi
14658  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14659    INCLUDE_SA=false
14660  fi
14661  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14662    INCLUDE_SA=false
14663  fi
14664
14665
14666  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14667    MACOSX_UNIVERSAL="true"
14668  fi
14669
14670
14671
14672
14673  ###############################################################################
14674  #
14675  # Set the debug level
14676  #    release: no debug information, all optimizations, no asserts.
14677  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14678  #    fastdebug: debug information (-g), all optimizations, all asserts
14679  #    slowdebug: debug information (-g), no optimizations, all asserts
14680  #
14681  DEBUG_LEVEL="release"
14682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14683$as_echo_n "checking which debug level to use... " >&6; }
14684  # Check whether --enable-debug was given.
14685if test "${enable_debug+set}" = set; then :
14686  enableval=$enable_debug;
14687        ENABLE_DEBUG="${enableval}"
14688        DEBUG_LEVEL="fastdebug"
14689
14690else
14691  ENABLE_DEBUG="no"
14692fi
14693
14694
14695
14696# Check whether --with-debug-level was given.
14697if test "${with_debug_level+set}" = set; then :
14698  withval=$with_debug_level;
14699        DEBUG_LEVEL="${withval}"
14700        if test "x$ENABLE_DEBUG" = xyes; then
14701          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14702        fi
14703
14704fi
14705
14706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14707$as_echo "$DEBUG_LEVEL" >&6; }
14708
14709  if test "x$DEBUG_LEVEL" != xrelease && \
14710      test "x$DEBUG_LEVEL" != xoptimized && \
14711      test "x$DEBUG_LEVEL" != xfastdebug && \
14712      test "x$DEBUG_LEVEL" != xslowdebug; then
14713    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14714  fi
14715
14716
14717  ###############################################################################
14718  #
14719  # Setup legacy vars/targets and new vars to deal with different debug levels.
14720  #
14721
14722  case $DEBUG_LEVEL in
14723    release )
14724      VARIANT="OPT"
14725      FASTDEBUG="false"
14726      DEBUG_CLASSFILES="false"
14727      BUILD_VARIANT_RELEASE=""
14728      HOTSPOT_DEBUG_LEVEL="product"
14729      HOTSPOT_EXPORT="product"
14730      ;;
14731    fastdebug )
14732      VARIANT="DBG"
14733      FASTDEBUG="true"
14734      DEBUG_CLASSFILES="true"
14735      BUILD_VARIANT_RELEASE="-fastdebug"
14736      HOTSPOT_DEBUG_LEVEL="fastdebug"
14737      HOTSPOT_EXPORT="fastdebug"
14738      ;;
14739    slowdebug )
14740      VARIANT="DBG"
14741      FASTDEBUG="false"
14742      DEBUG_CLASSFILES="true"
14743      BUILD_VARIANT_RELEASE="-debug"
14744      HOTSPOT_DEBUG_LEVEL="debug"
14745      HOTSPOT_EXPORT="debug"
14746      ;;
14747    optimized )
14748      VARIANT="OPT"
14749      FASTDEBUG="false"
14750      DEBUG_CLASSFILES="false"
14751      BUILD_VARIANT_RELEASE="-optimized"
14752      HOTSPOT_DEBUG_LEVEL="optimized"
14753      HOTSPOT_EXPORT="optimized"
14754      ;;
14755  esac
14756
14757  # The debug level 'optimized' is a little special because it is currently only
14758  # applicable to the HotSpot build where it means to build a completely
14759  # optimized version of the VM without any debugging code (like for the
14760  # 'release' debug level which is called 'product' in the HotSpot build) but
14761  # with the exception that it can contain additional code which is otherwise
14762  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14763  # test new and/or experimental features which are not intended for customer
14764  # shipment. Because these new features need to be tested and benchmarked in
14765  # real world scenarios, we want to build the containing JDK at the 'release'
14766  # debug level.
14767  if test "x$DEBUG_LEVEL" = xoptimized; then
14768    DEBUG_LEVEL="release"
14769  fi
14770
14771  #####
14772  # Generate the legacy makefile targets for hotspot.
14773  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14774  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14775  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14776  # But until then ...
14777  HOTSPOT_TARGET=""
14778
14779  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14780    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14781  fi
14782
14783  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14785  fi
14786
14787  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14789  fi
14790
14791  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14793  fi
14794
14795  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14796    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14797  fi
14798
14799  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14800    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14801  fi
14802
14803  if test "x$JVM_VARIANT_CORE" = xtrue; then
14804    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14805  fi
14806
14807  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14808
14809  # On Macosx universal binaries are produced, but they only contain
14810  # 64 bit intel. This invalidates control of which jvms are built
14811  # from configure, but only server is valid anyway. Fix this
14812  # when hotspot makefiles are rewritten.
14813  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14814    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14815  fi
14816
14817  #####
14818
14819
14820
14821
14822
14823
14824
14825
14826# With basic setup done, call the custom early hook.
14827
14828
14829# Check if we have devkits, extra paths or sysroot set.
14830
14831
14832# Check whether --with-devkit was given.
14833if test "${with_devkit+set}" = set; then :
14834  withval=$with_devkit;
14835
14836  # Only process if variable expands to non-empty
14837
14838  if test "x$with_devkit" != x; then
14839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14840
14841  # Input might be given as Windows format, start by converting to
14842  # unix format.
14843  path="$with_devkit"
14844  new_path=`$CYGPATH -u "$path"`
14845
14846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14849  # "foo.exe" is OK but "foo" is an error.
14850  #
14851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14852  # It is also a way to make sure we got the proper file name for the real test later on.
14853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14854  if test "x$test_shortpath" = x; then
14855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14856$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14857    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14858  fi
14859
14860  # Call helper function which possibly converts this using DOS-style short mode.
14861  # If so, the updated path is stored in $new_path.
14862
14863  input_path="$new_path"
14864  # Check if we need to convert this using DOS-style short mode. If the path
14865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14866  # take no chances and rewrite it.
14867  # Note: m4 eats our [], so we need to use [ and ] instead.
14868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14869  if test "x$has_forbidden_chars" != x; then
14870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14874      # Going to short mode and back again did indeed matter. Since short mode is
14875      # case insensitive, let's make it lowercase to improve readability.
14876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14877      # Now convert it back to Unix-style (cygpath)
14878      input_path=`$CYGPATH -u "$shortmode_path"`
14879      new_path="$input_path"
14880    fi
14881  fi
14882
14883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14884  if test "x$test_cygdrive_prefix" = x; then
14885    # As a simple fix, exclude /usr/bin since it's not a real path.
14886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14888      # a path prefixed by /cygdrive for fixpath to work.
14889      new_path="$CYGWIN_ROOT_PATH$input_path"
14890    fi
14891  fi
14892
14893
14894  if test "x$path" != "x$new_path"; then
14895    with_devkit="$new_path"
14896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14897$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14898  fi
14899
14900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14901
14902  path="$with_devkit"
14903  has_colon=`$ECHO $path | $GREP ^.:`
14904  new_path="$path"
14905  if test "x$has_colon" = x; then
14906    # Not in mixed or Windows style, start by that.
14907    new_path=`cmd //c echo $path`
14908  fi
14909
14910
14911  input_path="$new_path"
14912  # Check if we need to convert this using DOS-style short mode. If the path
14913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14914  # take no chances and rewrite it.
14915  # Note: m4 eats our [], so we need to use [ and ] instead.
14916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14917  if test "x$has_forbidden_chars" != x; then
14918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14920  fi
14921
14922
14923  windows_path="$new_path"
14924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14925    unix_path=`$CYGPATH -u "$windows_path"`
14926    new_path="$unix_path"
14927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14929    new_path="$unix_path"
14930  fi
14931
14932  if test "x$path" != "x$new_path"; then
14933    with_devkit="$new_path"
14934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14935$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14936  fi
14937
14938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14940
14941    else
14942      # We're on a unix platform. Hooray! :)
14943      path="$with_devkit"
14944      has_space=`$ECHO "$path" | $GREP " "`
14945      if test "x$has_space" != x; then
14946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14947$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14949      fi
14950
14951      # Use eval to expand a potential ~
14952      eval path="$path"
14953      if test ! -f "$path" && test ! -d "$path"; then
14954        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14955      fi
14956
14957      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14958    fi
14959  fi
14960
14961        DEVKIT_ROOT="$with_devkit"
14962        # Check for a meta data info file in the root of the devkit
14963        if test -f "$DEVKIT_ROOT/devkit.info"; then
14964          . $DEVKIT_ROOT/devkit.info
14965          # This potentially sets the following:
14966          # A descriptive name of the devkit
14967
14968  if test "x$DEVKIT_NAME" = x; then
14969    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14970  fi
14971
14972          # Corresponds to --with-extra-path
14973
14974  if test "x$DEVKIT_EXTRA_PATH" = x; then
14975    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14976  fi
14977
14978          # Corresponds to --with-toolchain-path
14979
14980  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14981    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14982  fi
14983
14984          # Corresponds to --with-sysroot
14985
14986  if test "x$DEVKIT_SYSROOT" = x; then
14987    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14988  fi
14989
14990
14991          # Identifies the Visual Studio version in the devkit
14992
14993  if test "x$DEVKIT_VS_VERSION" = x; then
14994    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14995  fi
14996
14997          # The Visual Studio include environment variable
14998
14999  if test "x$DEVKIT_VS_INCLUDE" = x; then
15000    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15001  fi
15002
15003          # The Visual Studio lib environment variable
15004
15005  if test "x$DEVKIT_VS_LIB" = x; then
15006    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15007  fi
15008
15009          # Corresponds to --with-msvcr-dll
15010
15011  if test "x$DEVKIT_MSVCR_DLL" = x; then
15012    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15013  fi
15014
15015          # Corresponds to --with-msvcp-dll
15016
15017  if test "x$DEVKIT_MSVCP_DLL" = x; then
15018    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15019  fi
15020
15021        fi
15022
15023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15024$as_echo_n "checking for devkit... " >&6; }
15025        if test "x$DEVKIT_NAME" != x; then
15026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15027$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15028        else
15029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15030$as_echo "$DEVKIT_ROOT" >&6; }
15031        fi
15032
15033
15034  if test "x$DEVKIT_EXTRA_PATH" != x; then
15035    if test "x$EXTRA_PATH" = x; then
15036      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15037    else
15038      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15039    fi
15040  fi
15041
15042
15043        # Fallback default of just /bin if DEVKIT_PATH is not defined
15044        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15045          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15046        fi
15047
15048  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15049    if test "x$TOOLCHAIN_PATH" = x; then
15050      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15051    else
15052      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15053    fi
15054  fi
15055
15056
15057        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15058        # places for backwards compatiblity.
15059        if test "x$DEVKIT_SYSROOT" != x; then
15060          SYSROOT="$DEVKIT_SYSROOT"
15061        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15062          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15063        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15064          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15065        fi
15066
15067
15068fi
15069
15070
15071  # You can force the sysroot if the sysroot encoded into the compiler tools
15072  # is not correct.
15073
15074# Check whether --with-sys-root was given.
15075if test "${with_sys_root+set}" = set; then :
15076  withval=$with_sys_root; SYSROOT=$with_sys_root
15077
15078fi
15079
15080
15081
15082# Check whether --with-sysroot was given.
15083if test "${with_sysroot+set}" = set; then :
15084  withval=$with_sysroot; SYSROOT=$with_sysroot
15085
15086fi
15087
15088
15089
15090# Check whether --with-tools-dir was given.
15091if test "${with_tools_dir+set}" = set; then :
15092  withval=$with_tools_dir;
15093  if test "x$with_tools_dir" != x; then
15094    if test "x$TOOLCHAIN_PATH" = x; then
15095      TOOLCHAIN_PATH="$with_tools_dir"
15096    else
15097      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15098    fi
15099  fi
15100
15101
15102fi
15103
15104
15105
15106# Check whether --with-toolchain-path was given.
15107if test "${with_toolchain_path+set}" = set; then :
15108  withval=$with_toolchain_path;
15109  if test "x$with_toolchain_path" != x; then
15110    if test "x$TOOLCHAIN_PATH" = x; then
15111      TOOLCHAIN_PATH="$with_toolchain_path"
15112    else
15113      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15114    fi
15115  fi
15116
15117
15118fi
15119
15120
15121
15122# Check whether --with-extra-path was given.
15123if test "${with_extra_path+set}" = set; then :
15124  withval=$with_extra_path;
15125  if test "x$with_extra_path" != x; then
15126    if test "x$EXTRA_PATH" = x; then
15127      EXTRA_PATH="$with_extra_path"
15128    else
15129      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15130    fi
15131  fi
15132
15133
15134fi
15135
15136
15137  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15138    # detect if Xcode is installed by running xcodebuild -version
15139    # if no Xcode installed, xcodebuild exits with 1
15140    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15141    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15142      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15143      # fall back on the stub binary in /usr/bin/xcodebuild
15144      # Extract the first word of "xcodebuild", so it can be a program name with args.
15145set dummy xcodebuild; ac_word=$2
15146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15147$as_echo_n "checking for $ac_word... " >&6; }
15148if ${ac_cv_path_XCODEBUILD+:} false; then :
15149  $as_echo_n "(cached) " >&6
15150else
15151  case $XCODEBUILD in
15152  [\\/]* | ?:[\\/]*)
15153  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15154  ;;
15155  *)
15156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15157for as_dir in $TOOLCHAIN_PATH
15158do
15159  IFS=$as_save_IFS
15160  test -z "$as_dir" && as_dir=.
15161    for ac_exec_ext in '' $ac_executable_extensions; do
15162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15163    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15165    break 2
15166  fi
15167done
15168  done
15169IFS=$as_save_IFS
15170
15171  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15172  ;;
15173esac
15174fi
15175XCODEBUILD=$ac_cv_path_XCODEBUILD
15176if test -n "$XCODEBUILD"; then
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15178$as_echo "$XCODEBUILD" >&6; }
15179else
15180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181$as_echo "no" >&6; }
15182fi
15183
15184
15185    else
15186      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15187      # when only the command line tools are installed there are no SDKs, so headers
15188      # are copied into the system frameworks
15189      XCODEBUILD=
15190
15191    fi
15192
15193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15194$as_echo_n "checking for sdk name... " >&6; }
15195
15196# Check whether --with-sdk-name was given.
15197if test "${with_sdk_name+set}" = set; then :
15198  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15199
15200fi
15201
15202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15203$as_echo "$SDKNAME" >&6; }
15204
15205    # if toolchain path is specified then don't rely on system headers, they may not compile
15206    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15207    test -z "$TOOLCHAIN_PATH" && \
15208      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15209
15210    if test -z "$SYSROOT"; then
15211      if test -n "$XCODEBUILD"; then
15212        # if we don't have system headers, use default SDK name (last resort)
15213        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15214          SDKNAME=${SDKNAME:-macosx}
15215        fi
15216
15217        if test -n "$SDKNAME"; then
15218          # Call xcodebuild to determine SYSROOT
15219          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15220        fi
15221      else
15222        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15223          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
15224        fi
15225      fi
15226    else
15227      # warn user if --with-sdk-name was also set
15228      if test -n "$with_sdk_name"; then
15229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15230$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15231      fi
15232    fi
15233
15234    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15235      # If no system framework headers, then SYSROOT must be set, or we won't build
15236      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
15237    fi
15238
15239    # Perform a basic sanity test
15240    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15241      if test -z "$SYSROOT"; then
15242        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
15243      else
15244        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15245      fi
15246    fi
15247
15248    # set SDKROOT too, Xcode tools will pick it up
15249    SDKROOT=$SYSROOT
15250
15251  fi
15252
15253  # Prepend the extra path to the global path
15254
15255  if test "x$EXTRA_PATH" != x; then
15256    if test "x$PATH" = x; then
15257      PATH="$EXTRA_PATH"
15258    else
15259      PATH="$EXTRA_PATH:$PATH"
15260    fi
15261  fi
15262
15263
15264  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15265    # Add extra search paths on solaris for utilities like ar and as etc...
15266    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15267  fi
15268
15269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15270$as_echo_n "checking for sysroot... " >&6; }
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15272$as_echo "$SYSROOT" >&6; }
15273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15274$as_echo_n "checking for toolchain path... " >&6; }
15275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15276$as_echo "$TOOLCHAIN_PATH" >&6; }
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15278$as_echo_n "checking for extra path... " >&6; }
15279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15280$as_echo "$EXTRA_PATH" >&6; }
15281
15282
15283# To properly create a configuration name, we need to have the OpenJDK target
15284# and options (variants and debug level) parsed.
15285
15286
15287
15288# Check whether --with-conf-name was given.
15289if test "${with_conf_name+set}" = set; then :
15290  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15291fi
15292
15293
15294  # Test from where we are running configure, in or outside of src root.
15295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15296$as_echo_n "checking where to store configuration... " >&6; }
15297  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15298      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15299      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15300    # We are running configure from the src root.
15301    # Create a default ./build/target-variant-debuglevel output root.
15302    if test "x${CONF_NAME}" = x; then
15303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15304$as_echo "in default location" >&6; }
15305      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15306    else
15307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15308$as_echo "in build directory with custom name" >&6; }
15309    fi
15310    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15311    $MKDIR -p "$OUTPUT_ROOT"
15312    if test ! -d "$OUTPUT_ROOT"; then
15313      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15314    fi
15315  else
15316    # We are running configure from outside of the src dir.
15317    # Then use the current directory as output dir!
15318    # If configuration is situated in normal build directory, just use the build
15319    # directory name as configuration name, otherwise use the complete path.
15320    if test "x${CONF_NAME}" = x; then
15321      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15322    fi
15323    OUTPUT_ROOT="$CURDIR"
15324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15325$as_echo "in current directory" >&6; }
15326
15327    # WARNING: This might be a bad thing to do. You need to be sure you want to
15328    # have a configuration in this directory. Do some sanity checks!
15329
15330    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15331      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15332      # other files
15333      files_present=`$LS $OUTPUT_ROOT`
15334      # Configure has already touched config.log and confdefs.h in the current dir when this check
15335      # is performed.
15336      filtered_files=`$ECHO "$files_present" \
15337          | $SED -e 's/config.log//g' \
15338	      -e 's/confdefs.h//g' \
15339	      -e 's/fixpath.exe//g' \
15340	      -e 's/ //g' \
15341          | $TR -d '\n'`
15342      if test "x$filtered_files" != x; then
15343        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15344$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15345        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15346$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15347        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15348$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15349        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15350$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15351        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15352$as_echo "$as_me: seriously mess up just about everything." >&6;}
15353        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15354$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15355        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15356$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15357        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15358      fi
15359    fi
15360  fi
15361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15362$as_echo_n "checking what configuration name to use... " >&6; }
15363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15364$as_echo "$CONF_NAME" >&6; }
15365
15366
15367  # Only process if variable expands to non-empty
15368
15369  if test "x$OUTPUT_ROOT" != x; then
15370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15371
15372  # Input might be given as Windows format, start by converting to
15373  # unix format.
15374  path="$OUTPUT_ROOT"
15375  new_path=`$CYGPATH -u "$path"`
15376
15377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15380  # "foo.exe" is OK but "foo" is an error.
15381  #
15382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15383  # It is also a way to make sure we got the proper file name for the real test later on.
15384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15385  if test "x$test_shortpath" = x; then
15386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15387$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15388    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15389  fi
15390
15391  # Call helper function which possibly converts this using DOS-style short mode.
15392  # If so, the updated path is stored in $new_path.
15393
15394  input_path="$new_path"
15395  # Check if we need to convert this using DOS-style short mode. If the path
15396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15397  # take no chances and rewrite it.
15398  # Note: m4 eats our [], so we need to use [ and ] instead.
15399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15400  if test "x$has_forbidden_chars" != x; then
15401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15405      # Going to short mode and back again did indeed matter. Since short mode is
15406      # case insensitive, let's make it lowercase to improve readability.
15407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15408      # Now convert it back to Unix-style (cygpath)
15409      input_path=`$CYGPATH -u "$shortmode_path"`
15410      new_path="$input_path"
15411    fi
15412  fi
15413
15414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15415  if test "x$test_cygdrive_prefix" = x; then
15416    # As a simple fix, exclude /usr/bin since it's not a real path.
15417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15419      # a path prefixed by /cygdrive for fixpath to work.
15420      new_path="$CYGWIN_ROOT_PATH$input_path"
15421    fi
15422  fi
15423
15424
15425  if test "x$path" != "x$new_path"; then
15426    OUTPUT_ROOT="$new_path"
15427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15428$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15429  fi
15430
15431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15432
15433  path="$OUTPUT_ROOT"
15434  has_colon=`$ECHO $path | $GREP ^.:`
15435  new_path="$path"
15436  if test "x$has_colon" = x; then
15437    # Not in mixed or Windows style, start by that.
15438    new_path=`cmd //c echo $path`
15439  fi
15440
15441
15442  input_path="$new_path"
15443  # Check if we need to convert this using DOS-style short mode. If the path
15444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15445  # take no chances and rewrite it.
15446  # Note: m4 eats our [], so we need to use [ and ] instead.
15447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15448  if test "x$has_forbidden_chars" != x; then
15449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15451  fi
15452
15453
15454  windows_path="$new_path"
15455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15456    unix_path=`$CYGPATH -u "$windows_path"`
15457    new_path="$unix_path"
15458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15460    new_path="$unix_path"
15461  fi
15462
15463  if test "x$path" != "x$new_path"; then
15464    OUTPUT_ROOT="$new_path"
15465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15466$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15467  fi
15468
15469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15471
15472    else
15473      # We're on a unix platform. Hooray! :)
15474      path="$OUTPUT_ROOT"
15475      has_space=`$ECHO "$path" | $GREP " "`
15476      if test "x$has_space" != x; then
15477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15478$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15480      fi
15481
15482      # Use eval to expand a potential ~
15483      eval path="$path"
15484      if test ! -f "$path" && test ! -d "$path"; then
15485        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15486      fi
15487
15488      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15489    fi
15490  fi
15491
15492
15493  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15494  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15495
15496  SPEC=$OUTPUT_ROOT/spec.gmk
15497
15498  CONF_NAME=$CONF_NAME
15499
15500  OUTPUT_ROOT=$OUTPUT_ROOT
15501
15502
15503
15504  # The spec.gmk file contains all variables for the make system.
15505  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15506
15507  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15508  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15509
15510  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15511  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15512
15513  # The compare.sh is used to compare the build output to other builds.
15514  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15515
15516  # The generated Makefile knows where the spec.gmk is and where the source is.
15517  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15518  # which will look for generated configurations
15519  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15520
15521
15522
15523# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15524
15525  for ac_prog in apt-get yum port pkgutil pkgadd
15526do
15527  # Extract the first word of "$ac_prog", so it can be a program name with args.
15528set dummy $ac_prog; ac_word=$2
15529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15530$as_echo_n "checking for $ac_word... " >&6; }
15531if ${ac_cv_prog_PKGHANDLER+:} false; then :
15532  $as_echo_n "(cached) " >&6
15533else
15534  if test -n "$PKGHANDLER"; then
15535  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15536else
15537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15538for as_dir in $PATH
15539do
15540  IFS=$as_save_IFS
15541  test -z "$as_dir" && as_dir=.
15542    for ac_exec_ext in '' $ac_executable_extensions; do
15543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15544    ac_cv_prog_PKGHANDLER="$ac_prog"
15545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15546    break 2
15547  fi
15548done
15549  done
15550IFS=$as_save_IFS
15551
15552fi
15553fi
15554PKGHANDLER=$ac_cv_prog_PKGHANDLER
15555if test -n "$PKGHANDLER"; then
15556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15557$as_echo "$PKGHANDLER" >&6; }
15558else
15559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15560$as_echo "no" >&6; }
15561fi
15562
15563
15564  test -n "$PKGHANDLER" && break
15565done
15566
15567
15568
15569# Setup tools that requires more complex handling, or that is not needed by the configure script.
15570
15571
15572  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15573  if test "x$MAKE" != x; then
15574    # User has supplied a make, test it.
15575    if test ! -f "$MAKE"; then
15576      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15577    fi
15578
15579  MAKE_CANDIDATE=""$MAKE""
15580  DESCRIPTION="user supplied MAKE=$MAKE"
15581
15582  # On Cygwin, we require a newer version of make than on other platforms
15583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15584    MAKE_VERSION_EXPR="-e 4\."
15585    MAKE_REQUIRED_VERSION="4.0"
15586   else
15587    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15588    MAKE_REQUIRED_VERSION="3.81"
15589  fi
15590
15591  if test "x$MAKE_CANDIDATE" != x; then
15592    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15593$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15594    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15595    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15596    if test "x$IS_GNU_MAKE" = x; then
15597      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15598$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15599    else
15600      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15601      if test "x$IS_MODERN_MAKE" = x; then
15602        { $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
15603$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;}
15604      else
15605        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15606          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15607            MAKE_EXPECTED_ENV='cygwin'
15608          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15609            MAKE_EXPECTED_ENV='msys'
15610          else
15611            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15612          fi
15613          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15614          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15615        else
15616          # Not relevant for non-Windows
15617          IS_MAKE_CORRECT_ENV=true
15618        fi
15619        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15620          { $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
15621$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;}
15622        else
15623          FOUND_MAKE=$MAKE_CANDIDATE
15624
15625  # Only process if variable expands to non-empty
15626
15627  if test "x$FOUND_MAKE" != x; then
15628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15629
15630  # First separate the path from the arguments. This will split at the first
15631  # space.
15632  complete="$FOUND_MAKE"
15633  path="${complete%% *}"
15634  tmp="$complete EOL"
15635  arguments="${tmp#* }"
15636
15637  # Input might be given as Windows format, start by converting to
15638  # unix format.
15639  new_path=`$CYGPATH -u "$path"`
15640
15641  # Now try to locate executable using which
15642  new_path=`$WHICH "$new_path" 2> /dev/null`
15643  # bat and cmd files are not always considered executable in cygwin causing which
15644  # to not find them
15645  if test "x$new_path" = x \
15646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15648    new_path=`$CYGPATH -u "$path"`
15649  fi
15650  if test "x$new_path" = x; then
15651    # Oops. Which didn't find the executable.
15652    # The splitting of arguments from the executable at a space might have been incorrect,
15653    # since paths with space are more likely in Windows. Give it another try with the whole
15654    # argument.
15655    path="$complete"
15656    arguments="EOL"
15657    new_path=`$CYGPATH -u "$path"`
15658    new_path=`$WHICH "$new_path" 2> /dev/null`
15659    # bat and cmd files are not always considered executable in cygwin causing which
15660    # to not find them
15661    if test "x$new_path" = x \
15662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15664      new_path=`$CYGPATH -u "$path"`
15665    fi
15666    if test "x$new_path" = x; then
15667      # It's still not found. Now this is an unrecoverable error.
15668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15670      has_space=`$ECHO "$complete" | $GREP " "`
15671      if test "x$has_space" != x; then
15672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15674      fi
15675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15676    fi
15677  fi
15678
15679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15682  # "foo.exe" is OK but "foo" is an error.
15683  #
15684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15685  # It is also a way to make sure we got the proper file name for the real test later on.
15686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15687  if test "x$test_shortpath" = x; then
15688    # Short path failed, file does not exist as specified.
15689    # Try adding .exe or .cmd
15690    if test -f "${new_path}.exe"; then
15691      input_to_shortpath="${new_path}.exe"
15692    elif test -f "${new_path}.cmd"; then
15693      input_to_shortpath="${new_path}.cmd"
15694    else
15695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15700    fi
15701  else
15702    input_to_shortpath="$new_path"
15703  fi
15704
15705  # Call helper function which possibly converts this using DOS-style short mode.
15706  # If so, the updated path is stored in $new_path.
15707  new_path="$input_to_shortpath"
15708
15709  input_path="$input_to_shortpath"
15710  # Check if we need to convert this using DOS-style short mode. If the path
15711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15712  # take no chances and rewrite it.
15713  # Note: m4 eats our [], so we need to use [ and ] instead.
15714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15715  if test "x$has_forbidden_chars" != x; then
15716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15720      # Going to short mode and back again did indeed matter. Since short mode is
15721      # case insensitive, let's make it lowercase to improve readability.
15722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15723      # Now convert it back to Unix-style (cygpath)
15724      input_path=`$CYGPATH -u "$shortmode_path"`
15725      new_path="$input_path"
15726    fi
15727  fi
15728
15729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15730  if test "x$test_cygdrive_prefix" = x; then
15731    # As a simple fix, exclude /usr/bin since it's not a real path.
15732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15734      # a path prefixed by /cygdrive for fixpath to work.
15735      new_path="$CYGWIN_ROOT_PATH$input_path"
15736    fi
15737  fi
15738
15739  # remove trailing .exe if any
15740  new_path="${new_path/%.exe/}"
15741
15742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15743
15744  # First separate the path from the arguments. This will split at the first
15745  # space.
15746  complete="$FOUND_MAKE"
15747  path="${complete%% *}"
15748  tmp="$complete EOL"
15749  arguments="${tmp#* }"
15750
15751  # Input might be given as Windows format, start by converting to
15752  # unix format.
15753  new_path="$path"
15754
15755  windows_path="$new_path"
15756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15757    unix_path=`$CYGPATH -u "$windows_path"`
15758    new_path="$unix_path"
15759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15761    new_path="$unix_path"
15762  fi
15763
15764
15765  # Now try to locate executable using which
15766  new_path=`$WHICH "$new_path" 2> /dev/null`
15767
15768  if test "x$new_path" = x; then
15769    # Oops. Which didn't find the executable.
15770    # The splitting of arguments from the executable at a space might have been incorrect,
15771    # since paths with space are more likely in Windows. Give it another try with the whole
15772    # argument.
15773    path="$complete"
15774    arguments="EOL"
15775    new_path="$path"
15776
15777  windows_path="$new_path"
15778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15779    unix_path=`$CYGPATH -u "$windows_path"`
15780    new_path="$unix_path"
15781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15783    new_path="$unix_path"
15784  fi
15785
15786
15787    new_path=`$WHICH "$new_path" 2> /dev/null`
15788    # bat and cmd files are not always considered executable in MSYS causing which
15789    # to not find them
15790    if test "x$new_path" = x \
15791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15793      new_path="$path"
15794
15795  windows_path="$new_path"
15796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15797    unix_path=`$CYGPATH -u "$windows_path"`
15798    new_path="$unix_path"
15799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15801    new_path="$unix_path"
15802  fi
15803
15804    fi
15805
15806    if test "x$new_path" = x; then
15807      # It's still not found. Now this is an unrecoverable error.
15808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15810      has_space=`$ECHO "$complete" | $GREP " "`
15811      if test "x$has_space" != x; then
15812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15814      fi
15815      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15816    fi
15817  fi
15818
15819  # Now new_path has a complete unix path to the binary
15820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15821    # Keep paths in /bin as-is, but remove trailing .exe if any
15822    new_path="${new_path/%.exe/}"
15823    # Do not save /bin paths to all_fixpath_prefixes!
15824  else
15825    # Not in mixed or Windows style, start by that.
15826    new_path=`cmd //c echo $new_path`
15827
15828  input_path="$new_path"
15829  # Check if we need to convert this using DOS-style short mode. If the path
15830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15831  # take no chances and rewrite it.
15832  # Note: m4 eats our [], so we need to use [ and ] instead.
15833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15834  if test "x$has_forbidden_chars" != x; then
15835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15837  fi
15838
15839    # Output is in $new_path
15840
15841  windows_path="$new_path"
15842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15843    unix_path=`$CYGPATH -u "$windows_path"`
15844    new_path="$unix_path"
15845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15847    new_path="$unix_path"
15848  fi
15849
15850    # remove trailing .exe if any
15851    new_path="${new_path/%.exe/}"
15852
15853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15855  fi
15856
15857    else
15858      # We're on a unix platform. Hooray! :)
15859      # First separate the path from the arguments. This will split at the first
15860      # space.
15861      complete="$FOUND_MAKE"
15862      path="${complete%% *}"
15863      tmp="$complete EOL"
15864      arguments="${tmp#* }"
15865
15866      # Cannot rely on the command "which" here since it doesn't always work.
15867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15868      if test -z "$is_absolute_path"; then
15869        # Path to executable is not absolute. Find it.
15870        IFS_save="$IFS"
15871        IFS=:
15872        for p in $PATH; do
15873          if test -f "$p/$path" && test -x "$p/$path"; then
15874            new_path="$p/$path"
15875            break
15876          fi
15877        done
15878        IFS="$IFS_save"
15879      else
15880        # This is an absolute path, we can use it without further modifications.
15881        new_path="$path"
15882      fi
15883
15884      if test "x$new_path" = x; then
15885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15887        has_space=`$ECHO "$complete" | $GREP " "`
15888        if test "x$has_space" != x; then
15889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15891        fi
15892        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15893      fi
15894    fi
15895
15896    # Now join together the path and the arguments once again
15897    if test "x$arguments" != xEOL; then
15898      new_complete="$new_path ${arguments% *}"
15899    else
15900      new_complete="$new_path"
15901    fi
15902
15903    if test "x$complete" != "x$new_complete"; then
15904      FOUND_MAKE="$new_complete"
15905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15906$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15907    fi
15908  fi
15909
15910        fi
15911      fi
15912    fi
15913  fi
15914
15915    if test "x$FOUND_MAKE" = x; then
15916      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15917    fi
15918  else
15919    # Try our hardest to locate a correct version of GNU make
15920    for ac_prog in gmake
15921do
15922  # Extract the first word of "$ac_prog", so it can be a program name with args.
15923set dummy $ac_prog; ac_word=$2
15924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15925$as_echo_n "checking for $ac_word... " >&6; }
15926if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15927  $as_echo_n "(cached) " >&6
15928else
15929  case $CHECK_GMAKE in
15930  [\\/]* | ?:[\\/]*)
15931  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15932  ;;
15933  *)
15934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15935for as_dir in $PATH
15936do
15937  IFS=$as_save_IFS
15938  test -z "$as_dir" && as_dir=.
15939    for ac_exec_ext in '' $ac_executable_extensions; do
15940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15941    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15943    break 2
15944  fi
15945done
15946  done
15947IFS=$as_save_IFS
15948
15949  ;;
15950esac
15951fi
15952CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15953if test -n "$CHECK_GMAKE"; then
15954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15955$as_echo "$CHECK_GMAKE" >&6; }
15956else
15957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15958$as_echo "no" >&6; }
15959fi
15960
15961
15962  test -n "$CHECK_GMAKE" && break
15963done
15964
15965
15966  MAKE_CANDIDATE=""$CHECK_GMAKE""
15967  DESCRIPTION="gmake in PATH"
15968
15969  # On Cygwin, we require a newer version of make than on other platforms
15970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15971    MAKE_VERSION_EXPR="-e 4\."
15972    MAKE_REQUIRED_VERSION="4.0"
15973   else
15974    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15975    MAKE_REQUIRED_VERSION="3.81"
15976  fi
15977
15978  if test "x$MAKE_CANDIDATE" != x; then
15979    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15980$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15981    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15982    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15983    if test "x$IS_GNU_MAKE" = x; then
15984      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15985$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15986    else
15987      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15988      if test "x$IS_MODERN_MAKE" = x; then
15989        { $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
15990$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;}
15991      else
15992        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15993          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15994            MAKE_EXPECTED_ENV='cygwin'
15995          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15996            MAKE_EXPECTED_ENV='msys'
15997          else
15998            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15999          fi
16000          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16001          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16002        else
16003          # Not relevant for non-Windows
16004          IS_MAKE_CORRECT_ENV=true
16005        fi
16006        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16007          { $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
16008$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;}
16009        else
16010          FOUND_MAKE=$MAKE_CANDIDATE
16011
16012  # Only process if variable expands to non-empty
16013
16014  if test "x$FOUND_MAKE" != x; then
16015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16016
16017  # First separate the path from the arguments. This will split at the first
16018  # space.
16019  complete="$FOUND_MAKE"
16020  path="${complete%% *}"
16021  tmp="$complete EOL"
16022  arguments="${tmp#* }"
16023
16024  # Input might be given as Windows format, start by converting to
16025  # unix format.
16026  new_path=`$CYGPATH -u "$path"`
16027
16028  # Now try to locate executable using which
16029  new_path=`$WHICH "$new_path" 2> /dev/null`
16030  # bat and cmd files are not always considered executable in cygwin causing which
16031  # to not find them
16032  if test "x$new_path" = x \
16033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16035    new_path=`$CYGPATH -u "$path"`
16036  fi
16037  if test "x$new_path" = x; then
16038    # Oops. Which didn't find the executable.
16039    # The splitting of arguments from the executable at a space might have been incorrect,
16040    # since paths with space are more likely in Windows. Give it another try with the whole
16041    # argument.
16042    path="$complete"
16043    arguments="EOL"
16044    new_path=`$CYGPATH -u "$path"`
16045    new_path=`$WHICH "$new_path" 2> /dev/null`
16046    # bat and cmd files are not always considered executable in cygwin causing which
16047    # to not find them
16048    if test "x$new_path" = x \
16049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16051      new_path=`$CYGPATH -u "$path"`
16052    fi
16053    if test "x$new_path" = x; then
16054      # It's still not found. Now this is an unrecoverable error.
16055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16057      has_space=`$ECHO "$complete" | $GREP " "`
16058      if test "x$has_space" != x; then
16059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16061      fi
16062      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16063    fi
16064  fi
16065
16066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16069  # "foo.exe" is OK but "foo" is an error.
16070  #
16071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16072  # It is also a way to make sure we got the proper file name for the real test later on.
16073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16074  if test "x$test_shortpath" = x; then
16075    # Short path failed, file does not exist as specified.
16076    # Try adding .exe or .cmd
16077    if test -f "${new_path}.exe"; then
16078      input_to_shortpath="${new_path}.exe"
16079    elif test -f "${new_path}.cmd"; then
16080      input_to_shortpath="${new_path}.cmd"
16081    else
16082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16086      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16087    fi
16088  else
16089    input_to_shortpath="$new_path"
16090  fi
16091
16092  # Call helper function which possibly converts this using DOS-style short mode.
16093  # If so, the updated path is stored in $new_path.
16094  new_path="$input_to_shortpath"
16095
16096  input_path="$input_to_shortpath"
16097  # Check if we need to convert this using DOS-style short mode. If the path
16098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16099  # take no chances and rewrite it.
16100  # Note: m4 eats our [], so we need to use [ and ] instead.
16101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16102  if test "x$has_forbidden_chars" != x; then
16103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16107      # Going to short mode and back again did indeed matter. Since short mode is
16108      # case insensitive, let's make it lowercase to improve readability.
16109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16110      # Now convert it back to Unix-style (cygpath)
16111      input_path=`$CYGPATH -u "$shortmode_path"`
16112      new_path="$input_path"
16113    fi
16114  fi
16115
16116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16117  if test "x$test_cygdrive_prefix" = x; then
16118    # As a simple fix, exclude /usr/bin since it's not a real path.
16119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16121      # a path prefixed by /cygdrive for fixpath to work.
16122      new_path="$CYGWIN_ROOT_PATH$input_path"
16123    fi
16124  fi
16125
16126  # remove trailing .exe if any
16127  new_path="${new_path/%.exe/}"
16128
16129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16130
16131  # First separate the path from the arguments. This will split at the first
16132  # space.
16133  complete="$FOUND_MAKE"
16134  path="${complete%% *}"
16135  tmp="$complete EOL"
16136  arguments="${tmp#* }"
16137
16138  # Input might be given as Windows format, start by converting to
16139  # unix format.
16140  new_path="$path"
16141
16142  windows_path="$new_path"
16143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16144    unix_path=`$CYGPATH -u "$windows_path"`
16145    new_path="$unix_path"
16146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16148    new_path="$unix_path"
16149  fi
16150
16151
16152  # Now try to locate executable using which
16153  new_path=`$WHICH "$new_path" 2> /dev/null`
16154
16155  if test "x$new_path" = x; then
16156    # Oops. Which didn't find the executable.
16157    # The splitting of arguments from the executable at a space might have been incorrect,
16158    # since paths with space are more likely in Windows. Give it another try with the whole
16159    # argument.
16160    path="$complete"
16161    arguments="EOL"
16162    new_path="$path"
16163
16164  windows_path="$new_path"
16165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16166    unix_path=`$CYGPATH -u "$windows_path"`
16167    new_path="$unix_path"
16168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16170    new_path="$unix_path"
16171  fi
16172
16173
16174    new_path=`$WHICH "$new_path" 2> /dev/null`
16175    # bat and cmd files are not always considered executable in MSYS causing which
16176    # to not find them
16177    if test "x$new_path" = x \
16178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16180      new_path="$path"
16181
16182  windows_path="$new_path"
16183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16184    unix_path=`$CYGPATH -u "$windows_path"`
16185    new_path="$unix_path"
16186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16188    new_path="$unix_path"
16189  fi
16190
16191    fi
16192
16193    if test "x$new_path" = x; then
16194      # It's still not found. Now this is an unrecoverable error.
16195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16197      has_space=`$ECHO "$complete" | $GREP " "`
16198      if test "x$has_space" != x; then
16199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16201      fi
16202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16203    fi
16204  fi
16205
16206  # Now new_path has a complete unix path to the binary
16207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16208    # Keep paths in /bin as-is, but remove trailing .exe if any
16209    new_path="${new_path/%.exe/}"
16210    # Do not save /bin paths to all_fixpath_prefixes!
16211  else
16212    # Not in mixed or Windows style, start by that.
16213    new_path=`cmd //c echo $new_path`
16214
16215  input_path="$new_path"
16216  # Check if we need to convert this using DOS-style short mode. If the path
16217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16218  # take no chances and rewrite it.
16219  # Note: m4 eats our [], so we need to use [ and ] instead.
16220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16221  if test "x$has_forbidden_chars" != x; then
16222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16224  fi
16225
16226    # Output is in $new_path
16227
16228  windows_path="$new_path"
16229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16230    unix_path=`$CYGPATH -u "$windows_path"`
16231    new_path="$unix_path"
16232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16234    new_path="$unix_path"
16235  fi
16236
16237    # remove trailing .exe if any
16238    new_path="${new_path/%.exe/}"
16239
16240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16242  fi
16243
16244    else
16245      # We're on a unix platform. Hooray! :)
16246      # First separate the path from the arguments. This will split at the first
16247      # space.
16248      complete="$FOUND_MAKE"
16249      path="${complete%% *}"
16250      tmp="$complete EOL"
16251      arguments="${tmp#* }"
16252
16253      # Cannot rely on the command "which" here since it doesn't always work.
16254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16255      if test -z "$is_absolute_path"; then
16256        # Path to executable is not absolute. Find it.
16257        IFS_save="$IFS"
16258        IFS=:
16259        for p in $PATH; do
16260          if test -f "$p/$path" && test -x "$p/$path"; then
16261            new_path="$p/$path"
16262            break
16263          fi
16264        done
16265        IFS="$IFS_save"
16266      else
16267        # This is an absolute path, we can use it without further modifications.
16268        new_path="$path"
16269      fi
16270
16271      if test "x$new_path" = x; then
16272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16274        has_space=`$ECHO "$complete" | $GREP " "`
16275        if test "x$has_space" != x; then
16276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16278        fi
16279        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16280      fi
16281    fi
16282
16283    # Now join together the path and the arguments once again
16284    if test "x$arguments" != xEOL; then
16285      new_complete="$new_path ${arguments% *}"
16286    else
16287      new_complete="$new_path"
16288    fi
16289
16290    if test "x$complete" != "x$new_complete"; then
16291      FOUND_MAKE="$new_complete"
16292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16293$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16294    fi
16295  fi
16296
16297        fi
16298      fi
16299    fi
16300  fi
16301
16302
16303    if test "x$FOUND_MAKE" = x; then
16304      for ac_prog in make
16305do
16306  # Extract the first word of "$ac_prog", so it can be a program name with args.
16307set dummy $ac_prog; ac_word=$2
16308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16309$as_echo_n "checking for $ac_word... " >&6; }
16310if ${ac_cv_path_CHECK_MAKE+:} false; then :
16311  $as_echo_n "(cached) " >&6
16312else
16313  case $CHECK_MAKE in
16314  [\\/]* | ?:[\\/]*)
16315  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16316  ;;
16317  *)
16318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16319for as_dir in $PATH
16320do
16321  IFS=$as_save_IFS
16322  test -z "$as_dir" && as_dir=.
16323    for ac_exec_ext in '' $ac_executable_extensions; do
16324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16325    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16327    break 2
16328  fi
16329done
16330  done
16331IFS=$as_save_IFS
16332
16333  ;;
16334esac
16335fi
16336CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16337if test -n "$CHECK_MAKE"; then
16338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16339$as_echo "$CHECK_MAKE" >&6; }
16340else
16341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16342$as_echo "no" >&6; }
16343fi
16344
16345
16346  test -n "$CHECK_MAKE" && break
16347done
16348
16349
16350  MAKE_CANDIDATE=""$CHECK_MAKE""
16351  DESCRIPTION="make in PATH"
16352
16353  # On Cygwin, we require a newer version of make than on other platforms
16354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16355    MAKE_VERSION_EXPR="-e 4\."
16356    MAKE_REQUIRED_VERSION="4.0"
16357   else
16358    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16359    MAKE_REQUIRED_VERSION="3.81"
16360  fi
16361
16362  if test "x$MAKE_CANDIDATE" != x; then
16363    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16364$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16365    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16366    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16367    if test "x$IS_GNU_MAKE" = x; then
16368      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16369$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16370    else
16371      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16372      if test "x$IS_MODERN_MAKE" = x; then
16373        { $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
16374$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;}
16375      else
16376        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16377          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378            MAKE_EXPECTED_ENV='cygwin'
16379          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380            MAKE_EXPECTED_ENV='msys'
16381          else
16382            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16383          fi
16384          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16385          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16386        else
16387          # Not relevant for non-Windows
16388          IS_MAKE_CORRECT_ENV=true
16389        fi
16390        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16391          { $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
16392$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;}
16393        else
16394          FOUND_MAKE=$MAKE_CANDIDATE
16395
16396  # Only process if variable expands to non-empty
16397
16398  if test "x$FOUND_MAKE" != x; then
16399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16400
16401  # First separate the path from the arguments. This will split at the first
16402  # space.
16403  complete="$FOUND_MAKE"
16404  path="${complete%% *}"
16405  tmp="$complete EOL"
16406  arguments="${tmp#* }"
16407
16408  # Input might be given as Windows format, start by converting to
16409  # unix format.
16410  new_path=`$CYGPATH -u "$path"`
16411
16412  # Now try to locate executable using which
16413  new_path=`$WHICH "$new_path" 2> /dev/null`
16414  # bat and cmd files are not always considered executable in cygwin causing which
16415  # to not find them
16416  if test "x$new_path" = x \
16417      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16418      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16419    new_path=`$CYGPATH -u "$path"`
16420  fi
16421  if test "x$new_path" = x; then
16422    # Oops. Which didn't find the executable.
16423    # The splitting of arguments from the executable at a space might have been incorrect,
16424    # since paths with space are more likely in Windows. Give it another try with the whole
16425    # argument.
16426    path="$complete"
16427    arguments="EOL"
16428    new_path=`$CYGPATH -u "$path"`
16429    new_path=`$WHICH "$new_path" 2> /dev/null`
16430    # bat and cmd files are not always considered executable in cygwin causing which
16431    # to not find them
16432    if test "x$new_path" = x \
16433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16435      new_path=`$CYGPATH -u "$path"`
16436    fi
16437    if test "x$new_path" = x; then
16438      # It's still not found. Now this is an unrecoverable error.
16439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16441      has_space=`$ECHO "$complete" | $GREP " "`
16442      if test "x$has_space" != x; then
16443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16445      fi
16446      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16447    fi
16448  fi
16449
16450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16453  # "foo.exe" is OK but "foo" is an error.
16454  #
16455  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16456  # It is also a way to make sure we got the proper file name for the real test later on.
16457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16458  if test "x$test_shortpath" = x; then
16459    # Short path failed, file does not exist as specified.
16460    # Try adding .exe or .cmd
16461    if test -f "${new_path}.exe"; then
16462      input_to_shortpath="${new_path}.exe"
16463    elif test -f "${new_path}.cmd"; then
16464      input_to_shortpath="${new_path}.cmd"
16465    else
16466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16471    fi
16472  else
16473    input_to_shortpath="$new_path"
16474  fi
16475
16476  # Call helper function which possibly converts this using DOS-style short mode.
16477  # If so, the updated path is stored in $new_path.
16478  new_path="$input_to_shortpath"
16479
16480  input_path="$input_to_shortpath"
16481  # Check if we need to convert this using DOS-style short mode. If the path
16482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16483  # take no chances and rewrite it.
16484  # Note: m4 eats our [], so we need to use [ and ] instead.
16485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16486  if test "x$has_forbidden_chars" != x; then
16487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16491      # Going to short mode and back again did indeed matter. Since short mode is
16492      # case insensitive, let's make it lowercase to improve readability.
16493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16494      # Now convert it back to Unix-style (cygpath)
16495      input_path=`$CYGPATH -u "$shortmode_path"`
16496      new_path="$input_path"
16497    fi
16498  fi
16499
16500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16501  if test "x$test_cygdrive_prefix" = x; then
16502    # As a simple fix, exclude /usr/bin since it's not a real path.
16503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16505      # a path prefixed by /cygdrive for fixpath to work.
16506      new_path="$CYGWIN_ROOT_PATH$input_path"
16507    fi
16508  fi
16509
16510  # remove trailing .exe if any
16511  new_path="${new_path/%.exe/}"
16512
16513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16514
16515  # First separate the path from the arguments. This will split at the first
16516  # space.
16517  complete="$FOUND_MAKE"
16518  path="${complete%% *}"
16519  tmp="$complete EOL"
16520  arguments="${tmp#* }"
16521
16522  # Input might be given as Windows format, start by converting to
16523  # unix format.
16524  new_path="$path"
16525
16526  windows_path="$new_path"
16527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16528    unix_path=`$CYGPATH -u "$windows_path"`
16529    new_path="$unix_path"
16530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16532    new_path="$unix_path"
16533  fi
16534
16535
16536  # Now try to locate executable using which
16537  new_path=`$WHICH "$new_path" 2> /dev/null`
16538
16539  if test "x$new_path" = x; then
16540    # Oops. Which didn't find the executable.
16541    # The splitting of arguments from the executable at a space might have been incorrect,
16542    # since paths with space are more likely in Windows. Give it another try with the whole
16543    # argument.
16544    path="$complete"
16545    arguments="EOL"
16546    new_path="$path"
16547
16548  windows_path="$new_path"
16549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16550    unix_path=`$CYGPATH -u "$windows_path"`
16551    new_path="$unix_path"
16552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16554    new_path="$unix_path"
16555  fi
16556
16557
16558    new_path=`$WHICH "$new_path" 2> /dev/null`
16559    # bat and cmd files are not always considered executable in MSYS causing which
16560    # to not find them
16561    if test "x$new_path" = x \
16562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16564      new_path="$path"
16565
16566  windows_path="$new_path"
16567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16568    unix_path=`$CYGPATH -u "$windows_path"`
16569    new_path="$unix_path"
16570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16572    new_path="$unix_path"
16573  fi
16574
16575    fi
16576
16577    if test "x$new_path" = x; then
16578      # It's still not found. Now this is an unrecoverable error.
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16581      has_space=`$ECHO "$complete" | $GREP " "`
16582      if test "x$has_space" != x; then
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16585      fi
16586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16587    fi
16588  fi
16589
16590  # Now new_path has a complete unix path to the binary
16591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16592    # Keep paths in /bin as-is, but remove trailing .exe if any
16593    new_path="${new_path/%.exe/}"
16594    # Do not save /bin paths to all_fixpath_prefixes!
16595  else
16596    # Not in mixed or Windows style, start by that.
16597    new_path=`cmd //c echo $new_path`
16598
16599  input_path="$new_path"
16600  # Check if we need to convert this using DOS-style short mode. If the path
16601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16602  # take no chances and rewrite it.
16603  # Note: m4 eats our [], so we need to use [ and ] instead.
16604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16605  if test "x$has_forbidden_chars" != x; then
16606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16608  fi
16609
16610    # Output is in $new_path
16611
16612  windows_path="$new_path"
16613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16614    unix_path=`$CYGPATH -u "$windows_path"`
16615    new_path="$unix_path"
16616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16618    new_path="$unix_path"
16619  fi
16620
16621    # remove trailing .exe if any
16622    new_path="${new_path/%.exe/}"
16623
16624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16626  fi
16627
16628    else
16629      # We're on a unix platform. Hooray! :)
16630      # First separate the path from the arguments. This will split at the first
16631      # space.
16632      complete="$FOUND_MAKE"
16633      path="${complete%% *}"
16634      tmp="$complete EOL"
16635      arguments="${tmp#* }"
16636
16637      # Cannot rely on the command "which" here since it doesn't always work.
16638      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16639      if test -z "$is_absolute_path"; then
16640        # Path to executable is not absolute. Find it.
16641        IFS_save="$IFS"
16642        IFS=:
16643        for p in $PATH; do
16644          if test -f "$p/$path" && test -x "$p/$path"; then
16645            new_path="$p/$path"
16646            break
16647          fi
16648        done
16649        IFS="$IFS_save"
16650      else
16651        # This is an absolute path, we can use it without further modifications.
16652        new_path="$path"
16653      fi
16654
16655      if test "x$new_path" = x; then
16656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16658        has_space=`$ECHO "$complete" | $GREP " "`
16659        if test "x$has_space" != x; then
16660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16662        fi
16663        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16664      fi
16665    fi
16666
16667    # Now join together the path and the arguments once again
16668    if test "x$arguments" != xEOL; then
16669      new_complete="$new_path ${arguments% *}"
16670    else
16671      new_complete="$new_path"
16672    fi
16673
16674    if test "x$complete" != "x$new_complete"; then
16675      FOUND_MAKE="$new_complete"
16676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16677$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16678    fi
16679  fi
16680
16681        fi
16682      fi
16683    fi
16684  fi
16685
16686    fi
16687
16688    if test "x$FOUND_MAKE" = x; then
16689      if test "x$TOOLCHAIN_PATH" != x; then
16690        # We have a toolchain path, check that as well before giving up.
16691        OLD_PATH=$PATH
16692        PATH=$TOOLCHAIN_PATH:$PATH
16693        for ac_prog in gmake
16694do
16695  # Extract the first word of "$ac_prog", so it can be a program name with args.
16696set dummy $ac_prog; ac_word=$2
16697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16698$as_echo_n "checking for $ac_word... " >&6; }
16699if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16700  $as_echo_n "(cached) " >&6
16701else
16702  case $CHECK_TOOLSDIR_GMAKE in
16703  [\\/]* | ?:[\\/]*)
16704  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16705  ;;
16706  *)
16707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16708for as_dir in $PATH
16709do
16710  IFS=$as_save_IFS
16711  test -z "$as_dir" && as_dir=.
16712    for ac_exec_ext in '' $ac_executable_extensions; do
16713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16714    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16716    break 2
16717  fi
16718done
16719  done
16720IFS=$as_save_IFS
16721
16722  ;;
16723esac
16724fi
16725CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16726if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16728$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16729else
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16731$as_echo "no" >&6; }
16732fi
16733
16734
16735  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16736done
16737
16738
16739  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16740  DESCRIPTION="gmake in tools-dir"
16741
16742  # On Cygwin, we require a newer version of make than on other platforms
16743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16744    MAKE_VERSION_EXPR="-e 4\."
16745    MAKE_REQUIRED_VERSION="4.0"
16746   else
16747    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16748    MAKE_REQUIRED_VERSION="3.81"
16749  fi
16750
16751  if test "x$MAKE_CANDIDATE" != x; then
16752    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16753$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16754    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16755    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16756    if test "x$IS_GNU_MAKE" = x; then
16757      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16758$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16759    else
16760      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16761      if test "x$IS_MODERN_MAKE" = x; then
16762        { $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
16763$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;}
16764      else
16765        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16766          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16767            MAKE_EXPECTED_ENV='cygwin'
16768          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16769            MAKE_EXPECTED_ENV='msys'
16770          else
16771            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16772          fi
16773          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16774          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16775        else
16776          # Not relevant for non-Windows
16777          IS_MAKE_CORRECT_ENV=true
16778        fi
16779        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16780          { $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
16781$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;}
16782        else
16783          FOUND_MAKE=$MAKE_CANDIDATE
16784
16785  # Only process if variable expands to non-empty
16786
16787  if test "x$FOUND_MAKE" != x; then
16788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16789
16790  # First separate the path from the arguments. This will split at the first
16791  # space.
16792  complete="$FOUND_MAKE"
16793  path="${complete%% *}"
16794  tmp="$complete EOL"
16795  arguments="${tmp#* }"
16796
16797  # Input might be given as Windows format, start by converting to
16798  # unix format.
16799  new_path=`$CYGPATH -u "$path"`
16800
16801  # Now try to locate executable using which
16802  new_path=`$WHICH "$new_path" 2> /dev/null`
16803  # bat and cmd files are not always considered executable in cygwin causing which
16804  # to not find them
16805  if test "x$new_path" = x \
16806      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16807      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16808    new_path=`$CYGPATH -u "$path"`
16809  fi
16810  if test "x$new_path" = x; then
16811    # Oops. Which didn't find the executable.
16812    # The splitting of arguments from the executable at a space might have been incorrect,
16813    # since paths with space are more likely in Windows. Give it another try with the whole
16814    # argument.
16815    path="$complete"
16816    arguments="EOL"
16817    new_path=`$CYGPATH -u "$path"`
16818    new_path=`$WHICH "$new_path" 2> /dev/null`
16819    # bat and cmd files are not always considered executable in cygwin causing which
16820    # to not find them
16821    if test "x$new_path" = x \
16822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16824      new_path=`$CYGPATH -u "$path"`
16825    fi
16826    if test "x$new_path" = x; then
16827      # It's still not found. Now this is an unrecoverable error.
16828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16829$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16830      has_space=`$ECHO "$complete" | $GREP " "`
16831      if test "x$has_space" != x; then
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16834      fi
16835      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16836    fi
16837  fi
16838
16839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16842  # "foo.exe" is OK but "foo" is an error.
16843  #
16844  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16845  # It is also a way to make sure we got the proper file name for the real test later on.
16846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16847  if test "x$test_shortpath" = x; then
16848    # Short path failed, file does not exist as specified.
16849    # Try adding .exe or .cmd
16850    if test -f "${new_path}.exe"; then
16851      input_to_shortpath="${new_path}.exe"
16852    elif test -f "${new_path}.cmd"; then
16853      input_to_shortpath="${new_path}.cmd"
16854    else
16855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16859      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16860    fi
16861  else
16862    input_to_shortpath="$new_path"
16863  fi
16864
16865  # Call helper function which possibly converts this using DOS-style short mode.
16866  # If so, the updated path is stored in $new_path.
16867  new_path="$input_to_shortpath"
16868
16869  input_path="$input_to_shortpath"
16870  # Check if we need to convert this using DOS-style short mode. If the path
16871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16872  # take no chances and rewrite it.
16873  # Note: m4 eats our [], so we need to use [ and ] instead.
16874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16875  if test "x$has_forbidden_chars" != x; then
16876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16880      # Going to short mode and back again did indeed matter. Since short mode is
16881      # case insensitive, let's make it lowercase to improve readability.
16882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16883      # Now convert it back to Unix-style (cygpath)
16884      input_path=`$CYGPATH -u "$shortmode_path"`
16885      new_path="$input_path"
16886    fi
16887  fi
16888
16889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16890  if test "x$test_cygdrive_prefix" = x; then
16891    # As a simple fix, exclude /usr/bin since it's not a real path.
16892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16894      # a path prefixed by /cygdrive for fixpath to work.
16895      new_path="$CYGWIN_ROOT_PATH$input_path"
16896    fi
16897  fi
16898
16899  # remove trailing .exe if any
16900  new_path="${new_path/%.exe/}"
16901
16902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16903
16904  # First separate the path from the arguments. This will split at the first
16905  # space.
16906  complete="$FOUND_MAKE"
16907  path="${complete%% *}"
16908  tmp="$complete EOL"
16909  arguments="${tmp#* }"
16910
16911  # Input might be given as Windows format, start by converting to
16912  # unix format.
16913  new_path="$path"
16914
16915  windows_path="$new_path"
16916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16917    unix_path=`$CYGPATH -u "$windows_path"`
16918    new_path="$unix_path"
16919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16921    new_path="$unix_path"
16922  fi
16923
16924
16925  # Now try to locate executable using which
16926  new_path=`$WHICH "$new_path" 2> /dev/null`
16927
16928  if test "x$new_path" = x; then
16929    # Oops. Which didn't find the executable.
16930    # The splitting of arguments from the executable at a space might have been incorrect,
16931    # since paths with space are more likely in Windows. Give it another try with the whole
16932    # argument.
16933    path="$complete"
16934    arguments="EOL"
16935    new_path="$path"
16936
16937  windows_path="$new_path"
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939    unix_path=`$CYGPATH -u "$windows_path"`
16940    new_path="$unix_path"
16941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16943    new_path="$unix_path"
16944  fi
16945
16946
16947    new_path=`$WHICH "$new_path" 2> /dev/null`
16948    # bat and cmd files are not always considered executable in MSYS causing which
16949    # to not find them
16950    if test "x$new_path" = x \
16951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16953      new_path="$path"
16954
16955  windows_path="$new_path"
16956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16957    unix_path=`$CYGPATH -u "$windows_path"`
16958    new_path="$unix_path"
16959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16961    new_path="$unix_path"
16962  fi
16963
16964    fi
16965
16966    if test "x$new_path" = x; then
16967      # It's still not found. Now this is an unrecoverable error.
16968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16969$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16970      has_space=`$ECHO "$complete" | $GREP " "`
16971      if test "x$has_space" != x; then
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16974      fi
16975      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16976    fi
16977  fi
16978
16979  # Now new_path has a complete unix path to the binary
16980  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16981    # Keep paths in /bin as-is, but remove trailing .exe if any
16982    new_path="${new_path/%.exe/}"
16983    # Do not save /bin paths to all_fixpath_prefixes!
16984  else
16985    # Not in mixed or Windows style, start by that.
16986    new_path=`cmd //c echo $new_path`
16987
16988  input_path="$new_path"
16989  # Check if we need to convert this using DOS-style short mode. If the path
16990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16991  # take no chances and rewrite it.
16992  # Note: m4 eats our [], so we need to use [ and ] instead.
16993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16994  if test "x$has_forbidden_chars" != x; then
16995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16997  fi
16998
16999    # Output is in $new_path
17000
17001  windows_path="$new_path"
17002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17003    unix_path=`$CYGPATH -u "$windows_path"`
17004    new_path="$unix_path"
17005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17007    new_path="$unix_path"
17008  fi
17009
17010    # remove trailing .exe if any
17011    new_path="${new_path/%.exe/}"
17012
17013    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17014    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17015  fi
17016
17017    else
17018      # We're on a unix platform. Hooray! :)
17019      # First separate the path from the arguments. This will split at the first
17020      # space.
17021      complete="$FOUND_MAKE"
17022      path="${complete%% *}"
17023      tmp="$complete EOL"
17024      arguments="${tmp#* }"
17025
17026      # Cannot rely on the command "which" here since it doesn't always work.
17027      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17028      if test -z "$is_absolute_path"; then
17029        # Path to executable is not absolute. Find it.
17030        IFS_save="$IFS"
17031        IFS=:
17032        for p in $PATH; do
17033          if test -f "$p/$path" && test -x "$p/$path"; then
17034            new_path="$p/$path"
17035            break
17036          fi
17037        done
17038        IFS="$IFS_save"
17039      else
17040        # This is an absolute path, we can use it without further modifications.
17041        new_path="$path"
17042      fi
17043
17044      if test "x$new_path" = x; then
17045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17046$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17047        has_space=`$ECHO "$complete" | $GREP " "`
17048        if test "x$has_space" != x; then
17049          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17050$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17051        fi
17052        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17053      fi
17054    fi
17055
17056    # Now join together the path and the arguments once again
17057    if test "x$arguments" != xEOL; then
17058      new_complete="$new_path ${arguments% *}"
17059    else
17060      new_complete="$new_path"
17061    fi
17062
17063    if test "x$complete" != "x$new_complete"; then
17064      FOUND_MAKE="$new_complete"
17065      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17066$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17067    fi
17068  fi
17069
17070        fi
17071      fi
17072    fi
17073  fi
17074
17075        if test "x$FOUND_MAKE" = x; then
17076          for ac_prog in make
17077do
17078  # Extract the first word of "$ac_prog", so it can be a program name with args.
17079set dummy $ac_prog; ac_word=$2
17080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17081$as_echo_n "checking for $ac_word... " >&6; }
17082if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17083  $as_echo_n "(cached) " >&6
17084else
17085  case $CHECK_TOOLSDIR_MAKE in
17086  [\\/]* | ?:[\\/]*)
17087  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17088  ;;
17089  *)
17090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17091for as_dir in $PATH
17092do
17093  IFS=$as_save_IFS
17094  test -z "$as_dir" && as_dir=.
17095    for ac_exec_ext in '' $ac_executable_extensions; do
17096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17097    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17099    break 2
17100  fi
17101done
17102  done
17103IFS=$as_save_IFS
17104
17105  ;;
17106esac
17107fi
17108CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17109if test -n "$CHECK_TOOLSDIR_MAKE"; then
17110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17111$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17112else
17113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17114$as_echo "no" >&6; }
17115fi
17116
17117
17118  test -n "$CHECK_TOOLSDIR_MAKE" && break
17119done
17120
17121
17122  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17123  DESCRIPTION="make in tools-dir"
17124
17125  # On Cygwin, we require a newer version of make than on other platforms
17126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17127    MAKE_VERSION_EXPR="-e 4\."
17128    MAKE_REQUIRED_VERSION="4.0"
17129   else
17130    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17131    MAKE_REQUIRED_VERSION="3.81"
17132  fi
17133
17134  if test "x$MAKE_CANDIDATE" != x; then
17135    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17136$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17137    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17138    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17139    if test "x$IS_GNU_MAKE" = x; then
17140      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17141$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17142    else
17143      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17144      if test "x$IS_MODERN_MAKE" = x; then
17145        { $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
17146$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;}
17147      else
17148        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17149          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17150            MAKE_EXPECTED_ENV='cygwin'
17151          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17152            MAKE_EXPECTED_ENV='msys'
17153          else
17154            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17155          fi
17156          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17157          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17158        else
17159          # Not relevant for non-Windows
17160          IS_MAKE_CORRECT_ENV=true
17161        fi
17162        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17163          { $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
17164$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;}
17165        else
17166          FOUND_MAKE=$MAKE_CANDIDATE
17167
17168  # Only process if variable expands to non-empty
17169
17170  if test "x$FOUND_MAKE" != x; then
17171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17172
17173  # First separate the path from the arguments. This will split at the first
17174  # space.
17175  complete="$FOUND_MAKE"
17176  path="${complete%% *}"
17177  tmp="$complete EOL"
17178  arguments="${tmp#* }"
17179
17180  # Input might be given as Windows format, start by converting to
17181  # unix format.
17182  new_path=`$CYGPATH -u "$path"`
17183
17184  # Now try to locate executable using which
17185  new_path=`$WHICH "$new_path" 2> /dev/null`
17186  # bat and cmd files are not always considered executable in cygwin causing which
17187  # to not find them
17188  if test "x$new_path" = x \
17189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17191    new_path=`$CYGPATH -u "$path"`
17192  fi
17193  if test "x$new_path" = x; then
17194    # Oops. Which didn't find the executable.
17195    # The splitting of arguments from the executable at a space might have been incorrect,
17196    # since paths with space are more likely in Windows. Give it another try with the whole
17197    # argument.
17198    path="$complete"
17199    arguments="EOL"
17200    new_path=`$CYGPATH -u "$path"`
17201    new_path=`$WHICH "$new_path" 2> /dev/null`
17202    # bat and cmd files are not always considered executable in cygwin causing which
17203    # to not find them
17204    if test "x$new_path" = x \
17205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17207      new_path=`$CYGPATH -u "$path"`
17208    fi
17209    if test "x$new_path" = x; then
17210      # It's still not found. Now this is an unrecoverable error.
17211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17213      has_space=`$ECHO "$complete" | $GREP " "`
17214      if test "x$has_space" != x; then
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17217      fi
17218      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17219    fi
17220  fi
17221
17222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17225  # "foo.exe" is OK but "foo" is an error.
17226  #
17227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17228  # It is also a way to make sure we got the proper file name for the real test later on.
17229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17230  if test "x$test_shortpath" = x; then
17231    # Short path failed, file does not exist as specified.
17232    # Try adding .exe or .cmd
17233    if test -f "${new_path}.exe"; then
17234      input_to_shortpath="${new_path}.exe"
17235    elif test -f "${new_path}.cmd"; then
17236      input_to_shortpath="${new_path}.cmd"
17237    else
17238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17243    fi
17244  else
17245    input_to_shortpath="$new_path"
17246  fi
17247
17248  # Call helper function which possibly converts this using DOS-style short mode.
17249  # If so, the updated path is stored in $new_path.
17250  new_path="$input_to_shortpath"
17251
17252  input_path="$input_to_shortpath"
17253  # Check if we need to convert this using DOS-style short mode. If the path
17254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17255  # take no chances and rewrite it.
17256  # Note: m4 eats our [], so we need to use [ and ] instead.
17257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17258  if test "x$has_forbidden_chars" != x; then
17259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17263      # Going to short mode and back again did indeed matter. Since short mode is
17264      # case insensitive, let's make it lowercase to improve readability.
17265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17266      # Now convert it back to Unix-style (cygpath)
17267      input_path=`$CYGPATH -u "$shortmode_path"`
17268      new_path="$input_path"
17269    fi
17270  fi
17271
17272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17273  if test "x$test_cygdrive_prefix" = x; then
17274    # As a simple fix, exclude /usr/bin since it's not a real path.
17275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17277      # a path prefixed by /cygdrive for fixpath to work.
17278      new_path="$CYGWIN_ROOT_PATH$input_path"
17279    fi
17280  fi
17281
17282  # remove trailing .exe if any
17283  new_path="${new_path/%.exe/}"
17284
17285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17286
17287  # First separate the path from the arguments. This will split at the first
17288  # space.
17289  complete="$FOUND_MAKE"
17290  path="${complete%% *}"
17291  tmp="$complete EOL"
17292  arguments="${tmp#* }"
17293
17294  # Input might be given as Windows format, start by converting to
17295  # unix format.
17296  new_path="$path"
17297
17298  windows_path="$new_path"
17299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17300    unix_path=`$CYGPATH -u "$windows_path"`
17301    new_path="$unix_path"
17302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17304    new_path="$unix_path"
17305  fi
17306
17307
17308  # Now try to locate executable using which
17309  new_path=`$WHICH "$new_path" 2> /dev/null`
17310
17311  if test "x$new_path" = x; then
17312    # Oops. Which didn't find the executable.
17313    # The splitting of arguments from the executable at a space might have been incorrect,
17314    # since paths with space are more likely in Windows. Give it another try with the whole
17315    # argument.
17316    path="$complete"
17317    arguments="EOL"
17318    new_path="$path"
17319
17320  windows_path="$new_path"
17321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17322    unix_path=`$CYGPATH -u "$windows_path"`
17323    new_path="$unix_path"
17324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17326    new_path="$unix_path"
17327  fi
17328
17329
17330    new_path=`$WHICH "$new_path" 2> /dev/null`
17331    # bat and cmd files are not always considered executable in MSYS causing which
17332    # to not find them
17333    if test "x$new_path" = x \
17334        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17335        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17336      new_path="$path"
17337
17338  windows_path="$new_path"
17339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340    unix_path=`$CYGPATH -u "$windows_path"`
17341    new_path="$unix_path"
17342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17344    new_path="$unix_path"
17345  fi
17346
17347    fi
17348
17349    if test "x$new_path" = x; then
17350      # It's still not found. Now this is an unrecoverable error.
17351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17353      has_space=`$ECHO "$complete" | $GREP " "`
17354      if test "x$has_space" != x; then
17355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17357      fi
17358      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17359    fi
17360  fi
17361
17362  # Now new_path has a complete unix path to the binary
17363  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17364    # Keep paths in /bin as-is, but remove trailing .exe if any
17365    new_path="${new_path/%.exe/}"
17366    # Do not save /bin paths to all_fixpath_prefixes!
17367  else
17368    # Not in mixed or Windows style, start by that.
17369    new_path=`cmd //c echo $new_path`
17370
17371  input_path="$new_path"
17372  # Check if we need to convert this using DOS-style short mode. If the path
17373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17374  # take no chances and rewrite it.
17375  # Note: m4 eats our [], so we need to use [ and ] instead.
17376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17377  if test "x$has_forbidden_chars" != x; then
17378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17380  fi
17381
17382    # Output is in $new_path
17383
17384  windows_path="$new_path"
17385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17386    unix_path=`$CYGPATH -u "$windows_path"`
17387    new_path="$unix_path"
17388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17390    new_path="$unix_path"
17391  fi
17392
17393    # remove trailing .exe if any
17394    new_path="${new_path/%.exe/}"
17395
17396    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17397    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17398  fi
17399
17400    else
17401      # We're on a unix platform. Hooray! :)
17402      # First separate the path from the arguments. This will split at the first
17403      # space.
17404      complete="$FOUND_MAKE"
17405      path="${complete%% *}"
17406      tmp="$complete EOL"
17407      arguments="${tmp#* }"
17408
17409      # Cannot rely on the command "which" here since it doesn't always work.
17410      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17411      if test -z "$is_absolute_path"; then
17412        # Path to executable is not absolute. Find it.
17413        IFS_save="$IFS"
17414        IFS=:
17415        for p in $PATH; do
17416          if test -f "$p/$path" && test -x "$p/$path"; then
17417            new_path="$p/$path"
17418            break
17419          fi
17420        done
17421        IFS="$IFS_save"
17422      else
17423        # This is an absolute path, we can use it without further modifications.
17424        new_path="$path"
17425      fi
17426
17427      if test "x$new_path" = x; then
17428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17430        has_space=`$ECHO "$complete" | $GREP " "`
17431        if test "x$has_space" != x; then
17432          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17433$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17434        fi
17435        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17436      fi
17437    fi
17438
17439    # Now join together the path and the arguments once again
17440    if test "x$arguments" != xEOL; then
17441      new_complete="$new_path ${arguments% *}"
17442    else
17443      new_complete="$new_path"
17444    fi
17445
17446    if test "x$complete" != "x$new_complete"; then
17447      FOUND_MAKE="$new_complete"
17448      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17449$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17450    fi
17451  fi
17452
17453        fi
17454      fi
17455    fi
17456  fi
17457
17458        fi
17459        PATH=$OLD_PATH
17460      fi
17461    fi
17462
17463    if test "x$FOUND_MAKE" = x; then
17464      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
17465    fi
17466  fi
17467
17468  MAKE=$FOUND_MAKE
17469
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17471$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17472
17473
17474  # Check if make supports the output sync option and if so, setup using it.
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17476$as_echo_n "checking if make --output-sync is supported... " >&6; }
17477  if $MAKE --version -O > /dev/null 2>&1; then
17478    OUTPUT_SYNC_SUPPORTED=true
17479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17480$as_echo "yes" >&6; }
17481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17482$as_echo_n "checking for output-sync value... " >&6; }
17483
17484# Check whether --with-output-sync was given.
17485if test "${with_output_sync+set}" = set; then :
17486  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17487fi
17488
17489    if test "x$OUTPUT_SYNC" = "x"; then
17490      OUTPUT_SYNC=none
17491    fi
17492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17493$as_echo "$OUTPUT_SYNC" >&6; }
17494    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17495      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17496    fi
17497  else
17498    OUTPUT_SYNC_SUPPORTED=false
17499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17500$as_echo "no" >&6; }
17501  fi
17502
17503
17504
17505
17506
17507
17508  # Test if find supports -delete
17509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17510$as_echo_n "checking if find supports -delete... " >&6; }
17511  FIND_DELETE="-delete"
17512
17513  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17514
17515  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17516
17517  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17518  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17519    # No, it does not.
17520    rm $DELETEDIR/TestIfFindSupportsDelete
17521    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17522      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17523      FIND_DELETE="-print | xargs rm"
17524    else
17525      FIND_DELETE="-exec rm \{\} \+"
17526    fi
17527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17528$as_echo "no" >&6; }
17529  else
17530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17531$as_echo "yes" >&6; }
17532  fi
17533  rmdir $DELETEDIR
17534
17535
17536
17537  # These tools might not be installed by default,
17538  # need hint on how to install them.
17539
17540
17541
17542  # Publish this variable in the help.
17543
17544
17545  if test "x$UNZIP" = x; then
17546    # The variable is not set by user, try to locate tool using the code snippet
17547    for ac_prog in unzip
17548do
17549  # Extract the first word of "$ac_prog", so it can be a program name with args.
17550set dummy $ac_prog; ac_word=$2
17551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17552$as_echo_n "checking for $ac_word... " >&6; }
17553if ${ac_cv_path_UNZIP+:} false; then :
17554  $as_echo_n "(cached) " >&6
17555else
17556  case $UNZIP in
17557  [\\/]* | ?:[\\/]*)
17558  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17559  ;;
17560  *)
17561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17562for as_dir in $PATH
17563do
17564  IFS=$as_save_IFS
17565  test -z "$as_dir" && as_dir=.
17566    for ac_exec_ext in '' $ac_executable_extensions; do
17567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17568    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17570    break 2
17571  fi
17572done
17573  done
17574IFS=$as_save_IFS
17575
17576  ;;
17577esac
17578fi
17579UNZIP=$ac_cv_path_UNZIP
17580if test -n "$UNZIP"; then
17581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17582$as_echo "$UNZIP" >&6; }
17583else
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17585$as_echo "no" >&6; }
17586fi
17587
17588
17589  test -n "$UNZIP" && break
17590done
17591
17592  else
17593    # The variable is set, but is it from the command line or the environment?
17594
17595    # Try to remove the string !UNZIP! from our list.
17596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17598      # If it failed, the variable was not from the command line. Ignore it,
17599      # but warn the user (except for BASH, which is always set by the calling BASH).
17600      if test "xUNZIP" != xBASH; then
17601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17602$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17603      fi
17604      # Try to locate tool using the code snippet
17605      for ac_prog in unzip
17606do
17607  # Extract the first word of "$ac_prog", so it can be a program name with args.
17608set dummy $ac_prog; ac_word=$2
17609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17610$as_echo_n "checking for $ac_word... " >&6; }
17611if ${ac_cv_path_UNZIP+:} false; then :
17612  $as_echo_n "(cached) " >&6
17613else
17614  case $UNZIP in
17615  [\\/]* | ?:[\\/]*)
17616  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17617  ;;
17618  *)
17619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17620for as_dir in $PATH
17621do
17622  IFS=$as_save_IFS
17623  test -z "$as_dir" && as_dir=.
17624    for ac_exec_ext in '' $ac_executable_extensions; do
17625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17626    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17628    break 2
17629  fi
17630done
17631  done
17632IFS=$as_save_IFS
17633
17634  ;;
17635esac
17636fi
17637UNZIP=$ac_cv_path_UNZIP
17638if test -n "$UNZIP"; then
17639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17640$as_echo "$UNZIP" >&6; }
17641else
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17643$as_echo "no" >&6; }
17644fi
17645
17646
17647  test -n "$UNZIP" && break
17648done
17649
17650    else
17651      # If it succeeded, then it was overridden by the user. We will use it
17652      # for the tool.
17653
17654      # First remove it from the list of overridden variables, so we can test
17655      # for unknown variables in the end.
17656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17657
17658      # Check if the provided tool contains a complete path.
17659      tool_specified="$UNZIP"
17660      tool_basename="${tool_specified##*/}"
17661      if test "x$tool_basename" = "x$tool_specified"; then
17662        # A command without a complete path is provided, search $PATH.
17663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17664$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17665        # Extract the first word of "$tool_basename", so it can be a program name with args.
17666set dummy $tool_basename; ac_word=$2
17667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17668$as_echo_n "checking for $ac_word... " >&6; }
17669if ${ac_cv_path_UNZIP+:} false; then :
17670  $as_echo_n "(cached) " >&6
17671else
17672  case $UNZIP in
17673  [\\/]* | ?:[\\/]*)
17674  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17675  ;;
17676  *)
17677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17678for as_dir in $PATH
17679do
17680  IFS=$as_save_IFS
17681  test -z "$as_dir" && as_dir=.
17682    for ac_exec_ext in '' $ac_executable_extensions; do
17683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17684    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17686    break 2
17687  fi
17688done
17689  done
17690IFS=$as_save_IFS
17691
17692  ;;
17693esac
17694fi
17695UNZIP=$ac_cv_path_UNZIP
17696if test -n "$UNZIP"; then
17697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17698$as_echo "$UNZIP" >&6; }
17699else
17700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17701$as_echo "no" >&6; }
17702fi
17703
17704
17705        if test "x$UNZIP" = x; then
17706          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17707        fi
17708      else
17709        # Otherwise we believe it is a complete path. Use it as it is.
17710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17711$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17713$as_echo_n "checking for UNZIP... " >&6; }
17714        if test ! -x "$tool_specified"; then
17715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17716$as_echo "not found" >&6; }
17717          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17718        fi
17719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17720$as_echo "$tool_specified" >&6; }
17721      fi
17722    fi
17723  fi
17724
17725
17726
17727  if test "x$UNZIP" = x; then
17728    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17729  fi
17730
17731
17732
17733
17734
17735  # Publish this variable in the help.
17736
17737
17738  if test "x$ZIP" = x; then
17739    # The variable is not set by user, try to locate tool using the code snippet
17740    for ac_prog in zip
17741do
17742  # Extract the first word of "$ac_prog", so it can be a program name with args.
17743set dummy $ac_prog; ac_word=$2
17744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17745$as_echo_n "checking for $ac_word... " >&6; }
17746if ${ac_cv_path_ZIP+:} false; then :
17747  $as_echo_n "(cached) " >&6
17748else
17749  case $ZIP in
17750  [\\/]* | ?:[\\/]*)
17751  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17752  ;;
17753  *)
17754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17755for as_dir in $PATH
17756do
17757  IFS=$as_save_IFS
17758  test -z "$as_dir" && as_dir=.
17759    for ac_exec_ext in '' $ac_executable_extensions; do
17760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17761    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17763    break 2
17764  fi
17765done
17766  done
17767IFS=$as_save_IFS
17768
17769  ;;
17770esac
17771fi
17772ZIP=$ac_cv_path_ZIP
17773if test -n "$ZIP"; then
17774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17775$as_echo "$ZIP" >&6; }
17776else
17777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17778$as_echo "no" >&6; }
17779fi
17780
17781
17782  test -n "$ZIP" && break
17783done
17784
17785  else
17786    # The variable is set, but is it from the command line or the environment?
17787
17788    # Try to remove the string !ZIP! from our list.
17789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17791      # If it failed, the variable was not from the command line. Ignore it,
17792      # but warn the user (except for BASH, which is always set by the calling BASH).
17793      if test "xZIP" != xBASH; then
17794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17795$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17796      fi
17797      # Try to locate tool using the code snippet
17798      for ac_prog in zip
17799do
17800  # Extract the first word of "$ac_prog", so it can be a program name with args.
17801set dummy $ac_prog; ac_word=$2
17802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17803$as_echo_n "checking for $ac_word... " >&6; }
17804if ${ac_cv_path_ZIP+:} false; then :
17805  $as_echo_n "(cached) " >&6
17806else
17807  case $ZIP in
17808  [\\/]* | ?:[\\/]*)
17809  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17810  ;;
17811  *)
17812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17813for as_dir in $PATH
17814do
17815  IFS=$as_save_IFS
17816  test -z "$as_dir" && as_dir=.
17817    for ac_exec_ext in '' $ac_executable_extensions; do
17818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17819    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17821    break 2
17822  fi
17823done
17824  done
17825IFS=$as_save_IFS
17826
17827  ;;
17828esac
17829fi
17830ZIP=$ac_cv_path_ZIP
17831if test -n "$ZIP"; then
17832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17833$as_echo "$ZIP" >&6; }
17834else
17835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17836$as_echo "no" >&6; }
17837fi
17838
17839
17840  test -n "$ZIP" && break
17841done
17842
17843    else
17844      # If it succeeded, then it was overridden by the user. We will use it
17845      # for the tool.
17846
17847      # First remove it from the list of overridden variables, so we can test
17848      # for unknown variables in the end.
17849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17850
17851      # Check if the provided tool contains a complete path.
17852      tool_specified="$ZIP"
17853      tool_basename="${tool_specified##*/}"
17854      if test "x$tool_basename" = "x$tool_specified"; then
17855        # A command without a complete path is provided, search $PATH.
17856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17857$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17858        # Extract the first word of "$tool_basename", so it can be a program name with args.
17859set dummy $tool_basename; ac_word=$2
17860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17861$as_echo_n "checking for $ac_word... " >&6; }
17862if ${ac_cv_path_ZIP+:} false; then :
17863  $as_echo_n "(cached) " >&6
17864else
17865  case $ZIP in
17866  [\\/]* | ?:[\\/]*)
17867  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17868  ;;
17869  *)
17870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17871for as_dir in $PATH
17872do
17873  IFS=$as_save_IFS
17874  test -z "$as_dir" && as_dir=.
17875    for ac_exec_ext in '' $ac_executable_extensions; do
17876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17877    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17879    break 2
17880  fi
17881done
17882  done
17883IFS=$as_save_IFS
17884
17885  ;;
17886esac
17887fi
17888ZIP=$ac_cv_path_ZIP
17889if test -n "$ZIP"; then
17890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17891$as_echo "$ZIP" >&6; }
17892else
17893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17894$as_echo "no" >&6; }
17895fi
17896
17897
17898        if test "x$ZIP" = x; then
17899          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17900        fi
17901      else
17902        # Otherwise we believe it is a complete path. Use it as it is.
17903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17904$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17906$as_echo_n "checking for ZIP... " >&6; }
17907        if test ! -x "$tool_specified"; then
17908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17909$as_echo "not found" >&6; }
17910          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17911        fi
17912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17913$as_echo "$tool_specified" >&6; }
17914      fi
17915    fi
17916  fi
17917
17918
17919
17920  if test "x$ZIP" = x; then
17921    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17922  fi
17923
17924
17925
17926  # Non-required basic tools
17927
17928
17929
17930  # Publish this variable in the help.
17931
17932
17933  if test "x$LDD" = x; then
17934    # The variable is not set by user, try to locate tool using the code snippet
17935    for ac_prog in ldd
17936do
17937  # Extract the first word of "$ac_prog", so it can be a program name with args.
17938set dummy $ac_prog; ac_word=$2
17939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17940$as_echo_n "checking for $ac_word... " >&6; }
17941if ${ac_cv_path_LDD+:} false; then :
17942  $as_echo_n "(cached) " >&6
17943else
17944  case $LDD in
17945  [\\/]* | ?:[\\/]*)
17946  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17947  ;;
17948  *)
17949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17950for as_dir in $PATH
17951do
17952  IFS=$as_save_IFS
17953  test -z "$as_dir" && as_dir=.
17954    for ac_exec_ext in '' $ac_executable_extensions; do
17955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17956    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17958    break 2
17959  fi
17960done
17961  done
17962IFS=$as_save_IFS
17963
17964  ;;
17965esac
17966fi
17967LDD=$ac_cv_path_LDD
17968if test -n "$LDD"; then
17969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17970$as_echo "$LDD" >&6; }
17971else
17972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17973$as_echo "no" >&6; }
17974fi
17975
17976
17977  test -n "$LDD" && break
17978done
17979
17980  else
17981    # The variable is set, but is it from the command line or the environment?
17982
17983    # Try to remove the string !LDD! from our list.
17984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17986      # If it failed, the variable was not from the command line. Ignore it,
17987      # but warn the user (except for BASH, which is always set by the calling BASH).
17988      if test "xLDD" != xBASH; then
17989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17990$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17991      fi
17992      # Try to locate tool using the code snippet
17993      for ac_prog in ldd
17994do
17995  # Extract the first word of "$ac_prog", so it can be a program name with args.
17996set dummy $ac_prog; ac_word=$2
17997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17998$as_echo_n "checking for $ac_word... " >&6; }
17999if ${ac_cv_path_LDD+:} false; then :
18000  $as_echo_n "(cached) " >&6
18001else
18002  case $LDD in
18003  [\\/]* | ?:[\\/]*)
18004  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18005  ;;
18006  *)
18007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18008for as_dir in $PATH
18009do
18010  IFS=$as_save_IFS
18011  test -z "$as_dir" && as_dir=.
18012    for ac_exec_ext in '' $ac_executable_extensions; do
18013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18014    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18016    break 2
18017  fi
18018done
18019  done
18020IFS=$as_save_IFS
18021
18022  ;;
18023esac
18024fi
18025LDD=$ac_cv_path_LDD
18026if test -n "$LDD"; then
18027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18028$as_echo "$LDD" >&6; }
18029else
18030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18031$as_echo "no" >&6; }
18032fi
18033
18034
18035  test -n "$LDD" && break
18036done
18037
18038    else
18039      # If it succeeded, then it was overridden by the user. We will use it
18040      # for the tool.
18041
18042      # First remove it from the list of overridden variables, so we can test
18043      # for unknown variables in the end.
18044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18045
18046      # Check if the provided tool contains a complete path.
18047      tool_specified="$LDD"
18048      tool_basename="${tool_specified##*/}"
18049      if test "x$tool_basename" = "x$tool_specified"; then
18050        # A command without a complete path is provided, search $PATH.
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18052$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18053        # Extract the first word of "$tool_basename", so it can be a program name with args.
18054set dummy $tool_basename; ac_word=$2
18055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18056$as_echo_n "checking for $ac_word... " >&6; }
18057if ${ac_cv_path_LDD+:} false; then :
18058  $as_echo_n "(cached) " >&6
18059else
18060  case $LDD in
18061  [\\/]* | ?:[\\/]*)
18062  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18063  ;;
18064  *)
18065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18066for as_dir in $PATH
18067do
18068  IFS=$as_save_IFS
18069  test -z "$as_dir" && as_dir=.
18070    for ac_exec_ext in '' $ac_executable_extensions; do
18071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18072    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18074    break 2
18075  fi
18076done
18077  done
18078IFS=$as_save_IFS
18079
18080  ;;
18081esac
18082fi
18083LDD=$ac_cv_path_LDD
18084if test -n "$LDD"; then
18085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18086$as_echo "$LDD" >&6; }
18087else
18088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18089$as_echo "no" >&6; }
18090fi
18091
18092
18093        if test "x$LDD" = x; then
18094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18095        fi
18096      else
18097        # Otherwise we believe it is a complete path. Use it as it is.
18098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18099$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18101$as_echo_n "checking for LDD... " >&6; }
18102        if test ! -x "$tool_specified"; then
18103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18104$as_echo "not found" >&6; }
18105          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18106        fi
18107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18108$as_echo "$tool_specified" >&6; }
18109      fi
18110    fi
18111  fi
18112
18113
18114  if test "x$LDD" = "x"; then
18115    # List shared lib dependencies is used for
18116    # debug output and checking for forbidden dependencies.
18117    # We can build without it.
18118    LDD="true"
18119  fi
18120
18121
18122  # Publish this variable in the help.
18123
18124
18125  if test "x$OTOOL" = x; then
18126    # The variable is not set by user, try to locate tool using the code snippet
18127    for ac_prog in otool
18128do
18129  # Extract the first word of "$ac_prog", so it can be a program name with args.
18130set dummy $ac_prog; ac_word=$2
18131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18132$as_echo_n "checking for $ac_word... " >&6; }
18133if ${ac_cv_path_OTOOL+:} false; then :
18134  $as_echo_n "(cached) " >&6
18135else
18136  case $OTOOL in
18137  [\\/]* | ?:[\\/]*)
18138  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18139  ;;
18140  *)
18141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18142for as_dir in $PATH
18143do
18144  IFS=$as_save_IFS
18145  test -z "$as_dir" && as_dir=.
18146    for ac_exec_ext in '' $ac_executable_extensions; do
18147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18148    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18150    break 2
18151  fi
18152done
18153  done
18154IFS=$as_save_IFS
18155
18156  ;;
18157esac
18158fi
18159OTOOL=$ac_cv_path_OTOOL
18160if test -n "$OTOOL"; then
18161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18162$as_echo "$OTOOL" >&6; }
18163else
18164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18165$as_echo "no" >&6; }
18166fi
18167
18168
18169  test -n "$OTOOL" && break
18170done
18171
18172  else
18173    # The variable is set, but is it from the command line or the environment?
18174
18175    # Try to remove the string !OTOOL! from our list.
18176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18178      # If it failed, the variable was not from the command line. Ignore it,
18179      # but warn the user (except for BASH, which is always set by the calling BASH).
18180      if test "xOTOOL" != xBASH; then
18181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18182$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18183      fi
18184      # Try to locate tool using the code snippet
18185      for ac_prog in otool
18186do
18187  # Extract the first word of "$ac_prog", so it can be a program name with args.
18188set dummy $ac_prog; ac_word=$2
18189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18190$as_echo_n "checking for $ac_word... " >&6; }
18191if ${ac_cv_path_OTOOL+:} false; then :
18192  $as_echo_n "(cached) " >&6
18193else
18194  case $OTOOL in
18195  [\\/]* | ?:[\\/]*)
18196  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18197  ;;
18198  *)
18199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18200for as_dir in $PATH
18201do
18202  IFS=$as_save_IFS
18203  test -z "$as_dir" && as_dir=.
18204    for ac_exec_ext in '' $ac_executable_extensions; do
18205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18206    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18208    break 2
18209  fi
18210done
18211  done
18212IFS=$as_save_IFS
18213
18214  ;;
18215esac
18216fi
18217OTOOL=$ac_cv_path_OTOOL
18218if test -n "$OTOOL"; then
18219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18220$as_echo "$OTOOL" >&6; }
18221else
18222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18223$as_echo "no" >&6; }
18224fi
18225
18226
18227  test -n "$OTOOL" && break
18228done
18229
18230    else
18231      # If it succeeded, then it was overridden by the user. We will use it
18232      # for the tool.
18233
18234      # First remove it from the list of overridden variables, so we can test
18235      # for unknown variables in the end.
18236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18237
18238      # Check if the provided tool contains a complete path.
18239      tool_specified="$OTOOL"
18240      tool_basename="${tool_specified##*/}"
18241      if test "x$tool_basename" = "x$tool_specified"; then
18242        # A command without a complete path is provided, search $PATH.
18243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18244$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18245        # Extract the first word of "$tool_basename", so it can be a program name with args.
18246set dummy $tool_basename; ac_word=$2
18247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18248$as_echo_n "checking for $ac_word... " >&6; }
18249if ${ac_cv_path_OTOOL+:} false; then :
18250  $as_echo_n "(cached) " >&6
18251else
18252  case $OTOOL in
18253  [\\/]* | ?:[\\/]*)
18254  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18255  ;;
18256  *)
18257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18258for as_dir in $PATH
18259do
18260  IFS=$as_save_IFS
18261  test -z "$as_dir" && as_dir=.
18262    for ac_exec_ext in '' $ac_executable_extensions; do
18263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18264    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18266    break 2
18267  fi
18268done
18269  done
18270IFS=$as_save_IFS
18271
18272  ;;
18273esac
18274fi
18275OTOOL=$ac_cv_path_OTOOL
18276if test -n "$OTOOL"; then
18277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18278$as_echo "$OTOOL" >&6; }
18279else
18280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18281$as_echo "no" >&6; }
18282fi
18283
18284
18285        if test "x$OTOOL" = x; then
18286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18287        fi
18288      else
18289        # Otherwise we believe it is a complete path. Use it as it is.
18290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18291$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18293$as_echo_n "checking for OTOOL... " >&6; }
18294        if test ! -x "$tool_specified"; then
18295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18296$as_echo "not found" >&6; }
18297          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18298        fi
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18300$as_echo "$tool_specified" >&6; }
18301      fi
18302    fi
18303  fi
18304
18305
18306  if test "x$OTOOL" = "x"; then
18307    OTOOL="true"
18308  fi
18309
18310
18311  # Publish this variable in the help.
18312
18313
18314  if test "x$READELF" = x; then
18315    # The variable is not set by user, try to locate tool using the code snippet
18316    for ac_prog in greadelf readelf
18317do
18318  # Extract the first word of "$ac_prog", so it can be a program name with args.
18319set dummy $ac_prog; ac_word=$2
18320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18321$as_echo_n "checking for $ac_word... " >&6; }
18322if ${ac_cv_path_READELF+:} false; then :
18323  $as_echo_n "(cached) " >&6
18324else
18325  case $READELF in
18326  [\\/]* | ?:[\\/]*)
18327  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18328  ;;
18329  *)
18330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18331for as_dir in $PATH
18332do
18333  IFS=$as_save_IFS
18334  test -z "$as_dir" && as_dir=.
18335    for ac_exec_ext in '' $ac_executable_extensions; do
18336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18337    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18339    break 2
18340  fi
18341done
18342  done
18343IFS=$as_save_IFS
18344
18345  ;;
18346esac
18347fi
18348READELF=$ac_cv_path_READELF
18349if test -n "$READELF"; then
18350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18351$as_echo "$READELF" >&6; }
18352else
18353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18354$as_echo "no" >&6; }
18355fi
18356
18357
18358  test -n "$READELF" && break
18359done
18360
18361  else
18362    # The variable is set, but is it from the command line or the environment?
18363
18364    # Try to remove the string !READELF! from our list.
18365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18367      # If it failed, the variable was not from the command line. Ignore it,
18368      # but warn the user (except for BASH, which is always set by the calling BASH).
18369      if test "xREADELF" != xBASH; then
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18371$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18372      fi
18373      # Try to locate tool using the code snippet
18374      for ac_prog in greadelf readelf
18375do
18376  # Extract the first word of "$ac_prog", so it can be a program name with args.
18377set dummy $ac_prog; ac_word=$2
18378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18379$as_echo_n "checking for $ac_word... " >&6; }
18380if ${ac_cv_path_READELF+:} false; then :
18381  $as_echo_n "(cached) " >&6
18382else
18383  case $READELF in
18384  [\\/]* | ?:[\\/]*)
18385  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18386  ;;
18387  *)
18388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18389for as_dir in $PATH
18390do
18391  IFS=$as_save_IFS
18392  test -z "$as_dir" && as_dir=.
18393    for ac_exec_ext in '' $ac_executable_extensions; do
18394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18395    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18397    break 2
18398  fi
18399done
18400  done
18401IFS=$as_save_IFS
18402
18403  ;;
18404esac
18405fi
18406READELF=$ac_cv_path_READELF
18407if test -n "$READELF"; then
18408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18409$as_echo "$READELF" >&6; }
18410else
18411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18412$as_echo "no" >&6; }
18413fi
18414
18415
18416  test -n "$READELF" && break
18417done
18418
18419    else
18420      # If it succeeded, then it was overridden by the user. We will use it
18421      # for the tool.
18422
18423      # First remove it from the list of overridden variables, so we can test
18424      # for unknown variables in the end.
18425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18426
18427      # Check if the provided tool contains a complete path.
18428      tool_specified="$READELF"
18429      tool_basename="${tool_specified##*/}"
18430      if test "x$tool_basename" = "x$tool_specified"; then
18431        # A command without a complete path is provided, search $PATH.
18432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18433$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18434        # Extract the first word of "$tool_basename", so it can be a program name with args.
18435set dummy $tool_basename; ac_word=$2
18436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18437$as_echo_n "checking for $ac_word... " >&6; }
18438if ${ac_cv_path_READELF+:} false; then :
18439  $as_echo_n "(cached) " >&6
18440else
18441  case $READELF in
18442  [\\/]* | ?:[\\/]*)
18443  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18444  ;;
18445  *)
18446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18447for as_dir in $PATH
18448do
18449  IFS=$as_save_IFS
18450  test -z "$as_dir" && as_dir=.
18451    for ac_exec_ext in '' $ac_executable_extensions; do
18452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18453    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18455    break 2
18456  fi
18457done
18458  done
18459IFS=$as_save_IFS
18460
18461  ;;
18462esac
18463fi
18464READELF=$ac_cv_path_READELF
18465if test -n "$READELF"; then
18466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18467$as_echo "$READELF" >&6; }
18468else
18469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18470$as_echo "no" >&6; }
18471fi
18472
18473
18474        if test "x$READELF" = x; then
18475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18476        fi
18477      else
18478        # Otherwise we believe it is a complete path. Use it as it is.
18479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18480$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18482$as_echo_n "checking for READELF... " >&6; }
18483        if test ! -x "$tool_specified"; then
18484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18485$as_echo "not found" >&6; }
18486          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18487        fi
18488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18489$as_echo "$tool_specified" >&6; }
18490      fi
18491    fi
18492  fi
18493
18494
18495
18496
18497  # Publish this variable in the help.
18498
18499
18500  if test "x$HG" = x; then
18501    # The variable is not set by user, try to locate tool using the code snippet
18502    for ac_prog in hg
18503do
18504  # Extract the first word of "$ac_prog", so it can be a program name with args.
18505set dummy $ac_prog; ac_word=$2
18506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18507$as_echo_n "checking for $ac_word... " >&6; }
18508if ${ac_cv_path_HG+:} false; then :
18509  $as_echo_n "(cached) " >&6
18510else
18511  case $HG in
18512  [\\/]* | ?:[\\/]*)
18513  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18514  ;;
18515  *)
18516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18517for as_dir in $PATH
18518do
18519  IFS=$as_save_IFS
18520  test -z "$as_dir" && as_dir=.
18521    for ac_exec_ext in '' $ac_executable_extensions; do
18522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18523    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18525    break 2
18526  fi
18527done
18528  done
18529IFS=$as_save_IFS
18530
18531  ;;
18532esac
18533fi
18534HG=$ac_cv_path_HG
18535if test -n "$HG"; then
18536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18537$as_echo "$HG" >&6; }
18538else
18539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18540$as_echo "no" >&6; }
18541fi
18542
18543
18544  test -n "$HG" && break
18545done
18546
18547  else
18548    # The variable is set, but is it from the command line or the environment?
18549
18550    # Try to remove the string !HG! from our list.
18551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18553      # If it failed, the variable was not from the command line. Ignore it,
18554      # but warn the user (except for BASH, which is always set by the calling BASH).
18555      if test "xHG" != xBASH; then
18556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18557$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18558      fi
18559      # Try to locate tool using the code snippet
18560      for ac_prog in hg
18561do
18562  # Extract the first word of "$ac_prog", so it can be a program name with args.
18563set dummy $ac_prog; ac_word=$2
18564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18565$as_echo_n "checking for $ac_word... " >&6; }
18566if ${ac_cv_path_HG+:} false; then :
18567  $as_echo_n "(cached) " >&6
18568else
18569  case $HG in
18570  [\\/]* | ?:[\\/]*)
18571  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18572  ;;
18573  *)
18574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18575for as_dir in $PATH
18576do
18577  IFS=$as_save_IFS
18578  test -z "$as_dir" && as_dir=.
18579    for ac_exec_ext in '' $ac_executable_extensions; do
18580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18581    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18583    break 2
18584  fi
18585done
18586  done
18587IFS=$as_save_IFS
18588
18589  ;;
18590esac
18591fi
18592HG=$ac_cv_path_HG
18593if test -n "$HG"; then
18594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18595$as_echo "$HG" >&6; }
18596else
18597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18598$as_echo "no" >&6; }
18599fi
18600
18601
18602  test -n "$HG" && break
18603done
18604
18605    else
18606      # If it succeeded, then it was overridden by the user. We will use it
18607      # for the tool.
18608
18609      # First remove it from the list of overridden variables, so we can test
18610      # for unknown variables in the end.
18611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18612
18613      # Check if the provided tool contains a complete path.
18614      tool_specified="$HG"
18615      tool_basename="${tool_specified##*/}"
18616      if test "x$tool_basename" = "x$tool_specified"; then
18617        # A command without a complete path is provided, search $PATH.
18618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18619$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18620        # Extract the first word of "$tool_basename", so it can be a program name with args.
18621set dummy $tool_basename; ac_word=$2
18622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18623$as_echo_n "checking for $ac_word... " >&6; }
18624if ${ac_cv_path_HG+:} false; then :
18625  $as_echo_n "(cached) " >&6
18626else
18627  case $HG in
18628  [\\/]* | ?:[\\/]*)
18629  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18630  ;;
18631  *)
18632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18633for as_dir in $PATH
18634do
18635  IFS=$as_save_IFS
18636  test -z "$as_dir" && as_dir=.
18637    for ac_exec_ext in '' $ac_executable_extensions; do
18638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18639    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18641    break 2
18642  fi
18643done
18644  done
18645IFS=$as_save_IFS
18646
18647  ;;
18648esac
18649fi
18650HG=$ac_cv_path_HG
18651if test -n "$HG"; then
18652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18653$as_echo "$HG" >&6; }
18654else
18655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18656$as_echo "no" >&6; }
18657fi
18658
18659
18660        if test "x$HG" = x; then
18661          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18662        fi
18663      else
18664        # Otherwise we believe it is a complete path. Use it as it is.
18665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18666$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18668$as_echo_n "checking for HG... " >&6; }
18669        if test ! -x "$tool_specified"; then
18670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18671$as_echo "not found" >&6; }
18672          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18673        fi
18674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18675$as_echo "$tool_specified" >&6; }
18676      fi
18677    fi
18678  fi
18679
18680
18681
18682
18683  # Publish this variable in the help.
18684
18685
18686  if test "x$STAT" = x; then
18687    # The variable is not set by user, try to locate tool using the code snippet
18688    for ac_prog in stat
18689do
18690  # Extract the first word of "$ac_prog", so it can be a program name with args.
18691set dummy $ac_prog; ac_word=$2
18692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18693$as_echo_n "checking for $ac_word... " >&6; }
18694if ${ac_cv_path_STAT+:} false; then :
18695  $as_echo_n "(cached) " >&6
18696else
18697  case $STAT in
18698  [\\/]* | ?:[\\/]*)
18699  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18700  ;;
18701  *)
18702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18703for as_dir in $PATH
18704do
18705  IFS=$as_save_IFS
18706  test -z "$as_dir" && as_dir=.
18707    for ac_exec_ext in '' $ac_executable_extensions; do
18708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18709    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18711    break 2
18712  fi
18713done
18714  done
18715IFS=$as_save_IFS
18716
18717  ;;
18718esac
18719fi
18720STAT=$ac_cv_path_STAT
18721if test -n "$STAT"; then
18722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18723$as_echo "$STAT" >&6; }
18724else
18725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18726$as_echo "no" >&6; }
18727fi
18728
18729
18730  test -n "$STAT" && break
18731done
18732
18733  else
18734    # The variable is set, but is it from the command line or the environment?
18735
18736    # Try to remove the string !STAT! from our list.
18737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18739      # If it failed, the variable was not from the command line. Ignore it,
18740      # but warn the user (except for BASH, which is always set by the calling BASH).
18741      if test "xSTAT" != xBASH; then
18742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18743$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18744      fi
18745      # Try to locate tool using the code snippet
18746      for ac_prog in stat
18747do
18748  # Extract the first word of "$ac_prog", so it can be a program name with args.
18749set dummy $ac_prog; ac_word=$2
18750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18751$as_echo_n "checking for $ac_word... " >&6; }
18752if ${ac_cv_path_STAT+:} false; then :
18753  $as_echo_n "(cached) " >&6
18754else
18755  case $STAT in
18756  [\\/]* | ?:[\\/]*)
18757  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18758  ;;
18759  *)
18760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18761for as_dir in $PATH
18762do
18763  IFS=$as_save_IFS
18764  test -z "$as_dir" && as_dir=.
18765    for ac_exec_ext in '' $ac_executable_extensions; do
18766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18767    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18769    break 2
18770  fi
18771done
18772  done
18773IFS=$as_save_IFS
18774
18775  ;;
18776esac
18777fi
18778STAT=$ac_cv_path_STAT
18779if test -n "$STAT"; then
18780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18781$as_echo "$STAT" >&6; }
18782else
18783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18784$as_echo "no" >&6; }
18785fi
18786
18787
18788  test -n "$STAT" && break
18789done
18790
18791    else
18792      # If it succeeded, then it was overridden by the user. We will use it
18793      # for the tool.
18794
18795      # First remove it from the list of overridden variables, so we can test
18796      # for unknown variables in the end.
18797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18798
18799      # Check if the provided tool contains a complete path.
18800      tool_specified="$STAT"
18801      tool_basename="${tool_specified##*/}"
18802      if test "x$tool_basename" = "x$tool_specified"; then
18803        # A command without a complete path is provided, search $PATH.
18804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18805$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18806        # Extract the first word of "$tool_basename", so it can be a program name with args.
18807set dummy $tool_basename; ac_word=$2
18808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18809$as_echo_n "checking for $ac_word... " >&6; }
18810if ${ac_cv_path_STAT+:} false; then :
18811  $as_echo_n "(cached) " >&6
18812else
18813  case $STAT in
18814  [\\/]* | ?:[\\/]*)
18815  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18816  ;;
18817  *)
18818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18819for as_dir in $PATH
18820do
18821  IFS=$as_save_IFS
18822  test -z "$as_dir" && as_dir=.
18823    for ac_exec_ext in '' $ac_executable_extensions; do
18824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18825    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18827    break 2
18828  fi
18829done
18830  done
18831IFS=$as_save_IFS
18832
18833  ;;
18834esac
18835fi
18836STAT=$ac_cv_path_STAT
18837if test -n "$STAT"; then
18838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18839$as_echo "$STAT" >&6; }
18840else
18841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18842$as_echo "no" >&6; }
18843fi
18844
18845
18846        if test "x$STAT" = x; then
18847          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18848        fi
18849      else
18850        # Otherwise we believe it is a complete path. Use it as it is.
18851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18852$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18854$as_echo_n "checking for STAT... " >&6; }
18855        if test ! -x "$tool_specified"; then
18856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18857$as_echo "not found" >&6; }
18858          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18859        fi
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18861$as_echo "$tool_specified" >&6; }
18862      fi
18863    fi
18864  fi
18865
18866
18867
18868
18869  # Publish this variable in the help.
18870
18871
18872  if test "x$TIME" = x; then
18873    # The variable is not set by user, try to locate tool using the code snippet
18874    for ac_prog in time
18875do
18876  # Extract the first word of "$ac_prog", so it can be a program name with args.
18877set dummy $ac_prog; ac_word=$2
18878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18879$as_echo_n "checking for $ac_word... " >&6; }
18880if ${ac_cv_path_TIME+:} false; then :
18881  $as_echo_n "(cached) " >&6
18882else
18883  case $TIME in
18884  [\\/]* | ?:[\\/]*)
18885  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18886  ;;
18887  *)
18888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18889for as_dir in $PATH
18890do
18891  IFS=$as_save_IFS
18892  test -z "$as_dir" && as_dir=.
18893    for ac_exec_ext in '' $ac_executable_extensions; do
18894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18895    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18897    break 2
18898  fi
18899done
18900  done
18901IFS=$as_save_IFS
18902
18903  ;;
18904esac
18905fi
18906TIME=$ac_cv_path_TIME
18907if test -n "$TIME"; then
18908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18909$as_echo "$TIME" >&6; }
18910else
18911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18912$as_echo "no" >&6; }
18913fi
18914
18915
18916  test -n "$TIME" && break
18917done
18918
18919  else
18920    # The variable is set, but is it from the command line or the environment?
18921
18922    # Try to remove the string !TIME! from our list.
18923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18925      # If it failed, the variable was not from the command line. Ignore it,
18926      # but warn the user (except for BASH, which is always set by the calling BASH).
18927      if test "xTIME" != xBASH; then
18928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18929$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18930      fi
18931      # Try to locate tool using the code snippet
18932      for ac_prog in time
18933do
18934  # Extract the first word of "$ac_prog", so it can be a program name with args.
18935set dummy $ac_prog; ac_word=$2
18936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18937$as_echo_n "checking for $ac_word... " >&6; }
18938if ${ac_cv_path_TIME+:} false; then :
18939  $as_echo_n "(cached) " >&6
18940else
18941  case $TIME in
18942  [\\/]* | ?:[\\/]*)
18943  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18944  ;;
18945  *)
18946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18947for as_dir in $PATH
18948do
18949  IFS=$as_save_IFS
18950  test -z "$as_dir" && as_dir=.
18951    for ac_exec_ext in '' $ac_executable_extensions; do
18952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18953    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18955    break 2
18956  fi
18957done
18958  done
18959IFS=$as_save_IFS
18960
18961  ;;
18962esac
18963fi
18964TIME=$ac_cv_path_TIME
18965if test -n "$TIME"; then
18966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18967$as_echo "$TIME" >&6; }
18968else
18969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18970$as_echo "no" >&6; }
18971fi
18972
18973
18974  test -n "$TIME" && break
18975done
18976
18977    else
18978      # If it succeeded, then it was overridden by the user. We will use it
18979      # for the tool.
18980
18981      # First remove it from the list of overridden variables, so we can test
18982      # for unknown variables in the end.
18983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18984
18985      # Check if the provided tool contains a complete path.
18986      tool_specified="$TIME"
18987      tool_basename="${tool_specified##*/}"
18988      if test "x$tool_basename" = "x$tool_specified"; then
18989        # A command without a complete path is provided, search $PATH.
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18991$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18992        # Extract the first word of "$tool_basename", so it can be a program name with args.
18993set dummy $tool_basename; ac_word=$2
18994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18995$as_echo_n "checking for $ac_word... " >&6; }
18996if ${ac_cv_path_TIME+:} false; then :
18997  $as_echo_n "(cached) " >&6
18998else
18999  case $TIME in
19000  [\\/]* | ?:[\\/]*)
19001  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19002  ;;
19003  *)
19004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19005for as_dir in $PATH
19006do
19007  IFS=$as_save_IFS
19008  test -z "$as_dir" && as_dir=.
19009    for ac_exec_ext in '' $ac_executable_extensions; do
19010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19011    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19013    break 2
19014  fi
19015done
19016  done
19017IFS=$as_save_IFS
19018
19019  ;;
19020esac
19021fi
19022TIME=$ac_cv_path_TIME
19023if test -n "$TIME"; then
19024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19025$as_echo "$TIME" >&6; }
19026else
19027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19028$as_echo "no" >&6; }
19029fi
19030
19031
19032        if test "x$TIME" = x; then
19033          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19034        fi
19035      else
19036        # Otherwise we believe it is a complete path. Use it as it is.
19037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19038$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19040$as_echo_n "checking for TIME... " >&6; }
19041        if test ! -x "$tool_specified"; then
19042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19043$as_echo "not found" >&6; }
19044          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19045        fi
19046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19047$as_echo "$tool_specified" >&6; }
19048      fi
19049    fi
19050  fi
19051
19052
19053  # Check if it's GNU time
19054  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19055  if test "x$IS_GNU_TIME" != x; then
19056    IS_GNU_TIME=yes
19057  else
19058    IS_GNU_TIME=no
19059  fi
19060
19061
19062  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19063
19064
19065
19066  # Publish this variable in the help.
19067
19068
19069  if test "x$DSYMUTIL" = x; then
19070    # The variable is not set by user, try to locate tool using the code snippet
19071    for ac_prog in dsymutil
19072do
19073  # Extract the first word of "$ac_prog", so it can be a program name with args.
19074set dummy $ac_prog; ac_word=$2
19075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19076$as_echo_n "checking for $ac_word... " >&6; }
19077if ${ac_cv_path_DSYMUTIL+:} false; then :
19078  $as_echo_n "(cached) " >&6
19079else
19080  case $DSYMUTIL in
19081  [\\/]* | ?:[\\/]*)
19082  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19083  ;;
19084  *)
19085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19086for as_dir in $PATH
19087do
19088  IFS=$as_save_IFS
19089  test -z "$as_dir" && as_dir=.
19090    for ac_exec_ext in '' $ac_executable_extensions; do
19091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19092    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19094    break 2
19095  fi
19096done
19097  done
19098IFS=$as_save_IFS
19099
19100  ;;
19101esac
19102fi
19103DSYMUTIL=$ac_cv_path_DSYMUTIL
19104if test -n "$DSYMUTIL"; then
19105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19106$as_echo "$DSYMUTIL" >&6; }
19107else
19108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19109$as_echo "no" >&6; }
19110fi
19111
19112
19113  test -n "$DSYMUTIL" && break
19114done
19115
19116  else
19117    # The variable is set, but is it from the command line or the environment?
19118
19119    # Try to remove the string !DSYMUTIL! from our list.
19120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19122      # If it failed, the variable was not from the command line. Ignore it,
19123      # but warn the user (except for BASH, which is always set by the calling BASH).
19124      if test "xDSYMUTIL" != xBASH; then
19125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19126$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19127      fi
19128      # Try to locate tool using the code snippet
19129      for ac_prog in dsymutil
19130do
19131  # Extract the first word of "$ac_prog", so it can be a program name with args.
19132set dummy $ac_prog; ac_word=$2
19133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19134$as_echo_n "checking for $ac_word... " >&6; }
19135if ${ac_cv_path_DSYMUTIL+:} false; then :
19136  $as_echo_n "(cached) " >&6
19137else
19138  case $DSYMUTIL in
19139  [\\/]* | ?:[\\/]*)
19140  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19141  ;;
19142  *)
19143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19144for as_dir in $PATH
19145do
19146  IFS=$as_save_IFS
19147  test -z "$as_dir" && as_dir=.
19148    for ac_exec_ext in '' $ac_executable_extensions; do
19149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19150    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19152    break 2
19153  fi
19154done
19155  done
19156IFS=$as_save_IFS
19157
19158  ;;
19159esac
19160fi
19161DSYMUTIL=$ac_cv_path_DSYMUTIL
19162if test -n "$DSYMUTIL"; then
19163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19164$as_echo "$DSYMUTIL" >&6; }
19165else
19166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19167$as_echo "no" >&6; }
19168fi
19169
19170
19171  test -n "$DSYMUTIL" && break
19172done
19173
19174    else
19175      # If it succeeded, then it was overridden by the user. We will use it
19176      # for the tool.
19177
19178      # First remove it from the list of overridden variables, so we can test
19179      # for unknown variables in the end.
19180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19181
19182      # Check if the provided tool contains a complete path.
19183      tool_specified="$DSYMUTIL"
19184      tool_basename="${tool_specified##*/}"
19185      if test "x$tool_basename" = "x$tool_specified"; then
19186        # A command without a complete path is provided, search $PATH.
19187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19188$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19189        # Extract the first word of "$tool_basename", so it can be a program name with args.
19190set dummy $tool_basename; ac_word=$2
19191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19192$as_echo_n "checking for $ac_word... " >&6; }
19193if ${ac_cv_path_DSYMUTIL+:} false; then :
19194  $as_echo_n "(cached) " >&6
19195else
19196  case $DSYMUTIL in
19197  [\\/]* | ?:[\\/]*)
19198  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19199  ;;
19200  *)
19201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19202for as_dir in $PATH
19203do
19204  IFS=$as_save_IFS
19205  test -z "$as_dir" && as_dir=.
19206    for ac_exec_ext in '' $ac_executable_extensions; do
19207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19208    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19210    break 2
19211  fi
19212done
19213  done
19214IFS=$as_save_IFS
19215
19216  ;;
19217esac
19218fi
19219DSYMUTIL=$ac_cv_path_DSYMUTIL
19220if test -n "$DSYMUTIL"; then
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19222$as_echo "$DSYMUTIL" >&6; }
19223else
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19225$as_echo "no" >&6; }
19226fi
19227
19228
19229        if test "x$DSYMUTIL" = x; then
19230          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19231        fi
19232      else
19233        # Otherwise we believe it is a complete path. Use it as it is.
19234        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19235$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19236        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19237$as_echo_n "checking for DSYMUTIL... " >&6; }
19238        if test ! -x "$tool_specified"; then
19239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19240$as_echo "not found" >&6; }
19241          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19242        fi
19243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19244$as_echo "$tool_specified" >&6; }
19245      fi
19246    fi
19247  fi
19248
19249
19250
19251  if test "x$DSYMUTIL" = x; then
19252    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19253  fi
19254
19255
19256
19257
19258
19259  # Publish this variable in the help.
19260
19261
19262  if test "x$XATTR" = x; then
19263    # The variable is not set by user, try to locate tool using the code snippet
19264    for ac_prog in xattr
19265do
19266  # Extract the first word of "$ac_prog", so it can be a program name with args.
19267set dummy $ac_prog; ac_word=$2
19268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19269$as_echo_n "checking for $ac_word... " >&6; }
19270if ${ac_cv_path_XATTR+:} false; then :
19271  $as_echo_n "(cached) " >&6
19272else
19273  case $XATTR in
19274  [\\/]* | ?:[\\/]*)
19275  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19276  ;;
19277  *)
19278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19279for as_dir in $PATH
19280do
19281  IFS=$as_save_IFS
19282  test -z "$as_dir" && as_dir=.
19283    for ac_exec_ext in '' $ac_executable_extensions; do
19284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19285    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19287    break 2
19288  fi
19289done
19290  done
19291IFS=$as_save_IFS
19292
19293  ;;
19294esac
19295fi
19296XATTR=$ac_cv_path_XATTR
19297if test -n "$XATTR"; then
19298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19299$as_echo "$XATTR" >&6; }
19300else
19301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19302$as_echo "no" >&6; }
19303fi
19304
19305
19306  test -n "$XATTR" && break
19307done
19308
19309  else
19310    # The variable is set, but is it from the command line or the environment?
19311
19312    # Try to remove the string !XATTR! from our list.
19313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19315      # If it failed, the variable was not from the command line. Ignore it,
19316      # but warn the user (except for BASH, which is always set by the calling BASH).
19317      if test "xXATTR" != xBASH; then
19318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19319$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19320      fi
19321      # Try to locate tool using the code snippet
19322      for ac_prog in xattr
19323do
19324  # Extract the first word of "$ac_prog", so it can be a program name with args.
19325set dummy $ac_prog; ac_word=$2
19326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19327$as_echo_n "checking for $ac_word... " >&6; }
19328if ${ac_cv_path_XATTR+:} false; then :
19329  $as_echo_n "(cached) " >&6
19330else
19331  case $XATTR in
19332  [\\/]* | ?:[\\/]*)
19333  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19334  ;;
19335  *)
19336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19337for as_dir in $PATH
19338do
19339  IFS=$as_save_IFS
19340  test -z "$as_dir" && as_dir=.
19341    for ac_exec_ext in '' $ac_executable_extensions; do
19342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19343    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19345    break 2
19346  fi
19347done
19348  done
19349IFS=$as_save_IFS
19350
19351  ;;
19352esac
19353fi
19354XATTR=$ac_cv_path_XATTR
19355if test -n "$XATTR"; then
19356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19357$as_echo "$XATTR" >&6; }
19358else
19359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19360$as_echo "no" >&6; }
19361fi
19362
19363
19364  test -n "$XATTR" && break
19365done
19366
19367    else
19368      # If it succeeded, then it was overridden by the user. We will use it
19369      # for the tool.
19370
19371      # First remove it from the list of overridden variables, so we can test
19372      # for unknown variables in the end.
19373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19374
19375      # Check if the provided tool contains a complete path.
19376      tool_specified="$XATTR"
19377      tool_basename="${tool_specified##*/}"
19378      if test "x$tool_basename" = "x$tool_specified"; then
19379        # A command without a complete path is provided, search $PATH.
19380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19381$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19382        # Extract the first word of "$tool_basename", so it can be a program name with args.
19383set dummy $tool_basename; ac_word=$2
19384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19385$as_echo_n "checking for $ac_word... " >&6; }
19386if ${ac_cv_path_XATTR+:} false; then :
19387  $as_echo_n "(cached) " >&6
19388else
19389  case $XATTR in
19390  [\\/]* | ?:[\\/]*)
19391  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19392  ;;
19393  *)
19394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19395for as_dir in $PATH
19396do
19397  IFS=$as_save_IFS
19398  test -z "$as_dir" && as_dir=.
19399    for ac_exec_ext in '' $ac_executable_extensions; do
19400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19401    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19403    break 2
19404  fi
19405done
19406  done
19407IFS=$as_save_IFS
19408
19409  ;;
19410esac
19411fi
19412XATTR=$ac_cv_path_XATTR
19413if test -n "$XATTR"; then
19414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19415$as_echo "$XATTR" >&6; }
19416else
19417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19418$as_echo "no" >&6; }
19419fi
19420
19421
19422        if test "x$XATTR" = x; then
19423          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19424        fi
19425      else
19426        # Otherwise we believe it is a complete path. Use it as it is.
19427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19428$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19429        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19430$as_echo_n "checking for XATTR... " >&6; }
19431        if test ! -x "$tool_specified"; then
19432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19433$as_echo "not found" >&6; }
19434          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19435        fi
19436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19437$as_echo "$tool_specified" >&6; }
19438      fi
19439    fi
19440  fi
19441
19442
19443
19444  if test "x$XATTR" = x; then
19445    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19446  fi
19447
19448
19449
19450
19451  # Publish this variable in the help.
19452
19453
19454  if test "x$CODESIGN" = x; then
19455    # The variable is not set by user, try to locate tool using the code snippet
19456    for ac_prog in codesign
19457do
19458  # Extract the first word of "$ac_prog", so it can be a program name with args.
19459set dummy $ac_prog; ac_word=$2
19460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19461$as_echo_n "checking for $ac_word... " >&6; }
19462if ${ac_cv_path_CODESIGN+:} false; then :
19463  $as_echo_n "(cached) " >&6
19464else
19465  case $CODESIGN in
19466  [\\/]* | ?:[\\/]*)
19467  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19468  ;;
19469  *)
19470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19471for as_dir in $PATH
19472do
19473  IFS=$as_save_IFS
19474  test -z "$as_dir" && as_dir=.
19475    for ac_exec_ext in '' $ac_executable_extensions; do
19476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19477    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19479    break 2
19480  fi
19481done
19482  done
19483IFS=$as_save_IFS
19484
19485  ;;
19486esac
19487fi
19488CODESIGN=$ac_cv_path_CODESIGN
19489if test -n "$CODESIGN"; then
19490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19491$as_echo "$CODESIGN" >&6; }
19492else
19493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19494$as_echo "no" >&6; }
19495fi
19496
19497
19498  test -n "$CODESIGN" && break
19499done
19500
19501  else
19502    # The variable is set, but is it from the command line or the environment?
19503
19504    # Try to remove the string !CODESIGN! from our list.
19505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19507      # If it failed, the variable was not from the command line. Ignore it,
19508      # but warn the user (except for BASH, which is always set by the calling BASH).
19509      if test "xCODESIGN" != xBASH; then
19510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19511$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19512      fi
19513      # Try to locate tool using the code snippet
19514      for ac_prog in codesign
19515do
19516  # Extract the first word of "$ac_prog", so it can be a program name with args.
19517set dummy $ac_prog; ac_word=$2
19518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19519$as_echo_n "checking for $ac_word... " >&6; }
19520if ${ac_cv_path_CODESIGN+:} false; then :
19521  $as_echo_n "(cached) " >&6
19522else
19523  case $CODESIGN in
19524  [\\/]* | ?:[\\/]*)
19525  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19526  ;;
19527  *)
19528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19529for as_dir in $PATH
19530do
19531  IFS=$as_save_IFS
19532  test -z "$as_dir" && as_dir=.
19533    for ac_exec_ext in '' $ac_executable_extensions; do
19534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19535    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19537    break 2
19538  fi
19539done
19540  done
19541IFS=$as_save_IFS
19542
19543  ;;
19544esac
19545fi
19546CODESIGN=$ac_cv_path_CODESIGN
19547if test -n "$CODESIGN"; then
19548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19549$as_echo "$CODESIGN" >&6; }
19550else
19551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19552$as_echo "no" >&6; }
19553fi
19554
19555
19556  test -n "$CODESIGN" && break
19557done
19558
19559    else
19560      # If it succeeded, then it was overridden by the user. We will use it
19561      # for the tool.
19562
19563      # First remove it from the list of overridden variables, so we can test
19564      # for unknown variables in the end.
19565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19566
19567      # Check if the provided tool contains a complete path.
19568      tool_specified="$CODESIGN"
19569      tool_basename="${tool_specified##*/}"
19570      if test "x$tool_basename" = "x$tool_specified"; then
19571        # A command without a complete path is provided, search $PATH.
19572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19573$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19574        # Extract the first word of "$tool_basename", so it can be a program name with args.
19575set dummy $tool_basename; ac_word=$2
19576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19577$as_echo_n "checking for $ac_word... " >&6; }
19578if ${ac_cv_path_CODESIGN+:} false; then :
19579  $as_echo_n "(cached) " >&6
19580else
19581  case $CODESIGN in
19582  [\\/]* | ?:[\\/]*)
19583  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19584  ;;
19585  *)
19586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19587for as_dir in $PATH
19588do
19589  IFS=$as_save_IFS
19590  test -z "$as_dir" && as_dir=.
19591    for ac_exec_ext in '' $ac_executable_extensions; do
19592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19593    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19595    break 2
19596  fi
19597done
19598  done
19599IFS=$as_save_IFS
19600
19601  ;;
19602esac
19603fi
19604CODESIGN=$ac_cv_path_CODESIGN
19605if test -n "$CODESIGN"; then
19606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19607$as_echo "$CODESIGN" >&6; }
19608else
19609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19610$as_echo "no" >&6; }
19611fi
19612
19613
19614        if test "x$CODESIGN" = x; then
19615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19616        fi
19617      else
19618        # Otherwise we believe it is a complete path. Use it as it is.
19619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19620$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19622$as_echo_n "checking for CODESIGN... " >&6; }
19623        if test ! -x "$tool_specified"; then
19624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19625$as_echo "not found" >&6; }
19626          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19627        fi
19628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19629$as_echo "$tool_specified" >&6; }
19630      fi
19631    fi
19632  fi
19633
19634
19635    if test "x$CODESIGN" != "x"; then
19636      # Verify that the openjdk_codesign certificate is present
19637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19638$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19639      rm -f codesign-testfile
19640      touch codesign-testfile
19641      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19642      rm -f codesign-testfile
19643      if test "x$CODESIGN" = x; then
19644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19645$as_echo "no" >&6; }
19646      else
19647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19648$as_echo "yes" >&6; }
19649      fi
19650    fi
19651  fi
19652
19653
19654  # Test if bash supports pipefail.
19655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19656$as_echo_n "checking if bash supports pipefail... " >&6; }
19657  if ${BASH} -c 'set -o pipefail'; then
19658    BASH_ARGS="$BASH_ARGS -o pipefail"
19659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19660$as_echo "yes" >&6; }
19661  else
19662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19663$as_echo "no" >&6; }
19664  fi
19665
19666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19667$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19668  if ${BASH} -e -c 'true'; then
19669    BASH_ARGS="$BASH_ARGS -e"
19670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19671$as_echo "yes" >&6; }
19672  else
19673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19674$as_echo "no" >&6; }
19675  fi
19676
19677
19678
19679
19680# Check if pkg-config is available.
19681
19682
19683if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19684	if test -n "$ac_tool_prefix"; then
19685  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19686set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19688$as_echo_n "checking for $ac_word... " >&6; }
19689if ${ac_cv_path_PKG_CONFIG+:} false; then :
19690  $as_echo_n "(cached) " >&6
19691else
19692  case $PKG_CONFIG in
19693  [\\/]* | ?:[\\/]*)
19694  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19695  ;;
19696  *)
19697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19698for as_dir in $PATH
19699do
19700  IFS=$as_save_IFS
19701  test -z "$as_dir" && as_dir=.
19702    for ac_exec_ext in '' $ac_executable_extensions; do
19703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19704    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19706    break 2
19707  fi
19708done
19709  done
19710IFS=$as_save_IFS
19711
19712  ;;
19713esac
19714fi
19715PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19716if test -n "$PKG_CONFIG"; then
19717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19718$as_echo "$PKG_CONFIG" >&6; }
19719else
19720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19721$as_echo "no" >&6; }
19722fi
19723
19724
19725fi
19726if test -z "$ac_cv_path_PKG_CONFIG"; then
19727  ac_pt_PKG_CONFIG=$PKG_CONFIG
19728  # Extract the first word of "pkg-config", so it can be a program name with args.
19729set dummy pkg-config; ac_word=$2
19730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19731$as_echo_n "checking for $ac_word... " >&6; }
19732if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19733  $as_echo_n "(cached) " >&6
19734else
19735  case $ac_pt_PKG_CONFIG in
19736  [\\/]* | ?:[\\/]*)
19737  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19738  ;;
19739  *)
19740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19741for as_dir in $PATH
19742do
19743  IFS=$as_save_IFS
19744  test -z "$as_dir" && as_dir=.
19745    for ac_exec_ext in '' $ac_executable_extensions; do
19746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19747    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19749    break 2
19750  fi
19751done
19752  done
19753IFS=$as_save_IFS
19754
19755  ;;
19756esac
19757fi
19758ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19759if test -n "$ac_pt_PKG_CONFIG"; then
19760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19761$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19762else
19763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19764$as_echo "no" >&6; }
19765fi
19766
19767  if test "x$ac_pt_PKG_CONFIG" = x; then
19768    PKG_CONFIG=""
19769  else
19770    case $cross_compiling:$ac_tool_warned in
19771yes:)
19772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19774ac_tool_warned=yes ;;
19775esac
19776    PKG_CONFIG=$ac_pt_PKG_CONFIG
19777  fi
19778else
19779  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19780fi
19781
19782fi
19783if test -n "$PKG_CONFIG"; then
19784	_pkg_min_version=0.9.0
19785	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19786$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19787	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19788		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19789$as_echo "yes" >&6; }
19790	else
19791		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19792$as_echo "no" >&6; }
19793		PKG_CONFIG=""
19794	fi
19795
19796fi
19797
19798# After basic tools have been setup, we can check build os specific details.
19799
19800  ###############################################################################
19801
19802  # Note that this is the build platform OS version!
19803
19804  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19805  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19806  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19807  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19808
19809
19810
19811
19812
19813# Setup builddeps, for automatic downloading of tools we need.
19814# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19815# boot-jdk setup, but we need to have basic tools setup first.
19816
19817
19818# Check whether --with-builddeps-conf was given.
19819if test "${with_builddeps_conf+set}" = set; then :
19820  withval=$with_builddeps_conf;
19821fi
19822
19823
19824
19825# Check whether --with-builddeps-server was given.
19826if test "${with_builddeps_server+set}" = set; then :
19827  withval=$with_builddeps_server;
19828fi
19829
19830
19831
19832# Check whether --with-builddeps-dir was given.
19833if test "${with_builddeps_dir+set}" = set; then :
19834  withval=$with_builddeps_dir;
19835else
19836  with_builddeps_dir=/localhome/builddeps
19837fi
19838
19839
19840
19841# Check whether --with-builddeps-group was given.
19842if test "${with_builddeps_group+set}" = set; then :
19843  withval=$with_builddeps_group;
19844fi
19845
19846
19847
19848
19849  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19850    if test "x$with_builddeps_conf" != x; then
19851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19852$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19853      builddepsfile=$with_builddeps_conf
19854      if test -s $builddepsfile; then
19855        . $builddepsfile
19856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19857$as_echo "loaded!" >&6; }
19858      else
19859        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19860      fi
19861    else
19862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19863$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19864      builddepsfile=`mktemp`
19865      touch $builddepsfile
19866      # Put all found confs into a single file.
19867      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19868      # Source the file to acquire the variables
19869      if test -s $builddepsfile; then
19870        . $builddepsfile
19871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19872$as_echo "found at least one!" >&6; }
19873      else
19874        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19875      fi
19876    fi
19877    # Create build and target names that use _ instead of "-" and ".".
19878    # This is necessary to use them in variable names.
19879    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19880    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19881    # Extract rewrite information for build and target
19882    eval rewritten_build=\${REWRITE_${build_var}}
19883    if test "x$rewritten_build" = x; then
19884      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19885      echo Build stays the same $rewritten_build
19886    else
19887      echo Rewriting build for builddeps into $rewritten_build
19888    fi
19889    eval rewritten_target=\${REWRITE_${target_var}}
19890    if test "x$rewritten_target" = x; then
19891      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19892      echo Target stays the same $rewritten_target
19893    else
19894      echo Rewriting target for builddeps into $rewritten_target
19895    fi
19896    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19897    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19898  fi
19899  for ac_prog in 7z unzip
19900do
19901  # Extract the first word of "$ac_prog", so it can be a program name with args.
19902set dummy $ac_prog; ac_word=$2
19903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19904$as_echo_n "checking for $ac_word... " >&6; }
19905if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19906  $as_echo_n "(cached) " >&6
19907else
19908  if test -n "$BDEPS_UNZIP"; then
19909  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19910else
19911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19912for as_dir in $PATH
19913do
19914  IFS=$as_save_IFS
19915  test -z "$as_dir" && as_dir=.
19916    for ac_exec_ext in '' $ac_executable_extensions; do
19917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19918    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19920    break 2
19921  fi
19922done
19923  done
19924IFS=$as_save_IFS
19925
19926fi
19927fi
19928BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19929if test -n "$BDEPS_UNZIP"; then
19930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19931$as_echo "$BDEPS_UNZIP" >&6; }
19932else
19933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19934$as_echo "no" >&6; }
19935fi
19936
19937
19938  test -n "$BDEPS_UNZIP" && break
19939done
19940
19941  if test "x$BDEPS_UNZIP" = x7z; then
19942    BDEPS_UNZIP="7z x"
19943  fi
19944
19945  for ac_prog in wget lftp ftp
19946do
19947  # Extract the first word of "$ac_prog", so it can be a program name with args.
19948set dummy $ac_prog; ac_word=$2
19949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19950$as_echo_n "checking for $ac_word... " >&6; }
19951if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19952  $as_echo_n "(cached) " >&6
19953else
19954  if test -n "$BDEPS_FTP"; then
19955  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19956else
19957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19958for as_dir in $PATH
19959do
19960  IFS=$as_save_IFS
19961  test -z "$as_dir" && as_dir=.
19962    for ac_exec_ext in '' $ac_executable_extensions; do
19963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19964    ac_cv_prog_BDEPS_FTP="$ac_prog"
19965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19966    break 2
19967  fi
19968done
19969  done
19970IFS=$as_save_IFS
19971
19972fi
19973fi
19974BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19975if test -n "$BDEPS_FTP"; then
19976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19977$as_echo "$BDEPS_FTP" >&6; }
19978else
19979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19980$as_echo "no" >&6; }
19981fi
19982
19983
19984  test -n "$BDEPS_FTP" && break
19985done
19986
19987
19988
19989###############################################################################
19990#
19991# Determine OpenJDK variants, options and version numbers.
19992#
19993###############################################################################
19994
19995# We need build & target for this.
19996
19997
19998  ###############################################################################
19999  #
20000  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20001  # We always build headless support.
20002  #
20003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20004$as_echo_n "checking headful support... " >&6; }
20005  # Check whether --enable-headful was given.
20006if test "${enable_headful+set}" = set; then :
20007  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20008else
20009  SUPPORT_HEADFUL=yes
20010fi
20011
20012
20013  SUPPORT_HEADLESS=yes
20014  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20015
20016  if test "x$SUPPORT_HEADFUL" = xyes; then
20017    # We are building both headful and headless.
20018    headful_msg="include support for both headful and headless"
20019  fi
20020
20021  if test "x$SUPPORT_HEADFUL" = xno; then
20022    # Thus we are building headless only.
20023    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20024    headful_msg="headless only"
20025  fi
20026
20027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20028$as_echo "$headful_msg" >&6; }
20029
20030
20031
20032
20033
20034  # Control wether Hotspot runs Queens test after build.
20035  # Check whether --enable-hotspot-test-in-build was given.
20036if test "${enable_hotspot_test_in_build+set}" = set; then :
20037  enableval=$enable_hotspot_test_in_build;
20038else
20039  enable_hotspot_test_in_build=no
20040fi
20041
20042  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20043    TEST_IN_BUILD=true
20044  else
20045    TEST_IN_BUILD=false
20046  fi
20047
20048
20049  ###############################################################################
20050  #
20051  # Choose cacerts source file
20052  #
20053
20054# Check whether --with-cacerts-file was given.
20055if test "${with_cacerts_file+set}" = set; then :
20056  withval=$with_cacerts_file;
20057fi
20058
20059  if test "x$with_cacerts_file" != x; then
20060    CACERTS_FILE=$with_cacerts_file
20061  fi
20062
20063
20064  ###############################################################################
20065  #
20066  # Enable or disable unlimited crypto
20067  #
20068  # Check whether --enable-unlimited-crypto was given.
20069if test "${enable_unlimited_crypto+set}" = set; then :
20070  enableval=$enable_unlimited_crypto;
20071else
20072  enable_unlimited_crypto=no
20073fi
20074
20075  if test "x$enable_unlimited_crypto" = "xyes"; then
20076    UNLIMITED_CRYPTO=true
20077  else
20078    UNLIMITED_CRYPTO=false
20079  fi
20080
20081
20082  ###############################################################################
20083  #
20084  # Enable or disable the elliptic curve crypto implementation
20085  #
20086
20087
20088  ###############################################################################
20089  #
20090  # --enable-rmiconnector-iiop
20091  #
20092  # Check whether --enable-rmiconnector-iiop was given.
20093if test "${enable_rmiconnector_iiop+set}" = set; then :
20094  enableval=$enable_rmiconnector_iiop;
20095fi
20096
20097  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20098    RMICONNECTOR_IIOP=true
20099  else
20100    RMICONNECTOR_IIOP=false
20101  fi
20102
20103
20104  ###############################################################################
20105  #
20106  # Compress jars
20107  #
20108  COMPRESS_JARS=false
20109
20110
20111
20112
20113  # Source the version numbers
20114  . $AUTOCONF_DIR/version-numbers
20115
20116  # Get the settings from parameters
20117
20118# Check whether --with-milestone was given.
20119if test "${with_milestone+set}" = set; then :
20120  withval=$with_milestone;
20121fi
20122
20123  if test "x$with_milestone" = xyes; then
20124    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20125  elif test "x$with_milestone" != x; then
20126    MILESTONE="$with_milestone"
20127  fi
20128  if test "x$MILESTONE" = x; then
20129    MILESTONE=internal
20130  fi
20131
20132
20133# Check whether --with-update-version was given.
20134if test "${with_update_version+set}" = set; then :
20135  withval=$with_update_version;
20136fi
20137
20138  if test "x$with_update_version" = xyes; then
20139    as_fn_error $? "Update version must have a value" "$LINENO" 5
20140  elif test "x$with_update_version" != x; then
20141    JDK_UPDATE_VERSION="$with_update_version"
20142    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20143    # to a bug in expr (which reduces it to just X). To work around this, we
20144    # always add a 0 to one digit update versions.
20145    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20146      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20147    fi
20148  fi
20149
20150
20151# Check whether --with-user-release-suffix was given.
20152if test "${with_user_release_suffix+set}" = set; then :
20153  withval=$with_user_release_suffix;
20154fi
20155
20156  if test "x$with_user_release_suffix" = xyes; then
20157    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20158  elif test "x$with_user_release_suffix" != x; then
20159    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20160  fi
20161
20162
20163# Check whether --with-build-number was given.
20164if test "${with_build_number+set}" = set; then :
20165  withval=$with_build_number;
20166fi
20167
20168  if test "x$with_build_number" = xyes; then
20169    as_fn_error $? "Build number must have a value" "$LINENO" 5
20170  elif test "x$with_build_number" != x; then
20171    JDK_BUILD_NUMBER="$with_build_number"
20172  fi
20173  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20174  if test "x$JDK_BUILD_NUMBER" = x; then
20175    JDK_BUILD_NUMBER=b00
20176    if test "x$USER_RELEASE_SUFFIX" = x; then
20177      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20178      # Avoid [:alnum:] since it depends on the locale.
20179      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20180      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20181    fi
20182  fi
20183
20184  # Now set the JDK version, milestone, build number etc.
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201# Check whether --with-copyright-year was given.
20202if test "${with_copyright_year+set}" = set; then :
20203  withval=$with_copyright_year;
20204fi
20205
20206  if test "x$with_copyright_year" = xyes; then
20207    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20208  elif test "x$with_copyright_year" != x; then
20209    COPYRIGHT_YEAR="$with_copyright_year"
20210  else
20211    COPYRIGHT_YEAR=`date +'%Y'`
20212  fi
20213
20214
20215  if test "x$JDK_UPDATE_VERSION" != x; then
20216    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20217  else
20218    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20219  fi
20220
20221
20222  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20223
20224
20225
20226###############################################################################
20227#
20228# Setup BootJDK, used to bootstrap the build.
20229#
20230###############################################################################
20231
20232
20233  BOOT_JDK_FOUND=no
20234
20235# Check whether --with-boot-jdk was given.
20236if test "${with_boot_jdk+set}" = set; then :
20237  withval=$with_boot_jdk;
20238fi
20239
20240
20241  # We look for the Boot JDK through various means, going from more certain to
20242  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20243  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20244  # must check if this is indeed valid; otherwise we'll continue looking.
20245
20246  # Test: Is bootjdk explicitely set by command line arguments?
20247
20248  if test "x$BOOT_JDK_FOUND" = xno; then
20249    # Now execute the test
20250
20251  if test "x$with_boot_jdk" != x; then
20252    BOOT_JDK=$with_boot_jdk
20253    BOOT_JDK_FOUND=maybe
20254    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20255$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20256  fi
20257
20258
20259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20261      # Do we have a bin/java?
20262      if test ! -x "$BOOT_JDK/bin/java"; then
20263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20265        BOOT_JDK_FOUND=no
20266      else
20267        # Do we have a bin/javac?
20268        if test ! -x "$BOOT_JDK/bin/javac"; then
20269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20273          BOOT_JDK_FOUND=no
20274        else
20275          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20276          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20277
20278          # Extra M4 quote needed to protect [] in grep expression.
20279          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20280          if test "x$FOUND_CORRECT_VERSION" = x; then
20281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20283            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20284$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20285            BOOT_JDK_FOUND=no
20286          else
20287            # We're done! :-)
20288            BOOT_JDK_FOUND=yes
20289
20290  # Only process if variable expands to non-empty
20291
20292  if test "x$BOOT_JDK" != x; then
20293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20294
20295  # Input might be given as Windows format, start by converting to
20296  # unix format.
20297  path="$BOOT_JDK"
20298  new_path=`$CYGPATH -u "$path"`
20299
20300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20303  # "foo.exe" is OK but "foo" is an error.
20304  #
20305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20306  # It is also a way to make sure we got the proper file name for the real test later on.
20307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20308  if test "x$test_shortpath" = x; then
20309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20311    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20312  fi
20313
20314  # Call helper function which possibly converts this using DOS-style short mode.
20315  # If so, the updated path is stored in $new_path.
20316
20317  input_path="$new_path"
20318  # Check if we need to convert this using DOS-style short mode. If the path
20319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20320  # take no chances and rewrite it.
20321  # Note: m4 eats our [], so we need to use [ and ] instead.
20322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20323  if test "x$has_forbidden_chars" != x; then
20324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20328      # Going to short mode and back again did indeed matter. Since short mode is
20329      # case insensitive, let's make it lowercase to improve readability.
20330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20331      # Now convert it back to Unix-style (cygpath)
20332      input_path=`$CYGPATH -u "$shortmode_path"`
20333      new_path="$input_path"
20334    fi
20335  fi
20336
20337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20338  if test "x$test_cygdrive_prefix" = x; then
20339    # As a simple fix, exclude /usr/bin since it's not a real path.
20340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20342      # a path prefixed by /cygdrive for fixpath to work.
20343      new_path="$CYGWIN_ROOT_PATH$input_path"
20344    fi
20345  fi
20346
20347
20348  if test "x$path" != "x$new_path"; then
20349    BOOT_JDK="$new_path"
20350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20352  fi
20353
20354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20355
20356  path="$BOOT_JDK"
20357  has_colon=`$ECHO $path | $GREP ^.:`
20358  new_path="$path"
20359  if test "x$has_colon" = x; then
20360    # Not in mixed or Windows style, start by that.
20361    new_path=`cmd //c echo $path`
20362  fi
20363
20364
20365  input_path="$new_path"
20366  # Check if we need to convert this using DOS-style short mode. If the path
20367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20368  # take no chances and rewrite it.
20369  # Note: m4 eats our [], so we need to use [ and ] instead.
20370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20371  if test "x$has_forbidden_chars" != x; then
20372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20374  fi
20375
20376
20377  windows_path="$new_path"
20378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20379    unix_path=`$CYGPATH -u "$windows_path"`
20380    new_path="$unix_path"
20381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20383    new_path="$unix_path"
20384  fi
20385
20386  if test "x$path" != "x$new_path"; then
20387    BOOT_JDK="$new_path"
20388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20390  fi
20391
20392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20394
20395    else
20396      # We're on a unix platform. Hooray! :)
20397      path="$BOOT_JDK"
20398      has_space=`$ECHO "$path" | $GREP " "`
20399      if test "x$has_space" != x; then
20400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20403      fi
20404
20405      # Use eval to expand a potential ~
20406      eval path="$path"
20407      if test ! -f "$path" && test ! -d "$path"; then
20408        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20409      fi
20410
20411      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20412    fi
20413  fi
20414
20415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20416$as_echo_n "checking for Boot JDK... " >&6; }
20417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20418$as_echo "$BOOT_JDK" >&6; }
20419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20420$as_echo_n "checking Boot JDK version... " >&6; }
20421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20423$as_echo "$BOOT_JDK_VERSION" >&6; }
20424          fi # end check jdk version
20425        fi # end check javac
20426      fi # end check java
20427    fi # end check boot jdk found
20428  fi
20429
20430  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20431    # Having specified an argument which is incorrect will produce an instant failure;
20432    # we should not go on looking
20433    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20434  fi
20435
20436  # Test: Is bootjdk available from builddeps?
20437
20438  if test "x$BOOT_JDK_FOUND" = xno; then
20439    # Now execute the test
20440
20441
20442
20443  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20444    # Source the builddeps file again, to make sure it uses the latest variables!
20445    . $builddepsfile
20446    # Look for a target and build machine specific resource!
20447    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20448    if test "x$resource" = x; then
20449      # Ok, lets instead look for a target specific resource
20450      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20451    fi
20452    if test "x$resource" = x; then
20453      # Ok, lets instead look for a build specific resource
20454      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20455    fi
20456    if test "x$resource" = x; then
20457      # Ok, lets instead look for a generic resource
20458      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20459      resource=${builddep_bootjdk}
20460    fi
20461    if test "x$resource" != x; then
20462      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20463$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20464      # If the resource in the builddeps.conf file is an existing directory,
20465      # for example /java/linux/cups
20466      if test -d ${resource}; then
20467        depdir=${resource}
20468      else
20469
20470  # bootjdk is for example mymodule
20471  # $resource is for example libs/general/libmymod_1_2_3.zip
20472  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20473  # $with_builddeps_dir is for example /localhome/builddeps
20474  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20475  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20476  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20477  filename=`basename $resource`
20478  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20479  filebase=${filename%%.*}
20480  extension=${filename#*.}
20481  installdir=$with_builddeps_dir/$filebase
20482  if test ! -f $installdir/$filename.unpacked; then
20483    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20484$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20485    if test ! -d $installdir; then
20486      mkdir -p $installdir
20487    fi
20488    if test ! -d $installdir; then
20489      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20490    fi
20491    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20492    touch $tmpfile
20493    if test ! -f $tmpfile; then
20494      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20495    fi
20496
20497  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20498  # $tmpfile is the local file name for the downloaded file.
20499  VALID_TOOL=no
20500  if test "x$BDEPS_FTP" = xwget; then
20501    VALID_TOOL=yes
20502    wget -O $tmpfile $with_builddeps_server/$resource
20503  fi
20504  if test "x$BDEPS_FTP" = xlftp; then
20505    VALID_TOOL=yes
20506    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20507  fi
20508  if test "x$BDEPS_FTP" = xftp; then
20509    VALID_TOOL=yes
20510    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20511    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20512    FTPUSERPWD=${FTPSERVER%%@*}
20513    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20514      FTPUSER=${userpwd%%:*}
20515      FTPPWD=${userpwd#*@}
20516      FTPSERVER=${FTPSERVER#*@}
20517    else
20518      FTPUSER=ftp
20519      FTPPWD=ftp
20520    fi
20521    # the "pass" command does not work on some
20522    # ftp clients (read ftp.exe) but if it works,
20523    # passive mode is better!
20524    ( \
20525        echo "user $FTPUSER $FTPPWD"        ; \
20526        echo "pass"                         ; \
20527        echo "bin"                          ; \
20528        echo "get $FTPPATH $tmpfile"              ; \
20529    ) | ftp -in $FTPSERVER
20530  fi
20531  if test "x$VALID_TOOL" != xyes; then
20532    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20533  fi
20534
20535    mv $tmpfile $installdir/$filename
20536    if test ! -s $installdir/$filename; then
20537      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20538    fi
20539    case "$extension" in
20540      zip)  echo "Unzipping $installdir/$filename..."
20541        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20542        ;;
20543      tar.gz) echo "Untaring $installdir/$filename..."
20544        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20545        ;;
20546      tgz) echo "Untaring $installdir/$filename..."
20547        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20548        ;;
20549      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20550        ;;
20551    esac
20552  fi
20553  if test -f $installdir/$filename.unpacked; then
20554    depdir=$installdir
20555  fi
20556
20557      fi
20558      # Source the builddeps file again, because in the previous command, the depdir
20559      # was updated to point at the current build dependency install directory.
20560      . $builddepsfile
20561      # Now extract variables from the builddeps.conf files.
20562      theroot=${builddep_bootjdk_ROOT}
20563      thecflags=${builddep_bootjdk_CFLAGS}
20564      thelibs=${builddep_bootjdk_LIBS}
20565      if test "x$depdir" = x; then
20566        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20567      fi
20568      BOOT_JDK=$depdir
20569      if test "x$theroot" != x; then
20570        BOOT_JDK="$theroot"
20571      fi
20572      if test "x$thecflags" != x; then
20573        BOOT_JDK_CFLAGS="$thecflags"
20574      fi
20575      if test "x$thelibs" != x; then
20576        BOOT_JDK_LIBS="$thelibs"
20577      fi
20578      BOOT_JDK_FOUND=maybe
20579      else BOOT_JDK_FOUND=no
20580
20581    fi
20582    else BOOT_JDK_FOUND=no
20583
20584  fi
20585
20586
20587
20588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20590      # Do we have a bin/java?
20591      if test ! -x "$BOOT_JDK/bin/java"; then
20592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20594        BOOT_JDK_FOUND=no
20595      else
20596        # Do we have a bin/javac?
20597        if test ! -x "$BOOT_JDK/bin/javac"; then
20598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20602          BOOT_JDK_FOUND=no
20603        else
20604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20606
20607          # Extra M4 quote needed to protect [] in grep expression.
20608          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20609          if test "x$FOUND_CORRECT_VERSION" = x; then
20610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20614            BOOT_JDK_FOUND=no
20615          else
20616            # We're done! :-)
20617            BOOT_JDK_FOUND=yes
20618
20619  # Only process if variable expands to non-empty
20620
20621  if test "x$BOOT_JDK" != x; then
20622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20623
20624  # Input might be given as Windows format, start by converting to
20625  # unix format.
20626  path="$BOOT_JDK"
20627  new_path=`$CYGPATH -u "$path"`
20628
20629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20632  # "foo.exe" is OK but "foo" is an error.
20633  #
20634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20635  # It is also a way to make sure we got the proper file name for the real test later on.
20636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20637  if test "x$test_shortpath" = x; then
20638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20641  fi
20642
20643  # Call helper function which possibly converts this using DOS-style short mode.
20644  # If so, the updated path is stored in $new_path.
20645
20646  input_path="$new_path"
20647  # Check if we need to convert this using DOS-style short mode. If the path
20648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20649  # take no chances and rewrite it.
20650  # Note: m4 eats our [], so we need to use [ and ] instead.
20651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20652  if test "x$has_forbidden_chars" != x; then
20653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20657      # Going to short mode and back again did indeed matter. Since short mode is
20658      # case insensitive, let's make it lowercase to improve readability.
20659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20660      # Now convert it back to Unix-style (cygpath)
20661      input_path=`$CYGPATH -u "$shortmode_path"`
20662      new_path="$input_path"
20663    fi
20664  fi
20665
20666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20667  if test "x$test_cygdrive_prefix" = x; then
20668    # As a simple fix, exclude /usr/bin since it's not a real path.
20669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20671      # a path prefixed by /cygdrive for fixpath to work.
20672      new_path="$CYGWIN_ROOT_PATH$input_path"
20673    fi
20674  fi
20675
20676
20677  if test "x$path" != "x$new_path"; then
20678    BOOT_JDK="$new_path"
20679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20681  fi
20682
20683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20684
20685  path="$BOOT_JDK"
20686  has_colon=`$ECHO $path | $GREP ^.:`
20687  new_path="$path"
20688  if test "x$has_colon" = x; then
20689    # Not in mixed or Windows style, start by that.
20690    new_path=`cmd //c echo $path`
20691  fi
20692
20693
20694  input_path="$new_path"
20695  # Check if we need to convert this using DOS-style short mode. If the path
20696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20697  # take no chances and rewrite it.
20698  # Note: m4 eats our [], so we need to use [ and ] instead.
20699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20700  if test "x$has_forbidden_chars" != x; then
20701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20703  fi
20704
20705
20706  windows_path="$new_path"
20707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20708    unix_path=`$CYGPATH -u "$windows_path"`
20709    new_path="$unix_path"
20710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20712    new_path="$unix_path"
20713  fi
20714
20715  if test "x$path" != "x$new_path"; then
20716    BOOT_JDK="$new_path"
20717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20719  fi
20720
20721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20723
20724    else
20725      # We're on a unix platform. Hooray! :)
20726      path="$BOOT_JDK"
20727      has_space=`$ECHO "$path" | $GREP " "`
20728      if test "x$has_space" != x; then
20729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20732      fi
20733
20734      # Use eval to expand a potential ~
20735      eval path="$path"
20736      if test ! -f "$path" && test ! -d "$path"; then
20737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20738      fi
20739
20740      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20741    fi
20742  fi
20743
20744            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20745$as_echo_n "checking for Boot JDK... " >&6; }
20746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20747$as_echo "$BOOT_JDK" >&6; }
20748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20749$as_echo_n "checking Boot JDK version... " >&6; }
20750            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20752$as_echo "$BOOT_JDK_VERSION" >&6; }
20753          fi # end check jdk version
20754        fi # end check javac
20755      fi # end check java
20756    fi # end check boot jdk found
20757  fi
20758
20759
20760  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20761
20762  if test "x$BOOT_JDK_FOUND" = xno; then
20763    # Now execute the test
20764
20765  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20766    # First check at user selected default
20767
20768  if test "x$BOOT_JDK_FOUND" = xno; then
20769    # Now execute the test
20770
20771  if test -x /usr/libexec/java_home; then
20772    BOOT_JDK=`/usr/libexec/java_home `
20773    BOOT_JDK_FOUND=maybe
20774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20775$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20776  fi
20777
20778
20779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20781      # Do we have a bin/java?
20782      if test ! -x "$BOOT_JDK/bin/java"; then
20783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20785        BOOT_JDK_FOUND=no
20786      else
20787        # Do we have a bin/javac?
20788        if test ! -x "$BOOT_JDK/bin/javac"; then
20789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20793          BOOT_JDK_FOUND=no
20794        else
20795          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20796          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20797
20798          # Extra M4 quote needed to protect [] in grep expression.
20799          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20800          if test "x$FOUND_CORRECT_VERSION" = x; then
20801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20803            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20804$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20805            BOOT_JDK_FOUND=no
20806          else
20807            # We're done! :-)
20808            BOOT_JDK_FOUND=yes
20809
20810  # Only process if variable expands to non-empty
20811
20812  if test "x$BOOT_JDK" != x; then
20813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20814
20815  # Input might be given as Windows format, start by converting to
20816  # unix format.
20817  path="$BOOT_JDK"
20818  new_path=`$CYGPATH -u "$path"`
20819
20820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20823  # "foo.exe" is OK but "foo" is an error.
20824  #
20825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20826  # It is also a way to make sure we got the proper file name for the real test later on.
20827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20828  if test "x$test_shortpath" = x; then
20829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20832  fi
20833
20834  # Call helper function which possibly converts this using DOS-style short mode.
20835  # If so, the updated path is stored in $new_path.
20836
20837  input_path="$new_path"
20838  # Check if we need to convert this using DOS-style short mode. If the path
20839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20840  # take no chances and rewrite it.
20841  # Note: m4 eats our [], so we need to use [ and ] instead.
20842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20843  if test "x$has_forbidden_chars" != x; then
20844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20848      # Going to short mode and back again did indeed matter. Since short mode is
20849      # case insensitive, let's make it lowercase to improve readability.
20850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20851      # Now convert it back to Unix-style (cygpath)
20852      input_path=`$CYGPATH -u "$shortmode_path"`
20853      new_path="$input_path"
20854    fi
20855  fi
20856
20857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20858  if test "x$test_cygdrive_prefix" = x; then
20859    # As a simple fix, exclude /usr/bin since it's not a real path.
20860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20862      # a path prefixed by /cygdrive for fixpath to work.
20863      new_path="$CYGWIN_ROOT_PATH$input_path"
20864    fi
20865  fi
20866
20867
20868  if test "x$path" != "x$new_path"; then
20869    BOOT_JDK="$new_path"
20870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20872  fi
20873
20874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20875
20876  path="$BOOT_JDK"
20877  has_colon=`$ECHO $path | $GREP ^.:`
20878  new_path="$path"
20879  if test "x$has_colon" = x; then
20880    # Not in mixed or Windows style, start by that.
20881    new_path=`cmd //c echo $path`
20882  fi
20883
20884
20885  input_path="$new_path"
20886  # Check if we need to convert this using DOS-style short mode. If the path
20887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20888  # take no chances and rewrite it.
20889  # Note: m4 eats our [], so we need to use [ and ] instead.
20890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20891  if test "x$has_forbidden_chars" != x; then
20892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20894  fi
20895
20896
20897  windows_path="$new_path"
20898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20899    unix_path=`$CYGPATH -u "$windows_path"`
20900    new_path="$unix_path"
20901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20903    new_path="$unix_path"
20904  fi
20905
20906  if test "x$path" != "x$new_path"; then
20907    BOOT_JDK="$new_path"
20908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20910  fi
20911
20912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20914
20915    else
20916      # We're on a unix platform. Hooray! :)
20917      path="$BOOT_JDK"
20918      has_space=`$ECHO "$path" | $GREP " "`
20919      if test "x$has_space" != x; then
20920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20923      fi
20924
20925      # Use eval to expand a potential ~
20926      eval path="$path"
20927      if test ! -f "$path" && test ! -d "$path"; then
20928        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20929      fi
20930
20931      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20932    fi
20933  fi
20934
20935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20936$as_echo_n "checking for Boot JDK... " >&6; }
20937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20938$as_echo "$BOOT_JDK" >&6; }
20939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20940$as_echo_n "checking Boot JDK version... " >&6; }
20941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20943$as_echo "$BOOT_JDK_VERSION" >&6; }
20944          fi # end check jdk version
20945        fi # end check javac
20946      fi # end check java
20947    fi # end check boot jdk found
20948  fi
20949
20950    # If that did not work out (e.g. too old), try explicit versions instead
20951
20952  if test "x$BOOT_JDK_FOUND" = xno; then
20953    # Now execute the test
20954
20955  if test -x /usr/libexec/java_home; then
20956    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20957    BOOT_JDK_FOUND=maybe
20958    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20959$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20960  fi
20961
20962
20963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20965      # Do we have a bin/java?
20966      if test ! -x "$BOOT_JDK/bin/java"; then
20967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20969        BOOT_JDK_FOUND=no
20970      else
20971        # Do we have a bin/javac?
20972        if test ! -x "$BOOT_JDK/bin/javac"; then
20973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20977          BOOT_JDK_FOUND=no
20978        else
20979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20981
20982          # Extra M4 quote needed to protect [] in grep expression.
20983          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20984          if test "x$FOUND_CORRECT_VERSION" = x; then
20985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20989            BOOT_JDK_FOUND=no
20990          else
20991            # We're done! :-)
20992            BOOT_JDK_FOUND=yes
20993
20994  # Only process if variable expands to non-empty
20995
20996  if test "x$BOOT_JDK" != x; then
20997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998
20999  # Input might be given as Windows format, start by converting to
21000  # unix format.
21001  path="$BOOT_JDK"
21002  new_path=`$CYGPATH -u "$path"`
21003
21004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21007  # "foo.exe" is OK but "foo" is an error.
21008  #
21009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21010  # It is also a way to make sure we got the proper file name for the real test later on.
21011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21012  if test "x$test_shortpath" = x; then
21013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21016  fi
21017
21018  # Call helper function which possibly converts this using DOS-style short mode.
21019  # If so, the updated path is stored in $new_path.
21020
21021  input_path="$new_path"
21022  # Check if we need to convert this using DOS-style short mode. If the path
21023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21024  # take no chances and rewrite it.
21025  # Note: m4 eats our [], so we need to use [ and ] instead.
21026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21027  if test "x$has_forbidden_chars" != x; then
21028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21032      # Going to short mode and back again did indeed matter. Since short mode is
21033      # case insensitive, let's make it lowercase to improve readability.
21034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21035      # Now convert it back to Unix-style (cygpath)
21036      input_path=`$CYGPATH -u "$shortmode_path"`
21037      new_path="$input_path"
21038    fi
21039  fi
21040
21041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21042  if test "x$test_cygdrive_prefix" = x; then
21043    # As a simple fix, exclude /usr/bin since it's not a real path.
21044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21046      # a path prefixed by /cygdrive for fixpath to work.
21047      new_path="$CYGWIN_ROOT_PATH$input_path"
21048    fi
21049  fi
21050
21051
21052  if test "x$path" != "x$new_path"; then
21053    BOOT_JDK="$new_path"
21054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21056  fi
21057
21058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21059
21060  path="$BOOT_JDK"
21061  has_colon=`$ECHO $path | $GREP ^.:`
21062  new_path="$path"
21063  if test "x$has_colon" = x; then
21064    # Not in mixed or Windows style, start by that.
21065    new_path=`cmd //c echo $path`
21066  fi
21067
21068
21069  input_path="$new_path"
21070  # Check if we need to convert this using DOS-style short mode. If the path
21071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21072  # take no chances and rewrite it.
21073  # Note: m4 eats our [], so we need to use [ and ] instead.
21074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21075  if test "x$has_forbidden_chars" != x; then
21076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21078  fi
21079
21080
21081  windows_path="$new_path"
21082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21083    unix_path=`$CYGPATH -u "$windows_path"`
21084    new_path="$unix_path"
21085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21087    new_path="$unix_path"
21088  fi
21089
21090  if test "x$path" != "x$new_path"; then
21091    BOOT_JDK="$new_path"
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21094  fi
21095
21096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21098
21099    else
21100      # We're on a unix platform. Hooray! :)
21101      path="$BOOT_JDK"
21102      has_space=`$ECHO "$path" | $GREP " "`
21103      if test "x$has_space" != x; then
21104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21107      fi
21108
21109      # Use eval to expand a potential ~
21110      eval path="$path"
21111      if test ! -f "$path" && test ! -d "$path"; then
21112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21113      fi
21114
21115      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21116    fi
21117  fi
21118
21119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21120$as_echo_n "checking for Boot JDK... " >&6; }
21121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21122$as_echo "$BOOT_JDK" >&6; }
21123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21124$as_echo_n "checking Boot JDK version... " >&6; }
21125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21127$as_echo "$BOOT_JDK_VERSION" >&6; }
21128          fi # end check jdk version
21129        fi # end check javac
21130      fi # end check java
21131    fi # end check boot jdk found
21132  fi
21133
21134
21135  if test "x$BOOT_JDK_FOUND" = xno; then
21136    # Now execute the test
21137
21138  if test -x /usr/libexec/java_home; then
21139    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21140    BOOT_JDK_FOUND=maybe
21141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21142$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21143  fi
21144
21145
21146    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21147    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21148      # Do we have a bin/java?
21149      if test ! -x "$BOOT_JDK/bin/java"; then
21150        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21152        BOOT_JDK_FOUND=no
21153      else
21154        # Do we have a bin/javac?
21155        if test ! -x "$BOOT_JDK/bin/javac"; then
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21158          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21159$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21160          BOOT_JDK_FOUND=no
21161        else
21162          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21163          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21164
21165          # Extra M4 quote needed to protect [] in grep expression.
21166          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21167          if test "x$FOUND_CORRECT_VERSION" = x; then
21168            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21170            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21171$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21172            BOOT_JDK_FOUND=no
21173          else
21174            # We're done! :-)
21175            BOOT_JDK_FOUND=yes
21176
21177  # Only process if variable expands to non-empty
21178
21179  if test "x$BOOT_JDK" != x; then
21180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21181
21182  # Input might be given as Windows format, start by converting to
21183  # unix format.
21184  path="$BOOT_JDK"
21185  new_path=`$CYGPATH -u "$path"`
21186
21187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21190  # "foo.exe" is OK but "foo" is an error.
21191  #
21192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21193  # It is also a way to make sure we got the proper file name for the real test later on.
21194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21195  if test "x$test_shortpath" = x; then
21196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21198    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21199  fi
21200
21201  # Call helper function which possibly converts this using DOS-style short mode.
21202  # If so, the updated path is stored in $new_path.
21203
21204  input_path="$new_path"
21205  # Check if we need to convert this using DOS-style short mode. If the path
21206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21207  # take no chances and rewrite it.
21208  # Note: m4 eats our [], so we need to use [ and ] instead.
21209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21210  if test "x$has_forbidden_chars" != x; then
21211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21215      # Going to short mode and back again did indeed matter. Since short mode is
21216      # case insensitive, let's make it lowercase to improve readability.
21217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21218      # Now convert it back to Unix-style (cygpath)
21219      input_path=`$CYGPATH -u "$shortmode_path"`
21220      new_path="$input_path"
21221    fi
21222  fi
21223
21224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21225  if test "x$test_cygdrive_prefix" = x; then
21226    # As a simple fix, exclude /usr/bin since it's not a real path.
21227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21229      # a path prefixed by /cygdrive for fixpath to work.
21230      new_path="$CYGWIN_ROOT_PATH$input_path"
21231    fi
21232  fi
21233
21234
21235  if test "x$path" != "x$new_path"; then
21236    BOOT_JDK="$new_path"
21237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21239  fi
21240
21241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21242
21243  path="$BOOT_JDK"
21244  has_colon=`$ECHO $path | $GREP ^.:`
21245  new_path="$path"
21246  if test "x$has_colon" = x; then
21247    # Not in mixed or Windows style, start by that.
21248    new_path=`cmd //c echo $path`
21249  fi
21250
21251
21252  input_path="$new_path"
21253  # Check if we need to convert this using DOS-style short mode. If the path
21254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21255  # take no chances and rewrite it.
21256  # Note: m4 eats our [], so we need to use [ and ] instead.
21257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21258  if test "x$has_forbidden_chars" != x; then
21259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21261  fi
21262
21263
21264  windows_path="$new_path"
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266    unix_path=`$CYGPATH -u "$windows_path"`
21267    new_path="$unix_path"
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21270    new_path="$unix_path"
21271  fi
21272
21273  if test "x$path" != "x$new_path"; then
21274    BOOT_JDK="$new_path"
21275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21277  fi
21278
21279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21281
21282    else
21283      # We're on a unix platform. Hooray! :)
21284      path="$BOOT_JDK"
21285      has_space=`$ECHO "$path" | $GREP " "`
21286      if test "x$has_space" != x; then
21287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21290      fi
21291
21292      # Use eval to expand a potential ~
21293      eval path="$path"
21294      if test ! -f "$path" && test ! -d "$path"; then
21295        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21296      fi
21297
21298      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21299    fi
21300  fi
21301
21302            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21303$as_echo_n "checking for Boot JDK... " >&6; }
21304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21305$as_echo "$BOOT_JDK" >&6; }
21306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21307$as_echo_n "checking Boot JDK version... " >&6; }
21308            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21310$as_echo "$BOOT_JDK_VERSION" >&6; }
21311          fi # end check jdk version
21312        fi # end check javac
21313      fi # end check java
21314    fi # end check boot jdk found
21315  fi
21316
21317
21318  if test "x$BOOT_JDK_FOUND" = xno; then
21319    # Now execute the test
21320
21321  if test -x /usr/libexec/java_home; then
21322    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21323    BOOT_JDK_FOUND=maybe
21324    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21325$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21326  fi
21327
21328
21329    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21330    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21331      # Do we have a bin/java?
21332      if test ! -x "$BOOT_JDK/bin/java"; then
21333        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21335        BOOT_JDK_FOUND=no
21336      else
21337        # Do we have a bin/javac?
21338        if test ! -x "$BOOT_JDK/bin/javac"; then
21339          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21341          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21342$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21343          BOOT_JDK_FOUND=no
21344        else
21345          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21346          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21347
21348          # Extra M4 quote needed to protect [] in grep expression.
21349          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21350          if test "x$FOUND_CORRECT_VERSION" = x; then
21351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21353            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21354$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21355            BOOT_JDK_FOUND=no
21356          else
21357            # We're done! :-)
21358            BOOT_JDK_FOUND=yes
21359
21360  # Only process if variable expands to non-empty
21361
21362  if test "x$BOOT_JDK" != x; then
21363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21364
21365  # Input might be given as Windows format, start by converting to
21366  # unix format.
21367  path="$BOOT_JDK"
21368  new_path=`$CYGPATH -u "$path"`
21369
21370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21373  # "foo.exe" is OK but "foo" is an error.
21374  #
21375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21376  # It is also a way to make sure we got the proper file name for the real test later on.
21377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21378  if test "x$test_shortpath" = x; then
21379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21381    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21382  fi
21383
21384  # Call helper function which possibly converts this using DOS-style short mode.
21385  # If so, the updated path is stored in $new_path.
21386
21387  input_path="$new_path"
21388  # Check if we need to convert this using DOS-style short mode. If the path
21389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21390  # take no chances and rewrite it.
21391  # Note: m4 eats our [], so we need to use [ and ] instead.
21392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21393  if test "x$has_forbidden_chars" != x; then
21394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21398      # Going to short mode and back again did indeed matter. Since short mode is
21399      # case insensitive, let's make it lowercase to improve readability.
21400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21401      # Now convert it back to Unix-style (cygpath)
21402      input_path=`$CYGPATH -u "$shortmode_path"`
21403      new_path="$input_path"
21404    fi
21405  fi
21406
21407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21408  if test "x$test_cygdrive_prefix" = x; then
21409    # As a simple fix, exclude /usr/bin since it's not a real path.
21410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21412      # a path prefixed by /cygdrive for fixpath to work.
21413      new_path="$CYGWIN_ROOT_PATH$input_path"
21414    fi
21415  fi
21416
21417
21418  if test "x$path" != "x$new_path"; then
21419    BOOT_JDK="$new_path"
21420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21421$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21422  fi
21423
21424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21425
21426  path="$BOOT_JDK"
21427  has_colon=`$ECHO $path | $GREP ^.:`
21428  new_path="$path"
21429  if test "x$has_colon" = x; then
21430    # Not in mixed or Windows style, start by that.
21431    new_path=`cmd //c echo $path`
21432  fi
21433
21434
21435  input_path="$new_path"
21436  # Check if we need to convert this using DOS-style short mode. If the path
21437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21438  # take no chances and rewrite it.
21439  # Note: m4 eats our [], so we need to use [ and ] instead.
21440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21441  if test "x$has_forbidden_chars" != x; then
21442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21444  fi
21445
21446
21447  windows_path="$new_path"
21448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21449    unix_path=`$CYGPATH -u "$windows_path"`
21450    new_path="$unix_path"
21451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21453    new_path="$unix_path"
21454  fi
21455
21456  if test "x$path" != "x$new_path"; then
21457    BOOT_JDK="$new_path"
21458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21460  fi
21461
21462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21464
21465    else
21466      # We're on a unix platform. Hooray! :)
21467      path="$BOOT_JDK"
21468      has_space=`$ECHO "$path" | $GREP " "`
21469      if test "x$has_space" != x; then
21470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21473      fi
21474
21475      # Use eval to expand a potential ~
21476      eval path="$path"
21477      if test ! -f "$path" && test ! -d "$path"; then
21478        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21479      fi
21480
21481      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21482    fi
21483  fi
21484
21485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21486$as_echo_n "checking for Boot JDK... " >&6; }
21487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21488$as_echo "$BOOT_JDK" >&6; }
21489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21490$as_echo_n "checking Boot JDK version... " >&6; }
21491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21493$as_echo "$BOOT_JDK_VERSION" >&6; }
21494          fi # end check jdk version
21495        fi # end check javac
21496      fi # end check java
21497    fi # end check boot jdk found
21498  fi
21499
21500  fi
21501
21502
21503    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21504    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21505      # Do we have a bin/java?
21506      if test ! -x "$BOOT_JDK/bin/java"; then
21507        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21509        BOOT_JDK_FOUND=no
21510      else
21511        # Do we have a bin/javac?
21512        if test ! -x "$BOOT_JDK/bin/javac"; then
21513          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21515          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21516$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21517          BOOT_JDK_FOUND=no
21518        else
21519          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21520          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21521
21522          # Extra M4 quote needed to protect [] in grep expression.
21523          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21524          if test "x$FOUND_CORRECT_VERSION" = x; then
21525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21527            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21528$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21529            BOOT_JDK_FOUND=no
21530          else
21531            # We're done! :-)
21532            BOOT_JDK_FOUND=yes
21533
21534  # Only process if variable expands to non-empty
21535
21536  if test "x$BOOT_JDK" != x; then
21537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21538
21539  # Input might be given as Windows format, start by converting to
21540  # unix format.
21541  path="$BOOT_JDK"
21542  new_path=`$CYGPATH -u "$path"`
21543
21544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21547  # "foo.exe" is OK but "foo" is an error.
21548  #
21549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21550  # It is also a way to make sure we got the proper file name for the real test later on.
21551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21552  if test "x$test_shortpath" = x; then
21553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21556  fi
21557
21558  # Call helper function which possibly converts this using DOS-style short mode.
21559  # If so, the updated path is stored in $new_path.
21560
21561  input_path="$new_path"
21562  # Check if we need to convert this using DOS-style short mode. If the path
21563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21564  # take no chances and rewrite it.
21565  # Note: m4 eats our [], so we need to use [ and ] instead.
21566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21567  if test "x$has_forbidden_chars" != x; then
21568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21572      # Going to short mode and back again did indeed matter. Since short mode is
21573      # case insensitive, let's make it lowercase to improve readability.
21574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21575      # Now convert it back to Unix-style (cygpath)
21576      input_path=`$CYGPATH -u "$shortmode_path"`
21577      new_path="$input_path"
21578    fi
21579  fi
21580
21581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21582  if test "x$test_cygdrive_prefix" = x; then
21583    # As a simple fix, exclude /usr/bin since it's not a real path.
21584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21586      # a path prefixed by /cygdrive for fixpath to work.
21587      new_path="$CYGWIN_ROOT_PATH$input_path"
21588    fi
21589  fi
21590
21591
21592  if test "x$path" != "x$new_path"; then
21593    BOOT_JDK="$new_path"
21594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21596  fi
21597
21598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21599
21600  path="$BOOT_JDK"
21601  has_colon=`$ECHO $path | $GREP ^.:`
21602  new_path="$path"
21603  if test "x$has_colon" = x; then
21604    # Not in mixed or Windows style, start by that.
21605    new_path=`cmd //c echo $path`
21606  fi
21607
21608
21609  input_path="$new_path"
21610  # Check if we need to convert this using DOS-style short mode. If the path
21611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21612  # take no chances and rewrite it.
21613  # Note: m4 eats our [], so we need to use [ and ] instead.
21614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21615  if test "x$has_forbidden_chars" != x; then
21616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21618  fi
21619
21620
21621  windows_path="$new_path"
21622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21623    unix_path=`$CYGPATH -u "$windows_path"`
21624    new_path="$unix_path"
21625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21627    new_path="$unix_path"
21628  fi
21629
21630  if test "x$path" != "x$new_path"; then
21631    BOOT_JDK="$new_path"
21632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21634  fi
21635
21636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21638
21639    else
21640      # We're on a unix platform. Hooray! :)
21641      path="$BOOT_JDK"
21642      has_space=`$ECHO "$path" | $GREP " "`
21643      if test "x$has_space" != x; then
21644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21647      fi
21648
21649      # Use eval to expand a potential ~
21650      eval path="$path"
21651      if test ! -f "$path" && test ! -d "$path"; then
21652        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21653      fi
21654
21655      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21656    fi
21657  fi
21658
21659            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21660$as_echo_n "checking for Boot JDK... " >&6; }
21661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21662$as_echo "$BOOT_JDK" >&6; }
21663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21664$as_echo_n "checking Boot JDK version... " >&6; }
21665            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21667$as_echo "$BOOT_JDK_VERSION" >&6; }
21668          fi # end check jdk version
21669        fi # end check javac
21670      fi # end check java
21671    fi # end check boot jdk found
21672  fi
21673
21674
21675  # Test: Is $JAVA_HOME set?
21676
21677  if test "x$BOOT_JDK_FOUND" = xno; then
21678    # Now execute the test
21679
21680  if test "x$JAVA_HOME" != x; then
21681    JAVA_HOME_PROCESSED="$JAVA_HOME"
21682
21683  # Only process if variable expands to non-empty
21684
21685  if test "x$JAVA_HOME_PROCESSED" != x; then
21686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21687
21688  # Input might be given as Windows format, start by converting to
21689  # unix format.
21690  path="$JAVA_HOME_PROCESSED"
21691  new_path=`$CYGPATH -u "$path"`
21692
21693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21696  # "foo.exe" is OK but "foo" is an error.
21697  #
21698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21699  # It is also a way to make sure we got the proper file name for the real test later on.
21700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21701  if test "x$test_shortpath" = x; then
21702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21703$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21704    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21705  fi
21706
21707  # Call helper function which possibly converts this using DOS-style short mode.
21708  # If so, the updated path is stored in $new_path.
21709
21710  input_path="$new_path"
21711  # Check if we need to convert this using DOS-style short mode. If the path
21712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21713  # take no chances and rewrite it.
21714  # Note: m4 eats our [], so we need to use [ and ] instead.
21715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21716  if test "x$has_forbidden_chars" != x; then
21717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21721      # Going to short mode and back again did indeed matter. Since short mode is
21722      # case insensitive, let's make it lowercase to improve readability.
21723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21724      # Now convert it back to Unix-style (cygpath)
21725      input_path=`$CYGPATH -u "$shortmode_path"`
21726      new_path="$input_path"
21727    fi
21728  fi
21729
21730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21731  if test "x$test_cygdrive_prefix" = x; then
21732    # As a simple fix, exclude /usr/bin since it's not a real path.
21733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21735      # a path prefixed by /cygdrive for fixpath to work.
21736      new_path="$CYGWIN_ROOT_PATH$input_path"
21737    fi
21738  fi
21739
21740
21741  if test "x$path" != "x$new_path"; then
21742    JAVA_HOME_PROCESSED="$new_path"
21743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21744$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21745  fi
21746
21747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21748
21749  path="$JAVA_HOME_PROCESSED"
21750  has_colon=`$ECHO $path | $GREP ^.:`
21751  new_path="$path"
21752  if test "x$has_colon" = x; then
21753    # Not in mixed or Windows style, start by that.
21754    new_path=`cmd //c echo $path`
21755  fi
21756
21757
21758  input_path="$new_path"
21759  # Check if we need to convert this using DOS-style short mode. If the path
21760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21761  # take no chances and rewrite it.
21762  # Note: m4 eats our [], so we need to use [ and ] instead.
21763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21764  if test "x$has_forbidden_chars" != x; then
21765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21767  fi
21768
21769
21770  windows_path="$new_path"
21771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21772    unix_path=`$CYGPATH -u "$windows_path"`
21773    new_path="$unix_path"
21774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21776    new_path="$unix_path"
21777  fi
21778
21779  if test "x$path" != "x$new_path"; then
21780    JAVA_HOME_PROCESSED="$new_path"
21781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21782$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21783  fi
21784
21785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21787
21788    else
21789      # We're on a unix platform. Hooray! :)
21790      path="$JAVA_HOME_PROCESSED"
21791      has_space=`$ECHO "$path" | $GREP " "`
21792      if test "x$has_space" != x; then
21793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21794$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21796      fi
21797
21798      # Use eval to expand a potential ~
21799      eval path="$path"
21800      if test ! -f "$path" && test ! -d "$path"; then
21801        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21802      fi
21803
21804      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21805    fi
21806  fi
21807
21808    if test ! -d "$JAVA_HOME_PROCESSED"; then
21809      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21810$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21811    else
21812      # Aha, the user has set a JAVA_HOME
21813      # let us use that as the Boot JDK.
21814      BOOT_JDK="$JAVA_HOME_PROCESSED"
21815      BOOT_JDK_FOUND=maybe
21816      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21817$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21818    fi
21819  fi
21820
21821
21822    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21823    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21824      # Do we have a bin/java?
21825      if test ! -x "$BOOT_JDK/bin/java"; then
21826        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21828        BOOT_JDK_FOUND=no
21829      else
21830        # Do we have a bin/javac?
21831        if test ! -x "$BOOT_JDK/bin/javac"; then
21832          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21834          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21835$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21836          BOOT_JDK_FOUND=no
21837        else
21838          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21839          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21840
21841          # Extra M4 quote needed to protect [] in grep expression.
21842          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21843          if test "x$FOUND_CORRECT_VERSION" = x; then
21844            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21846            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21847$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21848            BOOT_JDK_FOUND=no
21849          else
21850            # We're done! :-)
21851            BOOT_JDK_FOUND=yes
21852
21853  # Only process if variable expands to non-empty
21854
21855  if test "x$BOOT_JDK" != x; then
21856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21857
21858  # Input might be given as Windows format, start by converting to
21859  # unix format.
21860  path="$BOOT_JDK"
21861  new_path=`$CYGPATH -u "$path"`
21862
21863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21866  # "foo.exe" is OK but "foo" is an error.
21867  #
21868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21869  # It is also a way to make sure we got the proper file name for the real test later on.
21870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21871  if test "x$test_shortpath" = x; then
21872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21873$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21874    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21875  fi
21876
21877  # Call helper function which possibly converts this using DOS-style short mode.
21878  # If so, the updated path is stored in $new_path.
21879
21880  input_path="$new_path"
21881  # Check if we need to convert this using DOS-style short mode. If the path
21882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21883  # take no chances and rewrite it.
21884  # Note: m4 eats our [], so we need to use [ and ] instead.
21885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21886  if test "x$has_forbidden_chars" != x; then
21887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21891      # Going to short mode and back again did indeed matter. Since short mode is
21892      # case insensitive, let's make it lowercase to improve readability.
21893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21894      # Now convert it back to Unix-style (cygpath)
21895      input_path=`$CYGPATH -u "$shortmode_path"`
21896      new_path="$input_path"
21897    fi
21898  fi
21899
21900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21901  if test "x$test_cygdrive_prefix" = x; then
21902    # As a simple fix, exclude /usr/bin since it's not a real path.
21903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21905      # a path prefixed by /cygdrive for fixpath to work.
21906      new_path="$CYGWIN_ROOT_PATH$input_path"
21907    fi
21908  fi
21909
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21918
21919  path="$BOOT_JDK"
21920  has_colon=`$ECHO $path | $GREP ^.:`
21921  new_path="$path"
21922  if test "x$has_colon" = x; then
21923    # Not in mixed or Windows style, start by that.
21924    new_path=`cmd //c echo $path`
21925  fi
21926
21927
21928  input_path="$new_path"
21929  # Check if we need to convert this using DOS-style short mode. If the path
21930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21931  # take no chances and rewrite it.
21932  # Note: m4 eats our [], so we need to use [ and ] instead.
21933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21934  if test "x$has_forbidden_chars" != x; then
21935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21937  fi
21938
21939
21940  windows_path="$new_path"
21941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21942    unix_path=`$CYGPATH -u "$windows_path"`
21943    new_path="$unix_path"
21944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21946    new_path="$unix_path"
21947  fi
21948
21949  if test "x$path" != "x$new_path"; then
21950    BOOT_JDK="$new_path"
21951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21953  fi
21954
21955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21957
21958    else
21959      # We're on a unix platform. Hooray! :)
21960      path="$BOOT_JDK"
21961      has_space=`$ECHO "$path" | $GREP " "`
21962      if test "x$has_space" != x; then
21963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21966      fi
21967
21968      # Use eval to expand a potential ~
21969      eval path="$path"
21970      if test ! -f "$path" && test ! -d "$path"; then
21971        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21972      fi
21973
21974      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21975    fi
21976  fi
21977
21978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21979$as_echo_n "checking for Boot JDK... " >&6; }
21980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21981$as_echo "$BOOT_JDK" >&6; }
21982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21983$as_echo_n "checking Boot JDK version... " >&6; }
21984            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21986$as_echo "$BOOT_JDK_VERSION" >&6; }
21987          fi # end check jdk version
21988        fi # end check javac
21989      fi # end check java
21990    fi # end check boot jdk found
21991  fi
21992
21993
21994  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21995
21996  if test "x$BOOT_JDK_FOUND" = xno; then
21997    # Now execute the test
21998
21999  # Extract the first word of "javac", so it can be a program name with args.
22000set dummy javac; ac_word=$2
22001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22002$as_echo_n "checking for $ac_word... " >&6; }
22003if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22004  $as_echo_n "(cached) " >&6
22005else
22006  case $JAVAC_CHECK in
22007  [\\/]* | ?:[\\/]*)
22008  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22009  ;;
22010  *)
22011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22012for as_dir in $PATH
22013do
22014  IFS=$as_save_IFS
22015  test -z "$as_dir" && as_dir=.
22016    for ac_exec_ext in '' $ac_executable_extensions; do
22017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22018    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22020    break 2
22021  fi
22022done
22023  done
22024IFS=$as_save_IFS
22025
22026  ;;
22027esac
22028fi
22029JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22030if test -n "$JAVAC_CHECK"; then
22031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22032$as_echo "$JAVAC_CHECK" >&6; }
22033else
22034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22035$as_echo "no" >&6; }
22036fi
22037
22038
22039  # Extract the first word of "java", so it can be a program name with args.
22040set dummy java; ac_word=$2
22041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22042$as_echo_n "checking for $ac_word... " >&6; }
22043if ${ac_cv_path_JAVA_CHECK+:} false; then :
22044  $as_echo_n "(cached) " >&6
22045else
22046  case $JAVA_CHECK in
22047  [\\/]* | ?:[\\/]*)
22048  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22049  ;;
22050  *)
22051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22052for as_dir in $PATH
22053do
22054  IFS=$as_save_IFS
22055  test -z "$as_dir" && as_dir=.
22056    for ac_exec_ext in '' $ac_executable_extensions; do
22057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22058    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22060    break 2
22061  fi
22062done
22063  done
22064IFS=$as_save_IFS
22065
22066  ;;
22067esac
22068fi
22069JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22070if test -n "$JAVA_CHECK"; then
22071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22072$as_echo "$JAVA_CHECK" >&6; }
22073else
22074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22075$as_echo "no" >&6; }
22076fi
22077
22078
22079  BINARY="$JAVAC_CHECK"
22080  if test "x$JAVAC_CHECK" = x; then
22081    BINARY="$JAVA_CHECK"
22082  fi
22083  if test "x$BINARY" != x; then
22084    # So there is a java(c) binary, it might be part of a JDK.
22085    # Lets find the JDK/JRE directory by following symbolic links.
22086    # Linux/GNU systems often have links from /usr/bin/java to
22087    # /etc/alternatives/java to the real JDK binary.
22088
22089  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22090    # Follow a chain of symbolic links. Use readlink
22091    # where it exists, else fall back to horribly
22092    # complicated shell code.
22093    if test "x$READLINK_TESTED" != yes; then
22094      # On MacOSX there is a readlink tool with a different
22095      # purpose than the GNU readlink tool. Check the found readlink.
22096      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22097      if test "x$ISGNU" = x; then
22098        # A readlink that we do not know how to use.
22099        # Are there other non-GNU readlinks out there?
22100        READLINK_TESTED=yes
22101        READLINK=
22102      fi
22103    fi
22104
22105    if test "x$READLINK" != x; then
22106      BINARY=`$READLINK -f $BINARY`
22107    else
22108      # Save the current directory for restoring afterwards
22109      STARTDIR=$PWD
22110      COUNTER=0
22111      sym_link_dir=`$DIRNAME $BINARY`
22112      sym_link_file=`$BASENAME $BINARY`
22113      cd $sym_link_dir
22114      # Use -P flag to resolve symlinks in directories.
22115      cd `$THEPWDCMD -P`
22116      sym_link_dir=`$THEPWDCMD -P`
22117      # Resolve file symlinks
22118      while test $COUNTER -lt 20; do
22119        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22120        if test "x$ISLINK" == x; then
22121          # This is not a symbolic link! We are done!
22122          break
22123        fi
22124        # Again resolve directory symlinks since the target of the just found
22125        # link could be in a different directory
22126        cd `$DIRNAME $ISLINK`
22127        sym_link_dir=`$THEPWDCMD -P`
22128        sym_link_file=`$BASENAME $ISLINK`
22129        let COUNTER=COUNTER+1
22130      done
22131      cd $STARTDIR
22132      BINARY=$sym_link_dir/$sym_link_file
22133    fi
22134  fi
22135
22136    BOOT_JDK=`dirname "$BINARY"`
22137    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22138    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22139      # Looks like we found ourselves an JDK
22140      BOOT_JDK_FOUND=maybe
22141      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22142$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22143    fi
22144  fi
22145
22146
22147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22149      # Do we have a bin/java?
22150      if test ! -x "$BOOT_JDK/bin/java"; then
22151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22153        BOOT_JDK_FOUND=no
22154      else
22155        # Do we have a bin/javac?
22156        if test ! -x "$BOOT_JDK/bin/javac"; then
22157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22161          BOOT_JDK_FOUND=no
22162        else
22163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22165
22166          # Extra M4 quote needed to protect [] in grep expression.
22167          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22168          if test "x$FOUND_CORRECT_VERSION" = x; then
22169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22173            BOOT_JDK_FOUND=no
22174          else
22175            # We're done! :-)
22176            BOOT_JDK_FOUND=yes
22177
22178  # Only process if variable expands to non-empty
22179
22180  if test "x$BOOT_JDK" != x; then
22181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22182
22183  # Input might be given as Windows format, start by converting to
22184  # unix format.
22185  path="$BOOT_JDK"
22186  new_path=`$CYGPATH -u "$path"`
22187
22188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22191  # "foo.exe" is OK but "foo" is an error.
22192  #
22193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22194  # It is also a way to make sure we got the proper file name for the real test later on.
22195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22196  if test "x$test_shortpath" = x; then
22197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22200  fi
22201
22202  # Call helper function which possibly converts this using DOS-style short mode.
22203  # If so, the updated path is stored in $new_path.
22204
22205  input_path="$new_path"
22206  # Check if we need to convert this using DOS-style short mode. If the path
22207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22208  # take no chances and rewrite it.
22209  # Note: m4 eats our [], so we need to use [ and ] instead.
22210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22211  if test "x$has_forbidden_chars" != x; then
22212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22216      # Going to short mode and back again did indeed matter. Since short mode is
22217      # case insensitive, let's make it lowercase to improve readability.
22218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22219      # Now convert it back to Unix-style (cygpath)
22220      input_path=`$CYGPATH -u "$shortmode_path"`
22221      new_path="$input_path"
22222    fi
22223  fi
22224
22225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22226  if test "x$test_cygdrive_prefix" = x; then
22227    # As a simple fix, exclude /usr/bin since it's not a real path.
22228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22230      # a path prefixed by /cygdrive for fixpath to work.
22231      new_path="$CYGWIN_ROOT_PATH$input_path"
22232    fi
22233  fi
22234
22235
22236  if test "x$path" != "x$new_path"; then
22237    BOOT_JDK="$new_path"
22238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22240  fi
22241
22242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22243
22244  path="$BOOT_JDK"
22245  has_colon=`$ECHO $path | $GREP ^.:`
22246  new_path="$path"
22247  if test "x$has_colon" = x; then
22248    # Not in mixed or Windows style, start by that.
22249    new_path=`cmd //c echo $path`
22250  fi
22251
22252
22253  input_path="$new_path"
22254  # Check if we need to convert this using DOS-style short mode. If the path
22255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22256  # take no chances and rewrite it.
22257  # Note: m4 eats our [], so we need to use [ and ] instead.
22258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22259  if test "x$has_forbidden_chars" != x; then
22260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22262  fi
22263
22264
22265  windows_path="$new_path"
22266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22267    unix_path=`$CYGPATH -u "$windows_path"`
22268    new_path="$unix_path"
22269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22271    new_path="$unix_path"
22272  fi
22273
22274  if test "x$path" != "x$new_path"; then
22275    BOOT_JDK="$new_path"
22276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22278  fi
22279
22280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22282
22283    else
22284      # We're on a unix platform. Hooray! :)
22285      path="$BOOT_JDK"
22286      has_space=`$ECHO "$path" | $GREP " "`
22287      if test "x$has_space" != x; then
22288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22291      fi
22292
22293      # Use eval to expand a potential ~
22294      eval path="$path"
22295      if test ! -f "$path" && test ! -d "$path"; then
22296        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22297      fi
22298
22299      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22300    fi
22301  fi
22302
22303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22304$as_echo_n "checking for Boot JDK... " >&6; }
22305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22306$as_echo "$BOOT_JDK" >&6; }
22307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22308$as_echo_n "checking Boot JDK version... " >&6; }
22309            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22311$as_echo "$BOOT_JDK_VERSION" >&6; }
22312          fi # end check jdk version
22313        fi # end check javac
22314      fi # end check java
22315    fi # end check boot jdk found
22316  fi
22317
22318
22319  # Test: Is there a JDK installed in default, well-known locations?
22320
22321  if test "x$BOOT_JDK_FOUND" = xno; then
22322    # Now execute the test
22323
22324  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22325
22326  if test "x$BOOT_JDK_FOUND" = xno; then
22327    # Now execute the test
22328
22329  if test "x$ProgramW6432" != x; then
22330    VIRTUAL_DIR="$ProgramW6432/Java"
22331
22332  windows_path="$VIRTUAL_DIR"
22333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22334    unix_path=`$CYGPATH -u "$windows_path"`
22335    VIRTUAL_DIR="$unix_path"
22336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22338    VIRTUAL_DIR="$unix_path"
22339  fi
22340
22341
22342  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22343  BOOT_JDK_SUFFIX=""
22344  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22345  if test "x$ALL_JDKS_FOUND" != x; then
22346    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22347
22348  if test "x$BOOT_JDK_FOUND" = xno; then
22349    # Now execute the test
22350
22351        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22352        if test -d "$BOOT_JDK"; then
22353          BOOT_JDK_FOUND=maybe
22354          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22355$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22356        fi
22357
22358
22359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22361      # Do we have a bin/java?
22362      if test ! -x "$BOOT_JDK/bin/java"; then
22363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22365        BOOT_JDK_FOUND=no
22366      else
22367        # Do we have a bin/javac?
22368        if test ! -x "$BOOT_JDK/bin/javac"; then
22369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22373          BOOT_JDK_FOUND=no
22374        else
22375          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22376          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22377
22378          # Extra M4 quote needed to protect [] in grep expression.
22379          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22380          if test "x$FOUND_CORRECT_VERSION" = x; then
22381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22383            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22385            BOOT_JDK_FOUND=no
22386          else
22387            # We're done! :-)
22388            BOOT_JDK_FOUND=yes
22389
22390  # Only process if variable expands to non-empty
22391
22392  if test "x$BOOT_JDK" != x; then
22393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22394
22395  # Input might be given as Windows format, start by converting to
22396  # unix format.
22397  path="$BOOT_JDK"
22398  new_path=`$CYGPATH -u "$path"`
22399
22400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22403  # "foo.exe" is OK but "foo" is an error.
22404  #
22405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22406  # It is also a way to make sure we got the proper file name for the real test later on.
22407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22408  if test "x$test_shortpath" = x; then
22409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22412  fi
22413
22414  # Call helper function which possibly converts this using DOS-style short mode.
22415  # If so, the updated path is stored in $new_path.
22416
22417  input_path="$new_path"
22418  # Check if we need to convert this using DOS-style short mode. If the path
22419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22420  # take no chances and rewrite it.
22421  # Note: m4 eats our [], so we need to use [ and ] instead.
22422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22423  if test "x$has_forbidden_chars" != x; then
22424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22428      # Going to short mode and back again did indeed matter. Since short mode is
22429      # case insensitive, let's make it lowercase to improve readability.
22430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22431      # Now convert it back to Unix-style (cygpath)
22432      input_path=`$CYGPATH -u "$shortmode_path"`
22433      new_path="$input_path"
22434    fi
22435  fi
22436
22437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22438  if test "x$test_cygdrive_prefix" = x; then
22439    # As a simple fix, exclude /usr/bin since it's not a real path.
22440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22442      # a path prefixed by /cygdrive for fixpath to work.
22443      new_path="$CYGWIN_ROOT_PATH$input_path"
22444    fi
22445  fi
22446
22447
22448  if test "x$path" != "x$new_path"; then
22449    BOOT_JDK="$new_path"
22450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22452  fi
22453
22454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22455
22456  path="$BOOT_JDK"
22457  has_colon=`$ECHO $path | $GREP ^.:`
22458  new_path="$path"
22459  if test "x$has_colon" = x; then
22460    # Not in mixed or Windows style, start by that.
22461    new_path=`cmd //c echo $path`
22462  fi
22463
22464
22465  input_path="$new_path"
22466  # Check if we need to convert this using DOS-style short mode. If the path
22467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22468  # take no chances and rewrite it.
22469  # Note: m4 eats our [], so we need to use [ and ] instead.
22470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22471  if test "x$has_forbidden_chars" != x; then
22472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22474  fi
22475
22476
22477  windows_path="$new_path"
22478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22479    unix_path=`$CYGPATH -u "$windows_path"`
22480    new_path="$unix_path"
22481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22483    new_path="$unix_path"
22484  fi
22485
22486  if test "x$path" != "x$new_path"; then
22487    BOOT_JDK="$new_path"
22488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22490  fi
22491
22492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22494
22495    else
22496      # We're on a unix platform. Hooray! :)
22497      path="$BOOT_JDK"
22498      has_space=`$ECHO "$path" | $GREP " "`
22499      if test "x$has_space" != x; then
22500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22503      fi
22504
22505      # Use eval to expand a potential ~
22506      eval path="$path"
22507      if test ! -f "$path" && test ! -d "$path"; then
22508        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22509      fi
22510
22511      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22512    fi
22513  fi
22514
22515            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22516$as_echo_n "checking for Boot JDK... " >&6; }
22517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22518$as_echo "$BOOT_JDK" >&6; }
22519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22520$as_echo_n "checking Boot JDK version... " >&6; }
22521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22523$as_echo "$BOOT_JDK_VERSION" >&6; }
22524          fi # end check jdk version
22525        fi # end check javac
22526      fi # end check java
22527    fi # end check boot jdk found
22528  fi
22529
22530    done
22531  fi
22532
22533  fi
22534
22535
22536    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22537    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22538      # Do we have a bin/java?
22539      if test ! -x "$BOOT_JDK/bin/java"; then
22540        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22542        BOOT_JDK_FOUND=no
22543      else
22544        # Do we have a bin/javac?
22545        if test ! -x "$BOOT_JDK/bin/javac"; then
22546          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22548          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22549$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22550          BOOT_JDK_FOUND=no
22551        else
22552          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22553          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22554
22555          # Extra M4 quote needed to protect [] in grep expression.
22556          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22557          if test "x$FOUND_CORRECT_VERSION" = x; then
22558            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22560            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22561$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22562            BOOT_JDK_FOUND=no
22563          else
22564            # We're done! :-)
22565            BOOT_JDK_FOUND=yes
22566
22567  # Only process if variable expands to non-empty
22568
22569  if test "x$BOOT_JDK" != x; then
22570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22571
22572  # Input might be given as Windows format, start by converting to
22573  # unix format.
22574  path="$BOOT_JDK"
22575  new_path=`$CYGPATH -u "$path"`
22576
22577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22580  # "foo.exe" is OK but "foo" is an error.
22581  #
22582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22583  # It is also a way to make sure we got the proper file name for the real test later on.
22584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22585  if test "x$test_shortpath" = x; then
22586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22587$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22588    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22589  fi
22590
22591  # Call helper function which possibly converts this using DOS-style short mode.
22592  # If so, the updated path is stored in $new_path.
22593
22594  input_path="$new_path"
22595  # Check if we need to convert this using DOS-style short mode. If the path
22596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22597  # take no chances and rewrite it.
22598  # Note: m4 eats our [], so we need to use [ and ] instead.
22599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22600  if test "x$has_forbidden_chars" != x; then
22601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22605      # Going to short mode and back again did indeed matter. Since short mode is
22606      # case insensitive, let's make it lowercase to improve readability.
22607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22608      # Now convert it back to Unix-style (cygpath)
22609      input_path=`$CYGPATH -u "$shortmode_path"`
22610      new_path="$input_path"
22611    fi
22612  fi
22613
22614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22615  if test "x$test_cygdrive_prefix" = x; then
22616    # As a simple fix, exclude /usr/bin since it's not a real path.
22617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22619      # a path prefixed by /cygdrive for fixpath to work.
22620      new_path="$CYGWIN_ROOT_PATH$input_path"
22621    fi
22622  fi
22623
22624
22625  if test "x$path" != "x$new_path"; then
22626    BOOT_JDK="$new_path"
22627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22629  fi
22630
22631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22632
22633  path="$BOOT_JDK"
22634  has_colon=`$ECHO $path | $GREP ^.:`
22635  new_path="$path"
22636  if test "x$has_colon" = x; then
22637    # Not in mixed or Windows style, start by that.
22638    new_path=`cmd //c echo $path`
22639  fi
22640
22641
22642  input_path="$new_path"
22643  # Check if we need to convert this using DOS-style short mode. If the path
22644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22645  # take no chances and rewrite it.
22646  # Note: m4 eats our [], so we need to use [ and ] instead.
22647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22648  if test "x$has_forbidden_chars" != x; then
22649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22651  fi
22652
22653
22654  windows_path="$new_path"
22655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22656    unix_path=`$CYGPATH -u "$windows_path"`
22657    new_path="$unix_path"
22658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22660    new_path="$unix_path"
22661  fi
22662
22663  if test "x$path" != "x$new_path"; then
22664    BOOT_JDK="$new_path"
22665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22667  fi
22668
22669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22671
22672    else
22673      # We're on a unix platform. Hooray! :)
22674      path="$BOOT_JDK"
22675      has_space=`$ECHO "$path" | $GREP " "`
22676      if test "x$has_space" != x; then
22677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22679        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22680      fi
22681
22682      # Use eval to expand a potential ~
22683      eval path="$path"
22684      if test ! -f "$path" && test ! -d "$path"; then
22685        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22686      fi
22687
22688      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22689    fi
22690  fi
22691
22692            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22693$as_echo_n "checking for Boot JDK... " >&6; }
22694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22695$as_echo "$BOOT_JDK" >&6; }
22696            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22697$as_echo_n "checking Boot JDK version... " >&6; }
22698            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22700$as_echo "$BOOT_JDK_VERSION" >&6; }
22701          fi # end check jdk version
22702        fi # end check javac
22703      fi # end check java
22704    fi # end check boot jdk found
22705  fi
22706
22707
22708  if test "x$BOOT_JDK_FOUND" = xno; then
22709    # Now execute the test
22710
22711  if test "x$PROGRAMW6432" != x; then
22712    VIRTUAL_DIR="$PROGRAMW6432/Java"
22713
22714  windows_path="$VIRTUAL_DIR"
22715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22716    unix_path=`$CYGPATH -u "$windows_path"`
22717    VIRTUAL_DIR="$unix_path"
22718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22720    VIRTUAL_DIR="$unix_path"
22721  fi
22722
22723
22724  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22725  BOOT_JDK_SUFFIX=""
22726  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22727  if test "x$ALL_JDKS_FOUND" != x; then
22728    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22729
22730  if test "x$BOOT_JDK_FOUND" = xno; then
22731    # Now execute the test
22732
22733        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22734        if test -d "$BOOT_JDK"; then
22735          BOOT_JDK_FOUND=maybe
22736          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22737$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22738        fi
22739
22740
22741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22743      # Do we have a bin/java?
22744      if test ! -x "$BOOT_JDK/bin/java"; then
22745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22747        BOOT_JDK_FOUND=no
22748      else
22749        # Do we have a bin/javac?
22750        if test ! -x "$BOOT_JDK/bin/javac"; then
22751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22755          BOOT_JDK_FOUND=no
22756        else
22757          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22758          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22759
22760          # Extra M4 quote needed to protect [] in grep expression.
22761          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22762          if test "x$FOUND_CORRECT_VERSION" = x; then
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22765            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22766$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22767            BOOT_JDK_FOUND=no
22768          else
22769            # We're done! :-)
22770            BOOT_JDK_FOUND=yes
22771
22772  # Only process if variable expands to non-empty
22773
22774  if test "x$BOOT_JDK" != x; then
22775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22776
22777  # Input might be given as Windows format, start by converting to
22778  # unix format.
22779  path="$BOOT_JDK"
22780  new_path=`$CYGPATH -u "$path"`
22781
22782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22785  # "foo.exe" is OK but "foo" is an error.
22786  #
22787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22788  # It is also a way to make sure we got the proper file name for the real test later on.
22789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22790  if test "x$test_shortpath" = x; then
22791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22793    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22794  fi
22795
22796  # Call helper function which possibly converts this using DOS-style short mode.
22797  # If so, the updated path is stored in $new_path.
22798
22799  input_path="$new_path"
22800  # Check if we need to convert this using DOS-style short mode. If the path
22801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22802  # take no chances and rewrite it.
22803  # Note: m4 eats our [], so we need to use [ and ] instead.
22804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22805  if test "x$has_forbidden_chars" != x; then
22806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22810      # Going to short mode and back again did indeed matter. Since short mode is
22811      # case insensitive, let's make it lowercase to improve readability.
22812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22813      # Now convert it back to Unix-style (cygpath)
22814      input_path=`$CYGPATH -u "$shortmode_path"`
22815      new_path="$input_path"
22816    fi
22817  fi
22818
22819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22820  if test "x$test_cygdrive_prefix" = x; then
22821    # As a simple fix, exclude /usr/bin since it's not a real path.
22822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22824      # a path prefixed by /cygdrive for fixpath to work.
22825      new_path="$CYGWIN_ROOT_PATH$input_path"
22826    fi
22827  fi
22828
22829
22830  if test "x$path" != "x$new_path"; then
22831    BOOT_JDK="$new_path"
22832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22834  fi
22835
22836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22837
22838  path="$BOOT_JDK"
22839  has_colon=`$ECHO $path | $GREP ^.:`
22840  new_path="$path"
22841  if test "x$has_colon" = x; then
22842    # Not in mixed or Windows style, start by that.
22843    new_path=`cmd //c echo $path`
22844  fi
22845
22846
22847  input_path="$new_path"
22848  # Check if we need to convert this using DOS-style short mode. If the path
22849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22850  # take no chances and rewrite it.
22851  # Note: m4 eats our [], so we need to use [ and ] instead.
22852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22853  if test "x$has_forbidden_chars" != x; then
22854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22856  fi
22857
22858
22859  windows_path="$new_path"
22860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22861    unix_path=`$CYGPATH -u "$windows_path"`
22862    new_path="$unix_path"
22863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22865    new_path="$unix_path"
22866  fi
22867
22868  if test "x$path" != "x$new_path"; then
22869    BOOT_JDK="$new_path"
22870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22872  fi
22873
22874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22876
22877    else
22878      # We're on a unix platform. Hooray! :)
22879      path="$BOOT_JDK"
22880      has_space=`$ECHO "$path" | $GREP " "`
22881      if test "x$has_space" != x; then
22882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22885      fi
22886
22887      # Use eval to expand a potential ~
22888      eval path="$path"
22889      if test ! -f "$path" && test ! -d "$path"; then
22890        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22891      fi
22892
22893      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22894    fi
22895  fi
22896
22897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22898$as_echo_n "checking for Boot JDK... " >&6; }
22899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22900$as_echo "$BOOT_JDK" >&6; }
22901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22902$as_echo_n "checking Boot JDK version... " >&6; }
22903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22905$as_echo "$BOOT_JDK_VERSION" >&6; }
22906          fi # end check jdk version
22907        fi # end check javac
22908      fi # end check java
22909    fi # end check boot jdk found
22910  fi
22911
22912    done
22913  fi
22914
22915  fi
22916
22917
22918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22920      # Do we have a bin/java?
22921      if test ! -x "$BOOT_JDK/bin/java"; then
22922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22924        BOOT_JDK_FOUND=no
22925      else
22926        # Do we have a bin/javac?
22927        if test ! -x "$BOOT_JDK/bin/javac"; then
22928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22932          BOOT_JDK_FOUND=no
22933        else
22934          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22935          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22936
22937          # Extra M4 quote needed to protect [] in grep expression.
22938          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22939          if test "x$FOUND_CORRECT_VERSION" = x; then
22940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22942            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22943$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22944            BOOT_JDK_FOUND=no
22945          else
22946            # We're done! :-)
22947            BOOT_JDK_FOUND=yes
22948
22949  # Only process if variable expands to non-empty
22950
22951  if test "x$BOOT_JDK" != x; then
22952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22953
22954  # Input might be given as Windows format, start by converting to
22955  # unix format.
22956  path="$BOOT_JDK"
22957  new_path=`$CYGPATH -u "$path"`
22958
22959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22962  # "foo.exe" is OK but "foo" is an error.
22963  #
22964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22965  # It is also a way to make sure we got the proper file name for the real test later on.
22966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22967  if test "x$test_shortpath" = x; then
22968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22970    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22971  fi
22972
22973  # Call helper function which possibly converts this using DOS-style short mode.
22974  # If so, the updated path is stored in $new_path.
22975
22976  input_path="$new_path"
22977  # Check if we need to convert this using DOS-style short mode. If the path
22978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22979  # take no chances and rewrite it.
22980  # Note: m4 eats our [], so we need to use [ and ] instead.
22981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22982  if test "x$has_forbidden_chars" != x; then
22983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22987      # Going to short mode and back again did indeed matter. Since short mode is
22988      # case insensitive, let's make it lowercase to improve readability.
22989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22990      # Now convert it back to Unix-style (cygpath)
22991      input_path=`$CYGPATH -u "$shortmode_path"`
22992      new_path="$input_path"
22993    fi
22994  fi
22995
22996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22997  if test "x$test_cygdrive_prefix" = x; then
22998    # As a simple fix, exclude /usr/bin since it's not a real path.
22999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23001      # a path prefixed by /cygdrive for fixpath to work.
23002      new_path="$CYGWIN_ROOT_PATH$input_path"
23003    fi
23004  fi
23005
23006
23007  if test "x$path" != "x$new_path"; then
23008    BOOT_JDK="$new_path"
23009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23011  fi
23012
23013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23014
23015  path="$BOOT_JDK"
23016  has_colon=`$ECHO $path | $GREP ^.:`
23017  new_path="$path"
23018  if test "x$has_colon" = x; then
23019    # Not in mixed or Windows style, start by that.
23020    new_path=`cmd //c echo $path`
23021  fi
23022
23023
23024  input_path="$new_path"
23025  # Check if we need to convert this using DOS-style short mode. If the path
23026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23027  # take no chances and rewrite it.
23028  # Note: m4 eats our [], so we need to use [ and ] instead.
23029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23030  if test "x$has_forbidden_chars" != x; then
23031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23033  fi
23034
23035
23036  windows_path="$new_path"
23037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23038    unix_path=`$CYGPATH -u "$windows_path"`
23039    new_path="$unix_path"
23040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23042    new_path="$unix_path"
23043  fi
23044
23045  if test "x$path" != "x$new_path"; then
23046    BOOT_JDK="$new_path"
23047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23049  fi
23050
23051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23053
23054    else
23055      # We're on a unix platform. Hooray! :)
23056      path="$BOOT_JDK"
23057      has_space=`$ECHO "$path" | $GREP " "`
23058      if test "x$has_space" != x; then
23059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23062      fi
23063
23064      # Use eval to expand a potential ~
23065      eval path="$path"
23066      if test ! -f "$path" && test ! -d "$path"; then
23067        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23068      fi
23069
23070      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23071    fi
23072  fi
23073
23074            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23075$as_echo_n "checking for Boot JDK... " >&6; }
23076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23077$as_echo "$BOOT_JDK" >&6; }
23078            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23079$as_echo_n "checking Boot JDK version... " >&6; }
23080            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23082$as_echo "$BOOT_JDK_VERSION" >&6; }
23083          fi # end check jdk version
23084        fi # end check javac
23085      fi # end check java
23086    fi # end check boot jdk found
23087  fi
23088
23089
23090  if test "x$BOOT_JDK_FOUND" = xno; then
23091    # Now execute the test
23092
23093  if test "x$PROGRAMFILES" != x; then
23094    VIRTUAL_DIR="$PROGRAMFILES/Java"
23095
23096  windows_path="$VIRTUAL_DIR"
23097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23098    unix_path=`$CYGPATH -u "$windows_path"`
23099    VIRTUAL_DIR="$unix_path"
23100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23102    VIRTUAL_DIR="$unix_path"
23103  fi
23104
23105
23106  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23107  BOOT_JDK_SUFFIX=""
23108  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23109  if test "x$ALL_JDKS_FOUND" != x; then
23110    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23111
23112  if test "x$BOOT_JDK_FOUND" = xno; then
23113    # Now execute the test
23114
23115        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23116        if test -d "$BOOT_JDK"; then
23117          BOOT_JDK_FOUND=maybe
23118          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23119$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23120        fi
23121
23122
23123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23125      # Do we have a bin/java?
23126      if test ! -x "$BOOT_JDK/bin/java"; then
23127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23129        BOOT_JDK_FOUND=no
23130      else
23131        # Do we have a bin/javac?
23132        if test ! -x "$BOOT_JDK/bin/javac"; then
23133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23137          BOOT_JDK_FOUND=no
23138        else
23139          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23140          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23141
23142          # Extra M4 quote needed to protect [] in grep expression.
23143          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23144          if test "x$FOUND_CORRECT_VERSION" = x; then
23145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23147            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23148$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23149            BOOT_JDK_FOUND=no
23150          else
23151            # We're done! :-)
23152            BOOT_JDK_FOUND=yes
23153
23154  # Only process if variable expands to non-empty
23155
23156  if test "x$BOOT_JDK" != x; then
23157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23158
23159  # Input might be given as Windows format, start by converting to
23160  # unix format.
23161  path="$BOOT_JDK"
23162  new_path=`$CYGPATH -u "$path"`
23163
23164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23167  # "foo.exe" is OK but "foo" is an error.
23168  #
23169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23170  # It is also a way to make sure we got the proper file name for the real test later on.
23171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23172  if test "x$test_shortpath" = x; then
23173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23176  fi
23177
23178  # Call helper function which possibly converts this using DOS-style short mode.
23179  # If so, the updated path is stored in $new_path.
23180
23181  input_path="$new_path"
23182  # Check if we need to convert this using DOS-style short mode. If the path
23183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23184  # take no chances and rewrite it.
23185  # Note: m4 eats our [], so we need to use [ and ] instead.
23186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23187  if test "x$has_forbidden_chars" != x; then
23188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23192      # Going to short mode and back again did indeed matter. Since short mode is
23193      # case insensitive, let's make it lowercase to improve readability.
23194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23195      # Now convert it back to Unix-style (cygpath)
23196      input_path=`$CYGPATH -u "$shortmode_path"`
23197      new_path="$input_path"
23198    fi
23199  fi
23200
23201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23202  if test "x$test_cygdrive_prefix" = x; then
23203    # As a simple fix, exclude /usr/bin since it's not a real path.
23204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23206      # a path prefixed by /cygdrive for fixpath to work.
23207      new_path="$CYGWIN_ROOT_PATH$input_path"
23208    fi
23209  fi
23210
23211
23212  if test "x$path" != "x$new_path"; then
23213    BOOT_JDK="$new_path"
23214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23216  fi
23217
23218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23219
23220  path="$BOOT_JDK"
23221  has_colon=`$ECHO $path | $GREP ^.:`
23222  new_path="$path"
23223  if test "x$has_colon" = x; then
23224    # Not in mixed or Windows style, start by that.
23225    new_path=`cmd //c echo $path`
23226  fi
23227
23228
23229  input_path="$new_path"
23230  # Check if we need to convert this using DOS-style short mode. If the path
23231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23232  # take no chances and rewrite it.
23233  # Note: m4 eats our [], so we need to use [ and ] instead.
23234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23235  if test "x$has_forbidden_chars" != x; then
23236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23238  fi
23239
23240
23241  windows_path="$new_path"
23242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23243    unix_path=`$CYGPATH -u "$windows_path"`
23244    new_path="$unix_path"
23245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23247    new_path="$unix_path"
23248  fi
23249
23250  if test "x$path" != "x$new_path"; then
23251    BOOT_JDK="$new_path"
23252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23254  fi
23255
23256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23258
23259    else
23260      # We're on a unix platform. Hooray! :)
23261      path="$BOOT_JDK"
23262      has_space=`$ECHO "$path" | $GREP " "`
23263      if test "x$has_space" != x; then
23264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23267      fi
23268
23269      # Use eval to expand a potential ~
23270      eval path="$path"
23271      if test ! -f "$path" && test ! -d "$path"; then
23272        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23273      fi
23274
23275      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23276    fi
23277  fi
23278
23279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23280$as_echo_n "checking for Boot JDK... " >&6; }
23281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23282$as_echo "$BOOT_JDK" >&6; }
23283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23284$as_echo_n "checking Boot JDK version... " >&6; }
23285            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23287$as_echo "$BOOT_JDK_VERSION" >&6; }
23288          fi # end check jdk version
23289        fi # end check javac
23290      fi # end check java
23291    fi # end check boot jdk found
23292  fi
23293
23294    done
23295  fi
23296
23297  fi
23298
23299
23300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23302      # Do we have a bin/java?
23303      if test ! -x "$BOOT_JDK/bin/java"; then
23304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23306        BOOT_JDK_FOUND=no
23307      else
23308        # Do we have a bin/javac?
23309        if test ! -x "$BOOT_JDK/bin/javac"; then
23310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23314          BOOT_JDK_FOUND=no
23315        else
23316          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23317          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23318
23319          # Extra M4 quote needed to protect [] in grep expression.
23320          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23321          if test "x$FOUND_CORRECT_VERSION" = x; then
23322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23324            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23325$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23326            BOOT_JDK_FOUND=no
23327          else
23328            # We're done! :-)
23329            BOOT_JDK_FOUND=yes
23330
23331  # Only process if variable expands to non-empty
23332
23333  if test "x$BOOT_JDK" != x; then
23334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23335
23336  # Input might be given as Windows format, start by converting to
23337  # unix format.
23338  path="$BOOT_JDK"
23339  new_path=`$CYGPATH -u "$path"`
23340
23341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23344  # "foo.exe" is OK but "foo" is an error.
23345  #
23346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23347  # It is also a way to make sure we got the proper file name for the real test later on.
23348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23349  if test "x$test_shortpath" = x; then
23350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23353  fi
23354
23355  # Call helper function which possibly converts this using DOS-style short mode.
23356  # If so, the updated path is stored in $new_path.
23357
23358  input_path="$new_path"
23359  # Check if we need to convert this using DOS-style short mode. If the path
23360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23361  # take no chances and rewrite it.
23362  # Note: m4 eats our [], so we need to use [ and ] instead.
23363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23364  if test "x$has_forbidden_chars" != x; then
23365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23369      # Going to short mode and back again did indeed matter. Since short mode is
23370      # case insensitive, let's make it lowercase to improve readability.
23371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23372      # Now convert it back to Unix-style (cygpath)
23373      input_path=`$CYGPATH -u "$shortmode_path"`
23374      new_path="$input_path"
23375    fi
23376  fi
23377
23378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23379  if test "x$test_cygdrive_prefix" = x; then
23380    # As a simple fix, exclude /usr/bin since it's not a real path.
23381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23383      # a path prefixed by /cygdrive for fixpath to work.
23384      new_path="$CYGWIN_ROOT_PATH$input_path"
23385    fi
23386  fi
23387
23388
23389  if test "x$path" != "x$new_path"; then
23390    BOOT_JDK="$new_path"
23391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23393  fi
23394
23395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23396
23397  path="$BOOT_JDK"
23398  has_colon=`$ECHO $path | $GREP ^.:`
23399  new_path="$path"
23400  if test "x$has_colon" = x; then
23401    # Not in mixed or Windows style, start by that.
23402    new_path=`cmd //c echo $path`
23403  fi
23404
23405
23406  input_path="$new_path"
23407  # Check if we need to convert this using DOS-style short mode. If the path
23408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23409  # take no chances and rewrite it.
23410  # Note: m4 eats our [], so we need to use [ and ] instead.
23411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23412  if test "x$has_forbidden_chars" != x; then
23413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23415  fi
23416
23417
23418  windows_path="$new_path"
23419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23420    unix_path=`$CYGPATH -u "$windows_path"`
23421    new_path="$unix_path"
23422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23424    new_path="$unix_path"
23425  fi
23426
23427  if test "x$path" != "x$new_path"; then
23428    BOOT_JDK="$new_path"
23429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23431  fi
23432
23433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23435
23436    else
23437      # We're on a unix platform. Hooray! :)
23438      path="$BOOT_JDK"
23439      has_space=`$ECHO "$path" | $GREP " "`
23440      if test "x$has_space" != x; then
23441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23444      fi
23445
23446      # Use eval to expand a potential ~
23447      eval path="$path"
23448      if test ! -f "$path" && test ! -d "$path"; then
23449        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23450      fi
23451
23452      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23453    fi
23454  fi
23455
23456            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23457$as_echo_n "checking for Boot JDK... " >&6; }
23458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23459$as_echo "$BOOT_JDK" >&6; }
23460            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23461$as_echo_n "checking Boot JDK version... " >&6; }
23462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23464$as_echo "$BOOT_JDK_VERSION" >&6; }
23465          fi # end check jdk version
23466        fi # end check javac
23467      fi # end check java
23468    fi # end check boot jdk found
23469  fi
23470
23471
23472  if test "x$BOOT_JDK_FOUND" = xno; then
23473    # Now execute the test
23474
23475  if test "x$ProgramFiles" != x; then
23476    VIRTUAL_DIR="$ProgramFiles/Java"
23477
23478  windows_path="$VIRTUAL_DIR"
23479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23480    unix_path=`$CYGPATH -u "$windows_path"`
23481    VIRTUAL_DIR="$unix_path"
23482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23484    VIRTUAL_DIR="$unix_path"
23485  fi
23486
23487
23488  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23489  BOOT_JDK_SUFFIX=""
23490  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23491  if test "x$ALL_JDKS_FOUND" != x; then
23492    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23493
23494  if test "x$BOOT_JDK_FOUND" = xno; then
23495    # Now execute the test
23496
23497        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23498        if test -d "$BOOT_JDK"; then
23499          BOOT_JDK_FOUND=maybe
23500          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23501$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23502        fi
23503
23504
23505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23507      # Do we have a bin/java?
23508      if test ! -x "$BOOT_JDK/bin/java"; then
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23511        BOOT_JDK_FOUND=no
23512      else
23513        # Do we have a bin/javac?
23514        if test ! -x "$BOOT_JDK/bin/javac"; then
23515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23519          BOOT_JDK_FOUND=no
23520        else
23521          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23522          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23523
23524          # Extra M4 quote needed to protect [] in grep expression.
23525          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23526          if test "x$FOUND_CORRECT_VERSION" = x; then
23527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23529            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23530$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23531            BOOT_JDK_FOUND=no
23532          else
23533            # We're done! :-)
23534            BOOT_JDK_FOUND=yes
23535
23536  # Only process if variable expands to non-empty
23537
23538  if test "x$BOOT_JDK" != x; then
23539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23540
23541  # Input might be given as Windows format, start by converting to
23542  # unix format.
23543  path="$BOOT_JDK"
23544  new_path=`$CYGPATH -u "$path"`
23545
23546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23549  # "foo.exe" is OK but "foo" is an error.
23550  #
23551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23552  # It is also a way to make sure we got the proper file name for the real test later on.
23553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23554  if test "x$test_shortpath" = x; then
23555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23558  fi
23559
23560  # Call helper function which possibly converts this using DOS-style short mode.
23561  # If so, the updated path is stored in $new_path.
23562
23563  input_path="$new_path"
23564  # Check if we need to convert this using DOS-style short mode. If the path
23565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23566  # take no chances and rewrite it.
23567  # Note: m4 eats our [], so we need to use [ and ] instead.
23568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23569  if test "x$has_forbidden_chars" != x; then
23570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23574      # Going to short mode and back again did indeed matter. Since short mode is
23575      # case insensitive, let's make it lowercase to improve readability.
23576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23577      # Now convert it back to Unix-style (cygpath)
23578      input_path=`$CYGPATH -u "$shortmode_path"`
23579      new_path="$input_path"
23580    fi
23581  fi
23582
23583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23584  if test "x$test_cygdrive_prefix" = x; then
23585    # As a simple fix, exclude /usr/bin since it's not a real path.
23586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23588      # a path prefixed by /cygdrive for fixpath to work.
23589      new_path="$CYGWIN_ROOT_PATH$input_path"
23590    fi
23591  fi
23592
23593
23594  if test "x$path" != "x$new_path"; then
23595    BOOT_JDK="$new_path"
23596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23598  fi
23599
23600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23601
23602  path="$BOOT_JDK"
23603  has_colon=`$ECHO $path | $GREP ^.:`
23604  new_path="$path"
23605  if test "x$has_colon" = x; then
23606    # Not in mixed or Windows style, start by that.
23607    new_path=`cmd //c echo $path`
23608  fi
23609
23610
23611  input_path="$new_path"
23612  # Check if we need to convert this using DOS-style short mode. If the path
23613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23614  # take no chances and rewrite it.
23615  # Note: m4 eats our [], so we need to use [ and ] instead.
23616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23617  if test "x$has_forbidden_chars" != x; then
23618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23620  fi
23621
23622
23623  windows_path="$new_path"
23624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23625    unix_path=`$CYGPATH -u "$windows_path"`
23626    new_path="$unix_path"
23627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23629    new_path="$unix_path"
23630  fi
23631
23632  if test "x$path" != "x$new_path"; then
23633    BOOT_JDK="$new_path"
23634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23636  fi
23637
23638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23640
23641    else
23642      # We're on a unix platform. Hooray! :)
23643      path="$BOOT_JDK"
23644      has_space=`$ECHO "$path" | $GREP " "`
23645      if test "x$has_space" != x; then
23646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23649      fi
23650
23651      # Use eval to expand a potential ~
23652      eval path="$path"
23653      if test ! -f "$path" && test ! -d "$path"; then
23654        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23655      fi
23656
23657      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23658    fi
23659  fi
23660
23661            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23662$as_echo_n "checking for Boot JDK... " >&6; }
23663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23664$as_echo "$BOOT_JDK" >&6; }
23665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23666$as_echo_n "checking Boot JDK version... " >&6; }
23667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23669$as_echo "$BOOT_JDK_VERSION" >&6; }
23670          fi # end check jdk version
23671        fi # end check javac
23672      fi # end check java
23673    fi # end check boot jdk found
23674  fi
23675
23676    done
23677  fi
23678
23679  fi
23680
23681
23682    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23683    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23684      # Do we have a bin/java?
23685      if test ! -x "$BOOT_JDK/bin/java"; then
23686        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23688        BOOT_JDK_FOUND=no
23689      else
23690        # Do we have a bin/javac?
23691        if test ! -x "$BOOT_JDK/bin/javac"; then
23692          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23694          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23695$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23696          BOOT_JDK_FOUND=no
23697        else
23698          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23699          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23700
23701          # Extra M4 quote needed to protect [] in grep expression.
23702          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23703          if test "x$FOUND_CORRECT_VERSION" = x; then
23704            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23706            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23707$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23708            BOOT_JDK_FOUND=no
23709          else
23710            # We're done! :-)
23711            BOOT_JDK_FOUND=yes
23712
23713  # Only process if variable expands to non-empty
23714
23715  if test "x$BOOT_JDK" != x; then
23716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23717
23718  # Input might be given as Windows format, start by converting to
23719  # unix format.
23720  path="$BOOT_JDK"
23721  new_path=`$CYGPATH -u "$path"`
23722
23723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23726  # "foo.exe" is OK but "foo" is an error.
23727  #
23728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23729  # It is also a way to make sure we got the proper file name for the real test later on.
23730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23731  if test "x$test_shortpath" = x; then
23732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23734    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23735  fi
23736
23737  # Call helper function which possibly converts this using DOS-style short mode.
23738  # If so, the updated path is stored in $new_path.
23739
23740  input_path="$new_path"
23741  # Check if we need to convert this using DOS-style short mode. If the path
23742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23743  # take no chances and rewrite it.
23744  # Note: m4 eats our [], so we need to use [ and ] instead.
23745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23746  if test "x$has_forbidden_chars" != x; then
23747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23751      # Going to short mode and back again did indeed matter. Since short mode is
23752      # case insensitive, let's make it lowercase to improve readability.
23753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23754      # Now convert it back to Unix-style (cygpath)
23755      input_path=`$CYGPATH -u "$shortmode_path"`
23756      new_path="$input_path"
23757    fi
23758  fi
23759
23760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23761  if test "x$test_cygdrive_prefix" = x; then
23762    # As a simple fix, exclude /usr/bin since it's not a real path.
23763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23765      # a path prefixed by /cygdrive for fixpath to work.
23766      new_path="$CYGWIN_ROOT_PATH$input_path"
23767    fi
23768  fi
23769
23770
23771  if test "x$path" != "x$new_path"; then
23772    BOOT_JDK="$new_path"
23773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23775  fi
23776
23777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23778
23779  path="$BOOT_JDK"
23780  has_colon=`$ECHO $path | $GREP ^.:`
23781  new_path="$path"
23782  if test "x$has_colon" = x; then
23783    # Not in mixed or Windows style, start by that.
23784    new_path=`cmd //c echo $path`
23785  fi
23786
23787
23788  input_path="$new_path"
23789  # Check if we need to convert this using DOS-style short mode. If the path
23790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23791  # take no chances and rewrite it.
23792  # Note: m4 eats our [], so we need to use [ and ] instead.
23793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23794  if test "x$has_forbidden_chars" != x; then
23795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23797  fi
23798
23799
23800  windows_path="$new_path"
23801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23802    unix_path=`$CYGPATH -u "$windows_path"`
23803    new_path="$unix_path"
23804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23806    new_path="$unix_path"
23807  fi
23808
23809  if test "x$path" != "x$new_path"; then
23810    BOOT_JDK="$new_path"
23811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23813  fi
23814
23815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23817
23818    else
23819      # We're on a unix platform. Hooray! :)
23820      path="$BOOT_JDK"
23821      has_space=`$ECHO "$path" | $GREP " "`
23822      if test "x$has_space" != x; then
23823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23826      fi
23827
23828      # Use eval to expand a potential ~
23829      eval path="$path"
23830      if test ! -f "$path" && test ! -d "$path"; then
23831        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23832      fi
23833
23834      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23835    fi
23836  fi
23837
23838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23839$as_echo_n "checking for Boot JDK... " >&6; }
23840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23841$as_echo "$BOOT_JDK" >&6; }
23842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23843$as_echo_n "checking Boot JDK version... " >&6; }
23844            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23846$as_echo "$BOOT_JDK_VERSION" >&6; }
23847          fi # end check jdk version
23848        fi # end check javac
23849      fi # end check java
23850    fi # end check boot jdk found
23851  fi
23852
23853
23854  if test "x$BOOT_JDK_FOUND" = xno; then
23855    # Now execute the test
23856
23857  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23858  BOOT_JDK_SUFFIX=""
23859  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23860  if test "x$ALL_JDKS_FOUND" != x; then
23861    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23862
23863  if test "x$BOOT_JDK_FOUND" = xno; then
23864    # Now execute the test
23865
23866        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23867        if test -d "$BOOT_JDK"; then
23868          BOOT_JDK_FOUND=maybe
23869          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23870$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23871        fi
23872
23873
23874    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23875    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23876      # Do we have a bin/java?
23877      if test ! -x "$BOOT_JDK/bin/java"; then
23878        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23880        BOOT_JDK_FOUND=no
23881      else
23882        # Do we have a bin/javac?
23883        if test ! -x "$BOOT_JDK/bin/javac"; then
23884          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23886          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23887$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23888          BOOT_JDK_FOUND=no
23889        else
23890          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23891          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23892
23893          # Extra M4 quote needed to protect [] in grep expression.
23894          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23895          if test "x$FOUND_CORRECT_VERSION" = x; then
23896            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23898            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23899$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23900            BOOT_JDK_FOUND=no
23901          else
23902            # We're done! :-)
23903            BOOT_JDK_FOUND=yes
23904
23905  # Only process if variable expands to non-empty
23906
23907  if test "x$BOOT_JDK" != x; then
23908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23909
23910  # Input might be given as Windows format, start by converting to
23911  # unix format.
23912  path="$BOOT_JDK"
23913  new_path=`$CYGPATH -u "$path"`
23914
23915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23918  # "foo.exe" is OK but "foo" is an error.
23919  #
23920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23921  # It is also a way to make sure we got the proper file name for the real test later on.
23922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23923  if test "x$test_shortpath" = x; then
23924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23926    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23927  fi
23928
23929  # Call helper function which possibly converts this using DOS-style short mode.
23930  # If so, the updated path is stored in $new_path.
23931
23932  input_path="$new_path"
23933  # Check if we need to convert this using DOS-style short mode. If the path
23934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23935  # take no chances and rewrite it.
23936  # Note: m4 eats our [], so we need to use [ and ] instead.
23937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23938  if test "x$has_forbidden_chars" != x; then
23939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23943      # Going to short mode and back again did indeed matter. Since short mode is
23944      # case insensitive, let's make it lowercase to improve readability.
23945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23946      # Now convert it back to Unix-style (cygpath)
23947      input_path=`$CYGPATH -u "$shortmode_path"`
23948      new_path="$input_path"
23949    fi
23950  fi
23951
23952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23953  if test "x$test_cygdrive_prefix" = x; then
23954    # As a simple fix, exclude /usr/bin since it's not a real path.
23955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23957      # a path prefixed by /cygdrive for fixpath to work.
23958      new_path="$CYGWIN_ROOT_PATH$input_path"
23959    fi
23960  fi
23961
23962
23963  if test "x$path" != "x$new_path"; then
23964    BOOT_JDK="$new_path"
23965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23966$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23967  fi
23968
23969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23970
23971  path="$BOOT_JDK"
23972  has_colon=`$ECHO $path | $GREP ^.:`
23973  new_path="$path"
23974  if test "x$has_colon" = x; then
23975    # Not in mixed or Windows style, start by that.
23976    new_path=`cmd //c echo $path`
23977  fi
23978
23979
23980  input_path="$new_path"
23981  # Check if we need to convert this using DOS-style short mode. If the path
23982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23983  # take no chances and rewrite it.
23984  # Note: m4 eats our [], so we need to use [ and ] instead.
23985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23986  if test "x$has_forbidden_chars" != x; then
23987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23989  fi
23990
23991
23992  windows_path="$new_path"
23993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23994    unix_path=`$CYGPATH -u "$windows_path"`
23995    new_path="$unix_path"
23996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23998    new_path="$unix_path"
23999  fi
24000
24001  if test "x$path" != "x$new_path"; then
24002    BOOT_JDK="$new_path"
24003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24005  fi
24006
24007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24009
24010    else
24011      # We're on a unix platform. Hooray! :)
24012      path="$BOOT_JDK"
24013      has_space=`$ECHO "$path" | $GREP " "`
24014      if test "x$has_space" != x; then
24015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24018      fi
24019
24020      # Use eval to expand a potential ~
24021      eval path="$path"
24022      if test ! -f "$path" && test ! -d "$path"; then
24023        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24024      fi
24025
24026      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24027    fi
24028  fi
24029
24030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24031$as_echo_n "checking for Boot JDK... " >&6; }
24032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24033$as_echo "$BOOT_JDK" >&6; }
24034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24035$as_echo_n "checking Boot JDK version... " >&6; }
24036            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24038$as_echo "$BOOT_JDK_VERSION" >&6; }
24039          fi # end check jdk version
24040        fi # end check javac
24041      fi # end check java
24042    fi # end check boot jdk found
24043  fi
24044
24045    done
24046  fi
24047
24048
24049    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24050    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24051      # Do we have a bin/java?
24052      if test ! -x "$BOOT_JDK/bin/java"; then
24053        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24055        BOOT_JDK_FOUND=no
24056      else
24057        # Do we have a bin/javac?
24058        if test ! -x "$BOOT_JDK/bin/javac"; then
24059          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24061          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24062$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24063          BOOT_JDK_FOUND=no
24064        else
24065          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24066          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24067
24068          # Extra M4 quote needed to protect [] in grep expression.
24069          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24070          if test "x$FOUND_CORRECT_VERSION" = x; then
24071            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24073            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24074$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24075            BOOT_JDK_FOUND=no
24076          else
24077            # We're done! :-)
24078            BOOT_JDK_FOUND=yes
24079
24080  # Only process if variable expands to non-empty
24081
24082  if test "x$BOOT_JDK" != x; then
24083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24084
24085  # Input might be given as Windows format, start by converting to
24086  # unix format.
24087  path="$BOOT_JDK"
24088  new_path=`$CYGPATH -u "$path"`
24089
24090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24093  # "foo.exe" is OK but "foo" is an error.
24094  #
24095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24096  # It is also a way to make sure we got the proper file name for the real test later on.
24097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24098  if test "x$test_shortpath" = x; then
24099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24102  fi
24103
24104  # Call helper function which possibly converts this using DOS-style short mode.
24105  # If so, the updated path is stored in $new_path.
24106
24107  input_path="$new_path"
24108  # Check if we need to convert this using DOS-style short mode. If the path
24109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24110  # take no chances and rewrite it.
24111  # Note: m4 eats our [], so we need to use [ and ] instead.
24112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24113  if test "x$has_forbidden_chars" != x; then
24114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24118      # Going to short mode and back again did indeed matter. Since short mode is
24119      # case insensitive, let's make it lowercase to improve readability.
24120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24121      # Now convert it back to Unix-style (cygpath)
24122      input_path=`$CYGPATH -u "$shortmode_path"`
24123      new_path="$input_path"
24124    fi
24125  fi
24126
24127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24128  if test "x$test_cygdrive_prefix" = x; then
24129    # As a simple fix, exclude /usr/bin since it's not a real path.
24130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24132      # a path prefixed by /cygdrive for fixpath to work.
24133      new_path="$CYGWIN_ROOT_PATH$input_path"
24134    fi
24135  fi
24136
24137
24138  if test "x$path" != "x$new_path"; then
24139    BOOT_JDK="$new_path"
24140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24142  fi
24143
24144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24145
24146  path="$BOOT_JDK"
24147  has_colon=`$ECHO $path | $GREP ^.:`
24148  new_path="$path"
24149  if test "x$has_colon" = x; then
24150    # Not in mixed or Windows style, start by that.
24151    new_path=`cmd //c echo $path`
24152  fi
24153
24154
24155  input_path="$new_path"
24156  # Check if we need to convert this using DOS-style short mode. If the path
24157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24158  # take no chances and rewrite it.
24159  # Note: m4 eats our [], so we need to use [ and ] instead.
24160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24161  if test "x$has_forbidden_chars" != x; then
24162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24164  fi
24165
24166
24167  windows_path="$new_path"
24168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24169    unix_path=`$CYGPATH -u "$windows_path"`
24170    new_path="$unix_path"
24171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24173    new_path="$unix_path"
24174  fi
24175
24176  if test "x$path" != "x$new_path"; then
24177    BOOT_JDK="$new_path"
24178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24180  fi
24181
24182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24184
24185    else
24186      # We're on a unix platform. Hooray! :)
24187      path="$BOOT_JDK"
24188      has_space=`$ECHO "$path" | $GREP " "`
24189      if test "x$has_space" != x; then
24190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24193      fi
24194
24195      # Use eval to expand a potential ~
24196      eval path="$path"
24197      if test ! -f "$path" && test ! -d "$path"; then
24198        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24199      fi
24200
24201      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24202    fi
24203  fi
24204
24205            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24206$as_echo_n "checking for Boot JDK... " >&6; }
24207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24208$as_echo "$BOOT_JDK" >&6; }
24209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24210$as_echo_n "checking Boot JDK version... " >&6; }
24211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24213$as_echo "$BOOT_JDK_VERSION" >&6; }
24214          fi # end check jdk version
24215        fi # end check javac
24216      fi # end check java
24217    fi # end check boot jdk found
24218  fi
24219
24220  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24221
24222  if test "x$BOOT_JDK_FOUND" = xno; then
24223    # Now execute the test
24224
24225  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24226  BOOT_JDK_SUFFIX="/Contents/Home"
24227  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24228  if test "x$ALL_JDKS_FOUND" != x; then
24229    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24230
24231  if test "x$BOOT_JDK_FOUND" = xno; then
24232    # Now execute the test
24233
24234        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24235        if test -d "$BOOT_JDK"; then
24236          BOOT_JDK_FOUND=maybe
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24238$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24239        fi
24240
24241
24242    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24243    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24244      # Do we have a bin/java?
24245      if test ! -x "$BOOT_JDK/bin/java"; then
24246        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24248        BOOT_JDK_FOUND=no
24249      else
24250        # Do we have a bin/javac?
24251        if test ! -x "$BOOT_JDK/bin/javac"; then
24252          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24254          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24255$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24256          BOOT_JDK_FOUND=no
24257        else
24258          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24259          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24260
24261          # Extra M4 quote needed to protect [] in grep expression.
24262          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24263          if test "x$FOUND_CORRECT_VERSION" = x; then
24264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24266            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24267$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24268            BOOT_JDK_FOUND=no
24269          else
24270            # We're done! :-)
24271            BOOT_JDK_FOUND=yes
24272
24273  # Only process if variable expands to non-empty
24274
24275  if test "x$BOOT_JDK" != x; then
24276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24277
24278  # Input might be given as Windows format, start by converting to
24279  # unix format.
24280  path="$BOOT_JDK"
24281  new_path=`$CYGPATH -u "$path"`
24282
24283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24286  # "foo.exe" is OK but "foo" is an error.
24287  #
24288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24289  # It is also a way to make sure we got the proper file name for the real test later on.
24290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24291  if test "x$test_shortpath" = x; then
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24295  fi
24296
24297  # Call helper function which possibly converts this using DOS-style short mode.
24298  # If so, the updated path is stored in $new_path.
24299
24300  input_path="$new_path"
24301  # Check if we need to convert this using DOS-style short mode. If the path
24302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24303  # take no chances and rewrite it.
24304  # Note: m4 eats our [], so we need to use [ and ] instead.
24305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24306  if test "x$has_forbidden_chars" != x; then
24307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24311      # Going to short mode and back again did indeed matter. Since short mode is
24312      # case insensitive, let's make it lowercase to improve readability.
24313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24314      # Now convert it back to Unix-style (cygpath)
24315      input_path=`$CYGPATH -u "$shortmode_path"`
24316      new_path="$input_path"
24317    fi
24318  fi
24319
24320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24321  if test "x$test_cygdrive_prefix" = x; then
24322    # As a simple fix, exclude /usr/bin since it's not a real path.
24323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24325      # a path prefixed by /cygdrive for fixpath to work.
24326      new_path="$CYGWIN_ROOT_PATH$input_path"
24327    fi
24328  fi
24329
24330
24331  if test "x$path" != "x$new_path"; then
24332    BOOT_JDK="$new_path"
24333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24335  fi
24336
24337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24338
24339  path="$BOOT_JDK"
24340  has_colon=`$ECHO $path | $GREP ^.:`
24341  new_path="$path"
24342  if test "x$has_colon" = x; then
24343    # Not in mixed or Windows style, start by that.
24344    new_path=`cmd //c echo $path`
24345  fi
24346
24347
24348  input_path="$new_path"
24349  # Check if we need to convert this using DOS-style short mode. If the path
24350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24351  # take no chances and rewrite it.
24352  # Note: m4 eats our [], so we need to use [ and ] instead.
24353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24354  if test "x$has_forbidden_chars" != x; then
24355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24357  fi
24358
24359
24360  windows_path="$new_path"
24361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24362    unix_path=`$CYGPATH -u "$windows_path"`
24363    new_path="$unix_path"
24364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24366    new_path="$unix_path"
24367  fi
24368
24369  if test "x$path" != "x$new_path"; then
24370    BOOT_JDK="$new_path"
24371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24373  fi
24374
24375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24377
24378    else
24379      # We're on a unix platform. Hooray! :)
24380      path="$BOOT_JDK"
24381      has_space=`$ECHO "$path" | $GREP " "`
24382      if test "x$has_space" != x; then
24383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24386      fi
24387
24388      # Use eval to expand a potential ~
24389      eval path="$path"
24390      if test ! -f "$path" && test ! -d "$path"; then
24391        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24392      fi
24393
24394      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24395    fi
24396  fi
24397
24398            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24399$as_echo_n "checking for Boot JDK... " >&6; }
24400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24401$as_echo "$BOOT_JDK" >&6; }
24402            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24403$as_echo_n "checking Boot JDK version... " >&6; }
24404            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24406$as_echo "$BOOT_JDK_VERSION" >&6; }
24407          fi # end check jdk version
24408        fi # end check javac
24409      fi # end check java
24410    fi # end check boot jdk found
24411  fi
24412
24413    done
24414  fi
24415
24416
24417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24419      # Do we have a bin/java?
24420      if test ! -x "$BOOT_JDK/bin/java"; then
24421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24423        BOOT_JDK_FOUND=no
24424      else
24425        # Do we have a bin/javac?
24426        if test ! -x "$BOOT_JDK/bin/javac"; then
24427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24431          BOOT_JDK_FOUND=no
24432        else
24433          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24434          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24435
24436          # Extra M4 quote needed to protect [] in grep expression.
24437          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24438          if test "x$FOUND_CORRECT_VERSION" = x; then
24439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24441            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24442$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24443            BOOT_JDK_FOUND=no
24444          else
24445            # We're done! :-)
24446            BOOT_JDK_FOUND=yes
24447
24448  # Only process if variable expands to non-empty
24449
24450  if test "x$BOOT_JDK" != x; then
24451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24452
24453  # Input might be given as Windows format, start by converting to
24454  # unix format.
24455  path="$BOOT_JDK"
24456  new_path=`$CYGPATH -u "$path"`
24457
24458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24461  # "foo.exe" is OK but "foo" is an error.
24462  #
24463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24464  # It is also a way to make sure we got the proper file name for the real test later on.
24465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24466  if test "x$test_shortpath" = x; then
24467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24469    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24470  fi
24471
24472  # Call helper function which possibly converts this using DOS-style short mode.
24473  # If so, the updated path is stored in $new_path.
24474
24475  input_path="$new_path"
24476  # Check if we need to convert this using DOS-style short mode. If the path
24477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24478  # take no chances and rewrite it.
24479  # Note: m4 eats our [], so we need to use [ and ] instead.
24480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24481  if test "x$has_forbidden_chars" != x; then
24482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24486      # Going to short mode and back again did indeed matter. Since short mode is
24487      # case insensitive, let's make it lowercase to improve readability.
24488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24489      # Now convert it back to Unix-style (cygpath)
24490      input_path=`$CYGPATH -u "$shortmode_path"`
24491      new_path="$input_path"
24492    fi
24493  fi
24494
24495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24496  if test "x$test_cygdrive_prefix" = x; then
24497    # As a simple fix, exclude /usr/bin since it's not a real path.
24498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24500      # a path prefixed by /cygdrive for fixpath to work.
24501      new_path="$CYGWIN_ROOT_PATH$input_path"
24502    fi
24503  fi
24504
24505
24506  if test "x$path" != "x$new_path"; then
24507    BOOT_JDK="$new_path"
24508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24510  fi
24511
24512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24513
24514  path="$BOOT_JDK"
24515  has_colon=`$ECHO $path | $GREP ^.:`
24516  new_path="$path"
24517  if test "x$has_colon" = x; then
24518    # Not in mixed or Windows style, start by that.
24519    new_path=`cmd //c echo $path`
24520  fi
24521
24522
24523  input_path="$new_path"
24524  # Check if we need to convert this using DOS-style short mode. If the path
24525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24526  # take no chances and rewrite it.
24527  # Note: m4 eats our [], so we need to use [ and ] instead.
24528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24529  if test "x$has_forbidden_chars" != x; then
24530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24532  fi
24533
24534
24535  windows_path="$new_path"
24536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24537    unix_path=`$CYGPATH -u "$windows_path"`
24538    new_path="$unix_path"
24539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24541    new_path="$unix_path"
24542  fi
24543
24544  if test "x$path" != "x$new_path"; then
24545    BOOT_JDK="$new_path"
24546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24548  fi
24549
24550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24552
24553    else
24554      # We're on a unix platform. Hooray! :)
24555      path="$BOOT_JDK"
24556      has_space=`$ECHO "$path" | $GREP " "`
24557      if test "x$has_space" != x; then
24558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24561      fi
24562
24563      # Use eval to expand a potential ~
24564      eval path="$path"
24565      if test ! -f "$path" && test ! -d "$path"; then
24566        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24567      fi
24568
24569      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24570    fi
24571  fi
24572
24573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24574$as_echo_n "checking for Boot JDK... " >&6; }
24575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24576$as_echo "$BOOT_JDK" >&6; }
24577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24578$as_echo_n "checking Boot JDK version... " >&6; }
24579            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24581$as_echo "$BOOT_JDK_VERSION" >&6; }
24582          fi # end check jdk version
24583        fi # end check javac
24584      fi # end check java
24585    fi # end check boot jdk found
24586  fi
24587
24588
24589  if test "x$BOOT_JDK_FOUND" = xno; then
24590    # Now execute the test
24591
24592  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24593  BOOT_JDK_SUFFIX="/Contents/Home"
24594  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24595  if test "x$ALL_JDKS_FOUND" != x; then
24596    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24597
24598  if test "x$BOOT_JDK_FOUND" = xno; then
24599    # Now execute the test
24600
24601        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24602        if test -d "$BOOT_JDK"; then
24603          BOOT_JDK_FOUND=maybe
24604          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24605$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24606        fi
24607
24608
24609    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24610    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24611      # Do we have a bin/java?
24612      if test ! -x "$BOOT_JDK/bin/java"; then
24613        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24615        BOOT_JDK_FOUND=no
24616      else
24617        # Do we have a bin/javac?
24618        if test ! -x "$BOOT_JDK/bin/javac"; then
24619          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24621          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24622$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24623          BOOT_JDK_FOUND=no
24624        else
24625          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24626          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24627
24628          # Extra M4 quote needed to protect [] in grep expression.
24629          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24630          if test "x$FOUND_CORRECT_VERSION" = x; then
24631            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24633            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24634$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24635            BOOT_JDK_FOUND=no
24636          else
24637            # We're done! :-)
24638            BOOT_JDK_FOUND=yes
24639
24640  # Only process if variable expands to non-empty
24641
24642  if test "x$BOOT_JDK" != x; then
24643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24644
24645  # Input might be given as Windows format, start by converting to
24646  # unix format.
24647  path="$BOOT_JDK"
24648  new_path=`$CYGPATH -u "$path"`
24649
24650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24653  # "foo.exe" is OK but "foo" is an error.
24654  #
24655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24656  # It is also a way to make sure we got the proper file name for the real test later on.
24657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24658  if test "x$test_shortpath" = x; then
24659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24661    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24662  fi
24663
24664  # Call helper function which possibly converts this using DOS-style short mode.
24665  # If so, the updated path is stored in $new_path.
24666
24667  input_path="$new_path"
24668  # Check if we need to convert this using DOS-style short mode. If the path
24669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24670  # take no chances and rewrite it.
24671  # Note: m4 eats our [], so we need to use [ and ] instead.
24672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24673  if test "x$has_forbidden_chars" != x; then
24674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24678      # Going to short mode and back again did indeed matter. Since short mode is
24679      # case insensitive, let's make it lowercase to improve readability.
24680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24681      # Now convert it back to Unix-style (cygpath)
24682      input_path=`$CYGPATH -u "$shortmode_path"`
24683      new_path="$input_path"
24684    fi
24685  fi
24686
24687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24688  if test "x$test_cygdrive_prefix" = x; then
24689    # As a simple fix, exclude /usr/bin since it's not a real path.
24690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24692      # a path prefixed by /cygdrive for fixpath to work.
24693      new_path="$CYGWIN_ROOT_PATH$input_path"
24694    fi
24695  fi
24696
24697
24698  if test "x$path" != "x$new_path"; then
24699    BOOT_JDK="$new_path"
24700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24702  fi
24703
24704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24705
24706  path="$BOOT_JDK"
24707  has_colon=`$ECHO $path | $GREP ^.:`
24708  new_path="$path"
24709  if test "x$has_colon" = x; then
24710    # Not in mixed or Windows style, start by that.
24711    new_path=`cmd //c echo $path`
24712  fi
24713
24714
24715  input_path="$new_path"
24716  # Check if we need to convert this using DOS-style short mode. If the path
24717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24718  # take no chances and rewrite it.
24719  # Note: m4 eats our [], so we need to use [ and ] instead.
24720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24721  if test "x$has_forbidden_chars" != x; then
24722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24724  fi
24725
24726
24727  windows_path="$new_path"
24728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24729    unix_path=`$CYGPATH -u "$windows_path"`
24730    new_path="$unix_path"
24731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24733    new_path="$unix_path"
24734  fi
24735
24736  if test "x$path" != "x$new_path"; then
24737    BOOT_JDK="$new_path"
24738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24740  fi
24741
24742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24744
24745    else
24746      # We're on a unix platform. Hooray! :)
24747      path="$BOOT_JDK"
24748      has_space=`$ECHO "$path" | $GREP " "`
24749      if test "x$has_space" != x; then
24750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24752        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24753      fi
24754
24755      # Use eval to expand a potential ~
24756      eval path="$path"
24757      if test ! -f "$path" && test ! -d "$path"; then
24758        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24759      fi
24760
24761      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24762    fi
24763  fi
24764
24765            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24766$as_echo_n "checking for Boot JDK... " >&6; }
24767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24768$as_echo "$BOOT_JDK" >&6; }
24769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24770$as_echo_n "checking Boot JDK version... " >&6; }
24771            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24773$as_echo "$BOOT_JDK_VERSION" >&6; }
24774          fi # end check jdk version
24775        fi # end check javac
24776      fi # end check java
24777    fi # end check boot jdk found
24778  fi
24779
24780    done
24781  fi
24782
24783
24784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24786      # Do we have a bin/java?
24787      if test ! -x "$BOOT_JDK/bin/java"; then
24788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24790        BOOT_JDK_FOUND=no
24791      else
24792        # Do we have a bin/javac?
24793        if test ! -x "$BOOT_JDK/bin/javac"; then
24794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24798          BOOT_JDK_FOUND=no
24799        else
24800          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24801          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24802
24803          # Extra M4 quote needed to protect [] in grep expression.
24804          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24805          if test "x$FOUND_CORRECT_VERSION" = x; then
24806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24808            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24810            BOOT_JDK_FOUND=no
24811          else
24812            # We're done! :-)
24813            BOOT_JDK_FOUND=yes
24814
24815  # Only process if variable expands to non-empty
24816
24817  if test "x$BOOT_JDK" != x; then
24818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24819
24820  # Input might be given as Windows format, start by converting to
24821  # unix format.
24822  path="$BOOT_JDK"
24823  new_path=`$CYGPATH -u "$path"`
24824
24825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24828  # "foo.exe" is OK but "foo" is an error.
24829  #
24830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24831  # It is also a way to make sure we got the proper file name for the real test later on.
24832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24833  if test "x$test_shortpath" = x; then
24834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24837  fi
24838
24839  # Call helper function which possibly converts this using DOS-style short mode.
24840  # If so, the updated path is stored in $new_path.
24841
24842  input_path="$new_path"
24843  # Check if we need to convert this using DOS-style short mode. If the path
24844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24845  # take no chances and rewrite it.
24846  # Note: m4 eats our [], so we need to use [ and ] instead.
24847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24848  if test "x$has_forbidden_chars" != x; then
24849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24853      # Going to short mode and back again did indeed matter. Since short mode is
24854      # case insensitive, let's make it lowercase to improve readability.
24855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24856      # Now convert it back to Unix-style (cygpath)
24857      input_path=`$CYGPATH -u "$shortmode_path"`
24858      new_path="$input_path"
24859    fi
24860  fi
24861
24862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24863  if test "x$test_cygdrive_prefix" = x; then
24864    # As a simple fix, exclude /usr/bin since it's not a real path.
24865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24867      # a path prefixed by /cygdrive for fixpath to work.
24868      new_path="$CYGWIN_ROOT_PATH$input_path"
24869    fi
24870  fi
24871
24872
24873  if test "x$path" != "x$new_path"; then
24874    BOOT_JDK="$new_path"
24875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24877  fi
24878
24879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24880
24881  path="$BOOT_JDK"
24882  has_colon=`$ECHO $path | $GREP ^.:`
24883  new_path="$path"
24884  if test "x$has_colon" = x; then
24885    # Not in mixed or Windows style, start by that.
24886    new_path=`cmd //c echo $path`
24887  fi
24888
24889
24890  input_path="$new_path"
24891  # Check if we need to convert this using DOS-style short mode. If the path
24892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24893  # take no chances and rewrite it.
24894  # Note: m4 eats our [], so we need to use [ and ] instead.
24895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24896  if test "x$has_forbidden_chars" != x; then
24897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24899  fi
24900
24901
24902  windows_path="$new_path"
24903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24904    unix_path=`$CYGPATH -u "$windows_path"`
24905    new_path="$unix_path"
24906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24908    new_path="$unix_path"
24909  fi
24910
24911  if test "x$path" != "x$new_path"; then
24912    BOOT_JDK="$new_path"
24913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24915  fi
24916
24917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24919
24920    else
24921      # We're on a unix platform. Hooray! :)
24922      path="$BOOT_JDK"
24923      has_space=`$ECHO "$path" | $GREP " "`
24924      if test "x$has_space" != x; then
24925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24928      fi
24929
24930      # Use eval to expand a potential ~
24931      eval path="$path"
24932      if test ! -f "$path" && test ! -d "$path"; then
24933        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24934      fi
24935
24936      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24937    fi
24938  fi
24939
24940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24941$as_echo_n "checking for Boot JDK... " >&6; }
24942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24943$as_echo "$BOOT_JDK" >&6; }
24944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24945$as_echo_n "checking Boot JDK version... " >&6; }
24946            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24948$as_echo "$BOOT_JDK_VERSION" >&6; }
24949          fi # end check jdk version
24950        fi # end check javac
24951      fi # end check java
24952    fi # end check boot jdk found
24953  fi
24954
24955  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24956
24957  if test "x$BOOT_JDK_FOUND" = xno; then
24958    # Now execute the test
24959
24960  BOOT_JDK_PREFIX="/usr/lib/jvm"
24961  BOOT_JDK_SUFFIX=""
24962  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24963  if test "x$ALL_JDKS_FOUND" != x; then
24964    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24965
24966  if test "x$BOOT_JDK_FOUND" = xno; then
24967    # Now execute the test
24968
24969        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24970        if test -d "$BOOT_JDK"; then
24971          BOOT_JDK_FOUND=maybe
24972          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24973$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24974        fi
24975
24976
24977    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24978    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24979      # Do we have a bin/java?
24980      if test ! -x "$BOOT_JDK/bin/java"; then
24981        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24983        BOOT_JDK_FOUND=no
24984      else
24985        # Do we have a bin/javac?
24986        if test ! -x "$BOOT_JDK/bin/javac"; then
24987          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24989          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24990$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24991          BOOT_JDK_FOUND=no
24992        else
24993          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24994          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24995
24996          # Extra M4 quote needed to protect [] in grep expression.
24997          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24998          if test "x$FOUND_CORRECT_VERSION" = x; then
24999            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25001            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25002$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25003            BOOT_JDK_FOUND=no
25004          else
25005            # We're done! :-)
25006            BOOT_JDK_FOUND=yes
25007
25008  # Only process if variable expands to non-empty
25009
25010  if test "x$BOOT_JDK" != x; then
25011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25012
25013  # Input might be given as Windows format, start by converting to
25014  # unix format.
25015  path="$BOOT_JDK"
25016  new_path=`$CYGPATH -u "$path"`
25017
25018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25021  # "foo.exe" is OK but "foo" is an error.
25022  #
25023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25024  # It is also a way to make sure we got the proper file name for the real test later on.
25025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25026  if test "x$test_shortpath" = x; then
25027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25029    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25030  fi
25031
25032  # Call helper function which possibly converts this using DOS-style short mode.
25033  # If so, the updated path is stored in $new_path.
25034
25035  input_path="$new_path"
25036  # Check if we need to convert this using DOS-style short mode. If the path
25037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25038  # take no chances and rewrite it.
25039  # Note: m4 eats our [], so we need to use [ and ] instead.
25040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25041  if test "x$has_forbidden_chars" != x; then
25042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25046      # Going to short mode and back again did indeed matter. Since short mode is
25047      # case insensitive, let's make it lowercase to improve readability.
25048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25049      # Now convert it back to Unix-style (cygpath)
25050      input_path=`$CYGPATH -u "$shortmode_path"`
25051      new_path="$input_path"
25052    fi
25053  fi
25054
25055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25056  if test "x$test_cygdrive_prefix" = x; then
25057    # As a simple fix, exclude /usr/bin since it's not a real path.
25058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25060      # a path prefixed by /cygdrive for fixpath to work.
25061      new_path="$CYGWIN_ROOT_PATH$input_path"
25062    fi
25063  fi
25064
25065
25066  if test "x$path" != "x$new_path"; then
25067    BOOT_JDK="$new_path"
25068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25070  fi
25071
25072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25073
25074  path="$BOOT_JDK"
25075  has_colon=`$ECHO $path | $GREP ^.:`
25076  new_path="$path"
25077  if test "x$has_colon" = x; then
25078    # Not in mixed or Windows style, start by that.
25079    new_path=`cmd //c echo $path`
25080  fi
25081
25082
25083  input_path="$new_path"
25084  # Check if we need to convert this using DOS-style short mode. If the path
25085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25086  # take no chances and rewrite it.
25087  # Note: m4 eats our [], so we need to use [ and ] instead.
25088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25089  if test "x$has_forbidden_chars" != x; then
25090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25092  fi
25093
25094
25095  windows_path="$new_path"
25096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25097    unix_path=`$CYGPATH -u "$windows_path"`
25098    new_path="$unix_path"
25099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25101    new_path="$unix_path"
25102  fi
25103
25104  if test "x$path" != "x$new_path"; then
25105    BOOT_JDK="$new_path"
25106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25108  fi
25109
25110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25112
25113    else
25114      # We're on a unix platform. Hooray! :)
25115      path="$BOOT_JDK"
25116      has_space=`$ECHO "$path" | $GREP " "`
25117      if test "x$has_space" != x; then
25118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25121      fi
25122
25123      # Use eval to expand a potential ~
25124      eval path="$path"
25125      if test ! -f "$path" && test ! -d "$path"; then
25126        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25127      fi
25128
25129      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25130    fi
25131  fi
25132
25133            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25134$as_echo_n "checking for Boot JDK... " >&6; }
25135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25136$as_echo "$BOOT_JDK" >&6; }
25137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25138$as_echo_n "checking Boot JDK version... " >&6; }
25139            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25141$as_echo "$BOOT_JDK_VERSION" >&6; }
25142          fi # end check jdk version
25143        fi # end check javac
25144      fi # end check java
25145    fi # end check boot jdk found
25146  fi
25147
25148    done
25149  fi
25150
25151
25152    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25153    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25154      # Do we have a bin/java?
25155      if test ! -x "$BOOT_JDK/bin/java"; then
25156        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25158        BOOT_JDK_FOUND=no
25159      else
25160        # Do we have a bin/javac?
25161        if test ! -x "$BOOT_JDK/bin/javac"; then
25162          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25164          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25165$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25166          BOOT_JDK_FOUND=no
25167        else
25168          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25169          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25170
25171          # Extra M4 quote needed to protect [] in grep expression.
25172          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25173          if test "x$FOUND_CORRECT_VERSION" = x; then
25174            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25176            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25177$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25178            BOOT_JDK_FOUND=no
25179          else
25180            # We're done! :-)
25181            BOOT_JDK_FOUND=yes
25182
25183  # Only process if variable expands to non-empty
25184
25185  if test "x$BOOT_JDK" != x; then
25186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25187
25188  # Input might be given as Windows format, start by converting to
25189  # unix format.
25190  path="$BOOT_JDK"
25191  new_path=`$CYGPATH -u "$path"`
25192
25193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25196  # "foo.exe" is OK but "foo" is an error.
25197  #
25198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25199  # It is also a way to make sure we got the proper file name for the real test later on.
25200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25201  if test "x$test_shortpath" = x; then
25202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25204    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25205  fi
25206
25207  # Call helper function which possibly converts this using DOS-style short mode.
25208  # If so, the updated path is stored in $new_path.
25209
25210  input_path="$new_path"
25211  # Check if we need to convert this using DOS-style short mode. If the path
25212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25213  # take no chances and rewrite it.
25214  # Note: m4 eats our [], so we need to use [ and ] instead.
25215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25216  if test "x$has_forbidden_chars" != x; then
25217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25221      # Going to short mode and back again did indeed matter. Since short mode is
25222      # case insensitive, let's make it lowercase to improve readability.
25223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25224      # Now convert it back to Unix-style (cygpath)
25225      input_path=`$CYGPATH -u "$shortmode_path"`
25226      new_path="$input_path"
25227    fi
25228  fi
25229
25230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25231  if test "x$test_cygdrive_prefix" = x; then
25232    # As a simple fix, exclude /usr/bin since it's not a real path.
25233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25235      # a path prefixed by /cygdrive for fixpath to work.
25236      new_path="$CYGWIN_ROOT_PATH$input_path"
25237    fi
25238  fi
25239
25240
25241  if test "x$path" != "x$new_path"; then
25242    BOOT_JDK="$new_path"
25243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25245  fi
25246
25247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25248
25249  path="$BOOT_JDK"
25250  has_colon=`$ECHO $path | $GREP ^.:`
25251  new_path="$path"
25252  if test "x$has_colon" = x; then
25253    # Not in mixed or Windows style, start by that.
25254    new_path=`cmd //c echo $path`
25255  fi
25256
25257
25258  input_path="$new_path"
25259  # Check if we need to convert this using DOS-style short mode. If the path
25260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25261  # take no chances and rewrite it.
25262  # Note: m4 eats our [], so we need to use [ and ] instead.
25263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25264  if test "x$has_forbidden_chars" != x; then
25265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25267  fi
25268
25269
25270  windows_path="$new_path"
25271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25272    unix_path=`$CYGPATH -u "$windows_path"`
25273    new_path="$unix_path"
25274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25276    new_path="$unix_path"
25277  fi
25278
25279  if test "x$path" != "x$new_path"; then
25280    BOOT_JDK="$new_path"
25281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25283  fi
25284
25285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25287
25288    else
25289      # We're on a unix platform. Hooray! :)
25290      path="$BOOT_JDK"
25291      has_space=`$ECHO "$path" | $GREP " "`
25292      if test "x$has_space" != x; then
25293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25296      fi
25297
25298      # Use eval to expand a potential ~
25299      eval path="$path"
25300      if test ! -f "$path" && test ! -d "$path"; then
25301        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25302      fi
25303
25304      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25305    fi
25306  fi
25307
25308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25309$as_echo_n "checking for Boot JDK... " >&6; }
25310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25311$as_echo "$BOOT_JDK" >&6; }
25312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25313$as_echo_n "checking Boot JDK version... " >&6; }
25314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25316$as_echo "$BOOT_JDK_VERSION" >&6; }
25317          fi # end check jdk version
25318        fi # end check javac
25319      fi # end check java
25320    fi # end check boot jdk found
25321  fi
25322
25323  fi
25324
25325
25326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25328      # Do we have a bin/java?
25329      if test ! -x "$BOOT_JDK/bin/java"; then
25330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25332        BOOT_JDK_FOUND=no
25333      else
25334        # Do we have a bin/javac?
25335        if test ! -x "$BOOT_JDK/bin/javac"; then
25336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25340          BOOT_JDK_FOUND=no
25341        else
25342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25344
25345          # Extra M4 quote needed to protect [] in grep expression.
25346          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25347          if test "x$FOUND_CORRECT_VERSION" = x; then
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25352            BOOT_JDK_FOUND=no
25353          else
25354            # We're done! :-)
25355            BOOT_JDK_FOUND=yes
25356
25357  # Only process if variable expands to non-empty
25358
25359  if test "x$BOOT_JDK" != x; then
25360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25361
25362  # Input might be given as Windows format, start by converting to
25363  # unix format.
25364  path="$BOOT_JDK"
25365  new_path=`$CYGPATH -u "$path"`
25366
25367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25370  # "foo.exe" is OK but "foo" is an error.
25371  #
25372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25373  # It is also a way to make sure we got the proper file name for the real test later on.
25374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25375  if test "x$test_shortpath" = x; then
25376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25379  fi
25380
25381  # Call helper function which possibly converts this using DOS-style short mode.
25382  # If so, the updated path is stored in $new_path.
25383
25384  input_path="$new_path"
25385  # Check if we need to convert this using DOS-style short mode. If the path
25386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25387  # take no chances and rewrite it.
25388  # Note: m4 eats our [], so we need to use [ and ] instead.
25389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25390  if test "x$has_forbidden_chars" != x; then
25391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25395      # Going to short mode and back again did indeed matter. Since short mode is
25396      # case insensitive, let's make it lowercase to improve readability.
25397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25398      # Now convert it back to Unix-style (cygpath)
25399      input_path=`$CYGPATH -u "$shortmode_path"`
25400      new_path="$input_path"
25401    fi
25402  fi
25403
25404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25405  if test "x$test_cygdrive_prefix" = x; then
25406    # As a simple fix, exclude /usr/bin since it's not a real path.
25407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25409      # a path prefixed by /cygdrive for fixpath to work.
25410      new_path="$CYGWIN_ROOT_PATH$input_path"
25411    fi
25412  fi
25413
25414
25415  if test "x$path" != "x$new_path"; then
25416    BOOT_JDK="$new_path"
25417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25419  fi
25420
25421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25422
25423  path="$BOOT_JDK"
25424  has_colon=`$ECHO $path | $GREP ^.:`
25425  new_path="$path"
25426  if test "x$has_colon" = x; then
25427    # Not in mixed or Windows style, start by that.
25428    new_path=`cmd //c echo $path`
25429  fi
25430
25431
25432  input_path="$new_path"
25433  # Check if we need to convert this using DOS-style short mode. If the path
25434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25435  # take no chances and rewrite it.
25436  # Note: m4 eats our [], so we need to use [ and ] instead.
25437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25438  if test "x$has_forbidden_chars" != x; then
25439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25441  fi
25442
25443
25444  windows_path="$new_path"
25445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25446    unix_path=`$CYGPATH -u "$windows_path"`
25447    new_path="$unix_path"
25448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25450    new_path="$unix_path"
25451  fi
25452
25453  if test "x$path" != "x$new_path"; then
25454    BOOT_JDK="$new_path"
25455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25457  fi
25458
25459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25461
25462    else
25463      # We're on a unix platform. Hooray! :)
25464      path="$BOOT_JDK"
25465      has_space=`$ECHO "$path" | $GREP " "`
25466      if test "x$has_space" != x; then
25467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25470      fi
25471
25472      # Use eval to expand a potential ~
25473      eval path="$path"
25474      if test ! -f "$path" && test ! -d "$path"; then
25475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25476      fi
25477
25478      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25479    fi
25480  fi
25481
25482            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25483$as_echo_n "checking for Boot JDK... " >&6; }
25484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25485$as_echo "$BOOT_JDK" >&6; }
25486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25487$as_echo_n "checking Boot JDK version... " >&6; }
25488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25490$as_echo "$BOOT_JDK_VERSION" >&6; }
25491          fi # end check jdk version
25492        fi # end check javac
25493      fi # end check java
25494    fi # end check boot jdk found
25495  fi
25496
25497
25498  # If we haven't found anything yet, we've truly lost. Give up.
25499  if test "x$BOOT_JDK_FOUND" = xno; then
25500
25501  # Print a helpful message on how to acquire the necessary build dependency.
25502  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25503  MISSING_DEPENDENCY=openjdk
25504
25505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25506    cygwin_help $MISSING_DEPENDENCY
25507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25508    msys_help $MISSING_DEPENDENCY
25509  else
25510    PKGHANDLER_COMMAND=
25511
25512    case $PKGHANDLER in
25513      apt-get)
25514        apt_help     $MISSING_DEPENDENCY ;;
25515      yum)
25516        yum_help     $MISSING_DEPENDENCY ;;
25517      port)
25518        port_help    $MISSING_DEPENDENCY ;;
25519      pkgutil)
25520        pkgutil_help $MISSING_DEPENDENCY ;;
25521      pkgadd)
25522        pkgadd_help  $MISSING_DEPENDENCY ;;
25523    esac
25524
25525    if test "x$PKGHANDLER_COMMAND" != x; then
25526      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25527    fi
25528  fi
25529
25530    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25531$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25532    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25533$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25534    as_fn_error $? "Cannot continue" "$LINENO" 5
25535  fi
25536
25537
25538
25539  # Setup tools from the Boot JDK.
25540
25541  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25542
25543  # Publish this variable in the help.
25544
25545
25546  if test "x$JAVA" = x; then
25547    # The variable is not set by user, try to locate tool using the code snippet
25548
25549      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25550$as_echo_n "checking for java in Boot JDK... " >&6; }
25551      JAVA=$BOOT_JDK/bin/java
25552      if test ! -x $JAVA; then
25553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25554$as_echo "not found" >&6; }
25555        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25556$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25557        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25558      fi
25559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25560$as_echo "ok" >&6; }
25561
25562
25563  else
25564    # The variable is set, but is it from the command line or the environment?
25565
25566    # Try to remove the string !JAVA! from our list.
25567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25569      # If it failed, the variable was not from the command line. Ignore it,
25570      # but warn the user (except for BASH, which is always set by the calling BASH).
25571      if test "xJAVA" != xBASH; then
25572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25573$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25574      fi
25575      # Try to locate tool using the code snippet
25576
25577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25578$as_echo_n "checking for java in Boot JDK... " >&6; }
25579      JAVA=$BOOT_JDK/bin/java
25580      if test ! -x $JAVA; then
25581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25582$as_echo "not found" >&6; }
25583        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25584$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25585        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25586      fi
25587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25588$as_echo "ok" >&6; }
25589
25590
25591    else
25592      # If it succeeded, then it was overridden by the user. We will use it
25593      # for the tool.
25594
25595      # First remove it from the list of overridden variables, so we can test
25596      # for unknown variables in the end.
25597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25598
25599      # Check if the provided tool contains a complete path.
25600      tool_specified="$JAVA"
25601      tool_basename="${tool_specified##*/}"
25602      if test "x$tool_basename" = "x$tool_specified"; then
25603        # A command without a complete path is provided, search $PATH.
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25605$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25606        # Extract the first word of "$tool_basename", so it can be a program name with args.
25607set dummy $tool_basename; ac_word=$2
25608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25609$as_echo_n "checking for $ac_word... " >&6; }
25610if ${ac_cv_path_JAVA+:} false; then :
25611  $as_echo_n "(cached) " >&6
25612else
25613  case $JAVA in
25614  [\\/]* | ?:[\\/]*)
25615  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25616  ;;
25617  *)
25618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25619for as_dir in $PATH
25620do
25621  IFS=$as_save_IFS
25622  test -z "$as_dir" && as_dir=.
25623    for ac_exec_ext in '' $ac_executable_extensions; do
25624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25625    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25627    break 2
25628  fi
25629done
25630  done
25631IFS=$as_save_IFS
25632
25633  ;;
25634esac
25635fi
25636JAVA=$ac_cv_path_JAVA
25637if test -n "$JAVA"; then
25638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25639$as_echo "$JAVA" >&6; }
25640else
25641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25642$as_echo "no" >&6; }
25643fi
25644
25645
25646        if test "x$JAVA" = x; then
25647          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25648        fi
25649      else
25650        # Otherwise we believe it is a complete path. Use it as it is.
25651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25652$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25654$as_echo_n "checking for JAVA... " >&6; }
25655        if test ! -x "$tool_specified"; then
25656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25657$as_echo "not found" >&6; }
25658          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25659        fi
25660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25661$as_echo "$tool_specified" >&6; }
25662      fi
25663    fi
25664  fi
25665
25666
25667
25668  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25669
25670  # Publish this variable in the help.
25671
25672
25673  if test "x$JAVAC" = x; then
25674    # The variable is not set by user, try to locate tool using the code snippet
25675
25676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25677$as_echo_n "checking for javac in Boot JDK... " >&6; }
25678      JAVAC=$BOOT_JDK/bin/javac
25679      if test ! -x $JAVAC; then
25680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25681$as_echo "not found" >&6; }
25682        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25683$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25684        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25685      fi
25686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25687$as_echo "ok" >&6; }
25688
25689
25690  else
25691    # The variable is set, but is it from the command line or the environment?
25692
25693    # Try to remove the string !JAVAC! from our list.
25694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25696      # If it failed, the variable was not from the command line. Ignore it,
25697      # but warn the user (except for BASH, which is always set by the calling BASH).
25698      if test "xJAVAC" != xBASH; then
25699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25700$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25701      fi
25702      # Try to locate tool using the code snippet
25703
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25705$as_echo_n "checking for javac in Boot JDK... " >&6; }
25706      JAVAC=$BOOT_JDK/bin/javac
25707      if test ! -x $JAVAC; then
25708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25709$as_echo "not found" >&6; }
25710        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25711$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25712        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25713      fi
25714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25715$as_echo "ok" >&6; }
25716
25717
25718    else
25719      # If it succeeded, then it was overridden by the user. We will use it
25720      # for the tool.
25721
25722      # First remove it from the list of overridden variables, so we can test
25723      # for unknown variables in the end.
25724      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25725
25726      # Check if the provided tool contains a complete path.
25727      tool_specified="$JAVAC"
25728      tool_basename="${tool_specified##*/}"
25729      if test "x$tool_basename" = "x$tool_specified"; then
25730        # A command without a complete path is provided, search $PATH.
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25732$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25733        # Extract the first word of "$tool_basename", so it can be a program name with args.
25734set dummy $tool_basename; ac_word=$2
25735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25736$as_echo_n "checking for $ac_word... " >&6; }
25737if ${ac_cv_path_JAVAC+:} false; then :
25738  $as_echo_n "(cached) " >&6
25739else
25740  case $JAVAC in
25741  [\\/]* | ?:[\\/]*)
25742  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25743  ;;
25744  *)
25745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25746for as_dir in $PATH
25747do
25748  IFS=$as_save_IFS
25749  test -z "$as_dir" && as_dir=.
25750    for ac_exec_ext in '' $ac_executable_extensions; do
25751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25752    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25754    break 2
25755  fi
25756done
25757  done
25758IFS=$as_save_IFS
25759
25760  ;;
25761esac
25762fi
25763JAVAC=$ac_cv_path_JAVAC
25764if test -n "$JAVAC"; then
25765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25766$as_echo "$JAVAC" >&6; }
25767else
25768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25769$as_echo "no" >&6; }
25770fi
25771
25772
25773        if test "x$JAVAC" = x; then
25774          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25775        fi
25776      else
25777        # Otherwise we believe it is a complete path. Use it as it is.
25778        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25779$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25781$as_echo_n "checking for JAVAC... " >&6; }
25782        if test ! -x "$tool_specified"; then
25783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25784$as_echo "not found" >&6; }
25785          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25786        fi
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25788$as_echo "$tool_specified" >&6; }
25789      fi
25790    fi
25791  fi
25792
25793
25794
25795  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25796
25797  # Publish this variable in the help.
25798
25799
25800  if test "x$JAVAH" = x; then
25801    # The variable is not set by user, try to locate tool using the code snippet
25802
25803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25804$as_echo_n "checking for javah in Boot JDK... " >&6; }
25805      JAVAH=$BOOT_JDK/bin/javah
25806      if test ! -x $JAVAH; then
25807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25808$as_echo "not found" >&6; }
25809        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25810$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25811        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25812      fi
25813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25814$as_echo "ok" >&6; }
25815
25816
25817  else
25818    # The variable is set, but is it from the command line or the environment?
25819
25820    # Try to remove the string !JAVAH! from our list.
25821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25823      # If it failed, the variable was not from the command line. Ignore it,
25824      # but warn the user (except for BASH, which is always set by the calling BASH).
25825      if test "xJAVAH" != xBASH; then
25826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25827$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25828      fi
25829      # Try to locate tool using the code snippet
25830
25831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25832$as_echo_n "checking for javah in Boot JDK... " >&6; }
25833      JAVAH=$BOOT_JDK/bin/javah
25834      if test ! -x $JAVAH; then
25835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25836$as_echo "not found" >&6; }
25837        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25838$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25839        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25840      fi
25841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25842$as_echo "ok" >&6; }
25843
25844
25845    else
25846      # If it succeeded, then it was overridden by the user. We will use it
25847      # for the tool.
25848
25849      # First remove it from the list of overridden variables, so we can test
25850      # for unknown variables in the end.
25851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25852
25853      # Check if the provided tool contains a complete path.
25854      tool_specified="$JAVAH"
25855      tool_basename="${tool_specified##*/}"
25856      if test "x$tool_basename" = "x$tool_specified"; then
25857        # A command without a complete path is provided, search $PATH.
25858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25859$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25860        # Extract the first word of "$tool_basename", so it can be a program name with args.
25861set dummy $tool_basename; ac_word=$2
25862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25863$as_echo_n "checking for $ac_word... " >&6; }
25864if ${ac_cv_path_JAVAH+:} false; then :
25865  $as_echo_n "(cached) " >&6
25866else
25867  case $JAVAH in
25868  [\\/]* | ?:[\\/]*)
25869  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25870  ;;
25871  *)
25872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25873for as_dir in $PATH
25874do
25875  IFS=$as_save_IFS
25876  test -z "$as_dir" && as_dir=.
25877    for ac_exec_ext in '' $ac_executable_extensions; do
25878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25879    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25881    break 2
25882  fi
25883done
25884  done
25885IFS=$as_save_IFS
25886
25887  ;;
25888esac
25889fi
25890JAVAH=$ac_cv_path_JAVAH
25891if test -n "$JAVAH"; then
25892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25893$as_echo "$JAVAH" >&6; }
25894else
25895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25896$as_echo "no" >&6; }
25897fi
25898
25899
25900        if test "x$JAVAH" = x; then
25901          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25902        fi
25903      else
25904        # Otherwise we believe it is a complete path. Use it as it is.
25905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25906$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25908$as_echo_n "checking for JAVAH... " >&6; }
25909        if test ! -x "$tool_specified"; then
25910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25911$as_echo "not found" >&6; }
25912          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25913        fi
25914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25915$as_echo "$tool_specified" >&6; }
25916      fi
25917    fi
25918  fi
25919
25920
25921
25922  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25923
25924  # Publish this variable in the help.
25925
25926
25927  if test "x$JAR" = x; then
25928    # The variable is not set by user, try to locate tool using the code snippet
25929
25930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25931$as_echo_n "checking for jar in Boot JDK... " >&6; }
25932      JAR=$BOOT_JDK/bin/jar
25933      if test ! -x $JAR; then
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25935$as_echo "not found" >&6; }
25936        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25937$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25938        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25939      fi
25940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25941$as_echo "ok" >&6; }
25942
25943
25944  else
25945    # The variable is set, but is it from the command line or the environment?
25946
25947    # Try to remove the string !JAR! from our list.
25948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25950      # If it failed, the variable was not from the command line. Ignore it,
25951      # but warn the user (except for BASH, which is always set by the calling BASH).
25952      if test "xJAR" != xBASH; then
25953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25954$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25955      fi
25956      # Try to locate tool using the code snippet
25957
25958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25959$as_echo_n "checking for jar in Boot JDK... " >&6; }
25960      JAR=$BOOT_JDK/bin/jar
25961      if test ! -x $JAR; then
25962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25963$as_echo "not found" >&6; }
25964        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25965$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25966        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25967      fi
25968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25969$as_echo "ok" >&6; }
25970
25971
25972    else
25973      # If it succeeded, then it was overridden by the user. We will use it
25974      # for the tool.
25975
25976      # First remove it from the list of overridden variables, so we can test
25977      # for unknown variables in the end.
25978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25979
25980      # Check if the provided tool contains a complete path.
25981      tool_specified="$JAR"
25982      tool_basename="${tool_specified##*/}"
25983      if test "x$tool_basename" = "x$tool_specified"; then
25984        # A command without a complete path is provided, search $PATH.
25985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25986$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25987        # Extract the first word of "$tool_basename", so it can be a program name with args.
25988set dummy $tool_basename; ac_word=$2
25989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25990$as_echo_n "checking for $ac_word... " >&6; }
25991if ${ac_cv_path_JAR+:} false; then :
25992  $as_echo_n "(cached) " >&6
25993else
25994  case $JAR in
25995  [\\/]* | ?:[\\/]*)
25996  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25997  ;;
25998  *)
25999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26000for as_dir in $PATH
26001do
26002  IFS=$as_save_IFS
26003  test -z "$as_dir" && as_dir=.
26004    for ac_exec_ext in '' $ac_executable_extensions; do
26005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26006    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26008    break 2
26009  fi
26010done
26011  done
26012IFS=$as_save_IFS
26013
26014  ;;
26015esac
26016fi
26017JAR=$ac_cv_path_JAR
26018if test -n "$JAR"; then
26019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26020$as_echo "$JAR" >&6; }
26021else
26022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26023$as_echo "no" >&6; }
26024fi
26025
26026
26027        if test "x$JAR" = x; then
26028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26029        fi
26030      else
26031        # Otherwise we believe it is a complete path. Use it as it is.
26032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26033$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26035$as_echo_n "checking for JAR... " >&6; }
26036        if test ! -x "$tool_specified"; then
26037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26038$as_echo "not found" >&6; }
26039          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26040        fi
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26042$as_echo "$tool_specified" >&6; }
26043      fi
26044    fi
26045  fi
26046
26047
26048
26049  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26050
26051  # Publish this variable in the help.
26052
26053
26054  if test "x$JARSIGNER" = x; then
26055    # The variable is not set by user, try to locate tool using the code snippet
26056
26057      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26058$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26059      JARSIGNER=$BOOT_JDK/bin/jarsigner
26060      if test ! -x $JARSIGNER; then
26061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26062$as_echo "not found" >&6; }
26063        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26064$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26065        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26066      fi
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26068$as_echo "ok" >&6; }
26069
26070
26071  else
26072    # The variable is set, but is it from the command line or the environment?
26073
26074    # Try to remove the string !JARSIGNER! from our list.
26075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26077      # If it failed, the variable was not from the command line. Ignore it,
26078      # but warn the user (except for BASH, which is always set by the calling BASH).
26079      if test "xJARSIGNER" != xBASH; then
26080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26081$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26082      fi
26083      # Try to locate tool using the code snippet
26084
26085      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26086$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26087      JARSIGNER=$BOOT_JDK/bin/jarsigner
26088      if test ! -x $JARSIGNER; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26090$as_echo "not found" >&6; }
26091        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26092$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26093        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26094      fi
26095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26096$as_echo "ok" >&6; }
26097
26098
26099    else
26100      # If it succeeded, then it was overridden by the user. We will use it
26101      # for the tool.
26102
26103      # First remove it from the list of overridden variables, so we can test
26104      # for unknown variables in the end.
26105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26106
26107      # Check if the provided tool contains a complete path.
26108      tool_specified="$JARSIGNER"
26109      tool_basename="${tool_specified##*/}"
26110      if test "x$tool_basename" = "x$tool_specified"; then
26111        # A command without a complete path is provided, search $PATH.
26112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26113$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26114        # Extract the first word of "$tool_basename", so it can be a program name with args.
26115set dummy $tool_basename; ac_word=$2
26116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26117$as_echo_n "checking for $ac_word... " >&6; }
26118if ${ac_cv_path_JARSIGNER+:} false; then :
26119  $as_echo_n "(cached) " >&6
26120else
26121  case $JARSIGNER in
26122  [\\/]* | ?:[\\/]*)
26123  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26124  ;;
26125  *)
26126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26127for as_dir in $PATH
26128do
26129  IFS=$as_save_IFS
26130  test -z "$as_dir" && as_dir=.
26131    for ac_exec_ext in '' $ac_executable_extensions; do
26132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26133    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26135    break 2
26136  fi
26137done
26138  done
26139IFS=$as_save_IFS
26140
26141  ;;
26142esac
26143fi
26144JARSIGNER=$ac_cv_path_JARSIGNER
26145if test -n "$JARSIGNER"; then
26146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26147$as_echo "$JARSIGNER" >&6; }
26148else
26149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26150$as_echo "no" >&6; }
26151fi
26152
26153
26154        if test "x$JARSIGNER" = x; then
26155          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26156        fi
26157      else
26158        # Otherwise we believe it is a complete path. Use it as it is.
26159        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26160$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26162$as_echo_n "checking for JARSIGNER... " >&6; }
26163        if test ! -x "$tool_specified"; then
26164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26165$as_echo "not found" >&6; }
26166          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26167        fi
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26169$as_echo "$tool_specified" >&6; }
26170      fi
26171    fi
26172  fi
26173
26174
26175
26176  # Finally, set some other options...
26177
26178  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26179  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26180
26181
26182
26183
26184###############################################################################
26185#
26186# Configure the sources to use. We can add or override individual directories.
26187#
26188###############################################################################
26189
26190
26191  # Where are the sources. Any of these can be overridden
26192  # using --with-override-corba and the likes.
26193  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26194  CORBA_TOPDIR="$SRC_ROOT/corba"
26195  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26196  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26197  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26198  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26199  JDK_TOPDIR="$SRC_ROOT/jdk"
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210  ###############################################################################
26211  #
26212  # Pickup additional source for a component from outside of the source root
26213  # or override source for a component.
26214  #
26215
26216# Check whether --with-add-source-root was given.
26217if test "${with_add_source_root+set}" = set; then :
26218  withval=$with_add_source_root;
26219fi
26220
26221
26222
26223# Check whether --with-override-source-root was given.
26224if test "${with_override_source_root+set}" = set; then :
26225  withval=$with_override_source_root;
26226fi
26227
26228
26229
26230# Check whether --with-adds-and-overrides was given.
26231if test "${with_adds_and_overrides+set}" = set; then :
26232  withval=$with_adds_and_overrides;
26233fi
26234
26235
26236  if test "x$with_adds_and_overrides" != x; then
26237    with_add_source_root="$with_adds_and_overrides/adds"
26238    with_override_source_root="$with_adds_and_overrides/overrides"
26239  fi
26240
26241  if test "x$with_add_source_root" != x; then
26242    if ! test -d $with_add_source_root; then
26243      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26244    fi
26245    CURDIR="$PWD"
26246    cd "$with_add_source_root"
26247    ADD_SRC_ROOT="`pwd`"
26248    cd "$CURDIR"
26249    # Verify that the addon source root does not have any root makefiles.
26250    # If it does, then it is usually an error, prevent this.
26251    if test -f $with_add_source_root/langtools/make/Makefile; then
26252      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
26253    fi
26254    if test -f $with_add_source_root/corba/make/Makefile; then
26255      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
26256    fi
26257    if test -f $with_add_source_root/jaxp/make/Makefile; then
26258      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
26259    fi
26260    if test -f $with_add_source_root/jaxws/make/Makefile; then
26261      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
26262    fi
26263    if test -f $with_add_source_root/hotspot/make/Makefile; then
26264      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
26265    fi
26266    if test -f $with_add_source_root/nashorn/make/Makefile; then
26267      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
26268    fi
26269    if test -f $with_add_source_root/jdk/make/Makefile; then
26270      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
26271    fi
26272  fi
26273
26274
26275  if test "x$with_override_source_root" != x; then
26276    if ! test -d $with_override_source_root; then
26277      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26278    fi
26279    CURDIR="$PWD"
26280    cd "$with_override_source_root"
26281    OVERRIDE_SRC_ROOT="`pwd`"
26282    cd "$CURDIR"
26283    if test -f $with_override_source_root/langtools/make/Makefile; then
26284      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
26285    fi
26286    if test -f $with_override_source_root/corba/make/Makefile; then
26287      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
26288    fi
26289    if test -f $with_override_source_root/jaxp/make/Makefile; then
26290      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
26291    fi
26292    if test -f $with_override_source_root/jaxws/make/Makefile; then
26293      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
26294    fi
26295    if test -f $with_override_source_root/hotspot/make/Makefile; then
26296      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
26297    fi
26298    if test -f $with_override_source_root/nashorn/make/Makefile; then
26299      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
26300    fi
26301    if test -f $with_override_source_root/jdk/make/Makefile; then
26302      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
26303    fi
26304  fi
26305
26306
26307  ###############################################################################
26308  #
26309  # Override a repo completely, this is used for example when you have 3 small
26310  # development sandboxes of the langtools sources and want to avoid having 3 full
26311  # OpenJDK sources checked out on disk.
26312  #
26313  # Assuming that the 3 langtools sandboxes are located here:
26314  # /home/fredrik/sandbox1/langtools
26315  # /home/fredrik/sandbox2/langtools
26316  # /home/fredrik/sandbox3/langtools
26317  #
26318  # From the source root you create build subdirs manually:
26319  #     mkdir -p build1 build2 build3
26320  # in each build directory run:
26321  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26322  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26323  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26324  #
26325
26326
26327# Check whether --with-override-langtools was given.
26328if test "${with_override_langtools+set}" = set; then :
26329  withval=$with_override_langtools;
26330fi
26331
26332
26333
26334# Check whether --with-override-corba was given.
26335if test "${with_override_corba+set}" = set; then :
26336  withval=$with_override_corba;
26337fi
26338
26339
26340
26341# Check whether --with-override-jaxp was given.
26342if test "${with_override_jaxp+set}" = set; then :
26343  withval=$with_override_jaxp;
26344fi
26345
26346
26347
26348# Check whether --with-override-jaxws was given.
26349if test "${with_override_jaxws+set}" = set; then :
26350  withval=$with_override_jaxws;
26351fi
26352
26353
26354
26355# Check whether --with-override-hotspot was given.
26356if test "${with_override_hotspot+set}" = set; then :
26357  withval=$with_override_hotspot;
26358fi
26359
26360
26361
26362# Check whether --with-override-nashorn was given.
26363if test "${with_override_nashorn+set}" = set; then :
26364  withval=$with_override_nashorn;
26365fi
26366
26367
26368
26369# Check whether --with-override-jdk was given.
26370if test "${with_override_jdk+set}" = set; then :
26371  withval=$with_override_jdk;
26372fi
26373
26374
26375  if test "x$with_override_langtools" != x; then
26376    CURDIR="$PWD"
26377    cd "$with_override_langtools"
26378    LANGTOOLS_TOPDIR="`pwd`"
26379    cd "$CURDIR"
26380    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26381      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26382    fi
26383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26384$as_echo_n "checking if langtools should be overridden... " >&6; }
26385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26386$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26387  fi
26388  if test "x$with_override_corba" != x; then
26389    CURDIR="$PWD"
26390    cd "$with_override_corba"
26391    CORBA_TOPDIR="`pwd`"
26392    cd "$CURDIR"
26393    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26394      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26395    fi
26396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26397$as_echo_n "checking if corba should be overridden... " >&6; }
26398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26399$as_echo "yes with $CORBA_TOPDIR" >&6; }
26400  fi
26401  if test "x$with_override_jaxp" != x; then
26402    CURDIR="$PWD"
26403    cd "$with_override_jaxp"
26404    JAXP_TOPDIR="`pwd`"
26405    cd "$CURDIR"
26406    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26407      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26408    fi
26409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26410$as_echo_n "checking if jaxp should be overridden... " >&6; }
26411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26412$as_echo "yes with $JAXP_TOPDIR" >&6; }
26413  fi
26414  if test "x$with_override_jaxws" != x; then
26415    CURDIR="$PWD"
26416    cd "$with_override_jaxws"
26417    JAXWS_TOPDIR="`pwd`"
26418    cd "$CURDIR"
26419    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26420      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26421    fi
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26423$as_echo_n "checking if jaxws should be overridden... " >&6; }
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26425$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26426  fi
26427  if test "x$with_override_hotspot" != x; then
26428    CURDIR="$PWD"
26429    cd "$with_override_hotspot"
26430    HOTSPOT_TOPDIR="`pwd`"
26431    cd "$CURDIR"
26432    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26433      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26434    fi
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26436$as_echo_n "checking if hotspot should be overridden... " >&6; }
26437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26438$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26439  fi
26440  if test "x$with_override_nashorn" != x; then
26441    CURDIR="$PWD"
26442    cd "$with_override_nashorn"
26443    NASHORN_TOPDIR="`pwd`"
26444    cd "$CURDIR"
26445    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26446      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26447    fi
26448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26449$as_echo_n "checking if nashorn should be overridden... " >&6; }
26450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26451$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26452  fi
26453  if test "x$with_override_jdk" != x; then
26454    CURDIR="$PWD"
26455    cd "$with_override_jdk"
26456    JDK_TOPDIR="`pwd`"
26457    cd "$CURDIR"
26458    if ! test -f $JDK_TOPDIR/make/Makefile; then
26459      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26460    fi
26461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26462$as_echo_n "checking if JDK should be overridden... " >&6; }
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26464$as_echo "yes with $JDK_TOPDIR" >&6; }
26465  fi
26466
26467
26468  BUILD_OUTPUT="$OUTPUT_ROOT"
26469
26470
26471  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26472  BUILD_HOTSPOT=true
26473
26474
26475
26476# Check whether --with-import-hotspot was given.
26477if test "${with_import_hotspot+set}" = set; then :
26478  withval=$with_import_hotspot;
26479fi
26480
26481  if test "x$with_import_hotspot" != x; then
26482    CURDIR="$PWD"
26483    cd "$with_import_hotspot"
26484    HOTSPOT_DIST="`pwd`"
26485    cd "$CURDIR"
26486    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26487      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26488    fi
26489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26490$as_echo_n "checking if hotspot should be imported... " >&6; }
26491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26492$as_echo "yes from $HOTSPOT_DIST" >&6; }
26493    BUILD_HOTSPOT=false
26494  fi
26495
26496  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26497
26498
26499###############################################################################
26500#
26501# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26502# native code.
26503#
26504###############################################################################
26505
26506# First determine the toolchain type (compiler family)
26507
26508
26509# Check whether --with-toolchain-type was given.
26510if test "${with_toolchain_type+set}" = set; then :
26511  withval=$with_toolchain_type;
26512fi
26513
26514
26515  # Use indirect variable referencing
26516  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26517  VALID_TOOLCHAINS=${!toolchain_var_name}
26518
26519  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26520    if test -n "$XCODEBUILD"; then
26521      # On Mac OS X, default toolchain to clang after Xcode 5
26522      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26523      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26524      if test $? -ne 0; then
26525        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26526      fi
26527      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26528          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26529          $CUT -f 1 -d .`
26530      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26531$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26532      if test $XCODE_MAJOR_VERSION -ge 5; then
26533          DEFAULT_TOOLCHAIN="clang"
26534      else
26535          DEFAULT_TOOLCHAIN="gcc"
26536      fi
26537    else
26538      # If Xcode is not installed, but the command line tools are
26539      # then we can't run xcodebuild. On these systems we should
26540      # default to clang
26541      DEFAULT_TOOLCHAIN="clang"
26542    fi
26543  else
26544    # First toolchain type in the list is the default
26545    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26546  fi
26547
26548  if test "x$with_toolchain_type" = xlist; then
26549    # List all toolchains
26550    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26551$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26552    for toolchain in $VALID_TOOLCHAINS; do
26553      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26554      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26555      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26556    done
26557
26558    exit 0
26559  elif test "x$with_toolchain_type" != x; then
26560    # User override; check that it is valid
26561    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26562      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26563$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26564      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26565$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26566      as_fn_error $? "Cannot continue." "$LINENO" 5
26567    fi
26568    TOOLCHAIN_TYPE=$with_toolchain_type
26569  else
26570    # No flag given, use default
26571    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26572  fi
26573
26574
26575  TOOLCHAIN_CC_BINARY_clang="clang"
26576  TOOLCHAIN_CC_BINARY_gcc="gcc"
26577  TOOLCHAIN_CC_BINARY_microsoft="cl"
26578  TOOLCHAIN_CC_BINARY_solstudio="cc"
26579  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26580
26581  TOOLCHAIN_CXX_BINARY_clang="clang++"
26582  TOOLCHAIN_CXX_BINARY_gcc="g++"
26583  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26584  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26585  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26586
26587  # Use indirect variable referencing
26588  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26589  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26590  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26591  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26592  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26593  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26594
26595
26596  # Define filename patterns
26597  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26598    LIBRARY_PREFIX=
26599    SHARED_LIBRARY_SUFFIX='.dll'
26600    STATIC_LIBRARY_SUFFIX='.lib'
26601    SHARED_LIBRARY='$1.dll'
26602    STATIC_LIBRARY='$1.lib'
26603    OBJ_SUFFIX='.obj'
26604    EXE_SUFFIX='.exe'
26605  else
26606    LIBRARY_PREFIX=lib
26607    SHARED_LIBRARY_SUFFIX='.so'
26608    STATIC_LIBRARY_SUFFIX='.a'
26609    SHARED_LIBRARY='lib$1.so'
26610    STATIC_LIBRARY='lib$1.a'
26611    OBJ_SUFFIX='.o'
26612    EXE_SUFFIX=''
26613    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26614      SHARED_LIBRARY='lib$1.dylib'
26615      SHARED_LIBRARY_SUFFIX='.dylib'
26616    fi
26617  fi
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26629    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26630$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26631  else
26632    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26633$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26634  fi
26635
26636
26637# Then detect the actual binaries needed
26638
26639  # FIXME: Is this needed?
26640  ac_ext=cpp
26641ac_cpp='$CXXCPP $CPPFLAGS'
26642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26645
26646
26647  # Store the CFLAGS etc passed to the configure script.
26648  ORG_CFLAGS="$CFLAGS"
26649  ORG_CXXFLAGS="$CXXFLAGS"
26650
26651  # autoconf magic only relies on PATH, so update it if tools dir is specified
26652  OLD_PATH="$PATH"
26653
26654  # On Windows, we need to detect the visual studio installation first.
26655  # This will change the PATH, but we need to keep that new PATH even
26656  # after toolchain detection is done, since the compiler (on x86) uses
26657  # it for DLL resolution in runtime.
26658  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26659      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26660
26661  # Store path to cygwin link.exe to help excluding it when searching for
26662  # VS linker. This must be done before changing the PATH when looking for VS.
26663  # Extract the first word of "link", so it can be a program name with args.
26664set dummy link; ac_word=$2
26665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26666$as_echo_n "checking for $ac_word... " >&6; }
26667if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26668  $as_echo_n "(cached) " >&6
26669else
26670  case $CYGWIN_LINK in
26671  [\\/]* | ?:[\\/]*)
26672  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26673  ;;
26674  *)
26675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26676for as_dir in $PATH
26677do
26678  IFS=$as_save_IFS
26679  test -z "$as_dir" && as_dir=.
26680    for ac_exec_ext in '' $ac_executable_extensions; do
26681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26682    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26684    break 2
26685  fi
26686done
26687  done
26688IFS=$as_save_IFS
26689
26690  ;;
26691esac
26692fi
26693CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26694if test -n "$CYGWIN_LINK"; then
26695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26696$as_echo "$CYGWIN_LINK" >&6; }
26697else
26698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26699$as_echo "no" >&6; }
26700fi
26701
26702
26703  if test "x$CYGWIN_LINK" != x; then
26704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26705$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26706    "$CYGWIN_LINK" --version > /dev/null
26707    if test $? -eq 0 ; then
26708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26709$as_echo "yes" >&6; }
26710    else
26711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26712$as_echo "no" >&6; }
26713      # This might be the VS linker. Don't exclude it later on.
26714      CYGWIN_LINK=""
26715    fi
26716  fi
26717
26718  # First-hand choice is to locate and run the vsvars bat file.
26719
26720
26721# Check whether --with-toolchain-version was given.
26722if test "${with_toolchain_version+set}" = set; then :
26723  withval=$with_toolchain_version;
26724fi
26725
26726
26727  if test "x$with_toolchain_version" = xlist; then
26728    # List all toolchains
26729    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26730$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26731    for version in $VALID_VS_VERSIONS; do
26732      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26733      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26734    done
26735
26736    exit 0
26737  elif test "x$DEVKIT_VS_VERSION" != x; then
26738    VS_VERSION=$DEVKIT_VS_VERSION
26739    TOOLCHAIN_VERSION=$VS_VERSION
26740    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26741    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26742    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26743    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26744    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26745    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26746
26747    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26748    # can still be exported as INCLUDE for compiler invocations without
26749    # SYSROOT_CFLAGS
26750    OLDIFS="$IFS"
26751    IFS=";"
26752    for i in $DEVKIT_VS_INCLUDE; do
26753      ipath=$i
26754
26755  unix_path="$ipath"
26756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26757    windows_path=`$CYGPATH -m "$unix_path"`
26758    ipath="$windows_path"
26759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26760    windows_path=`cmd //c echo $unix_path`
26761    ipath="$windows_path"
26762  fi
26763
26764      VS_INCLUDE="$VS_INCLUDE;$ipath"
26765    done
26766    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26767    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26768    for i in $DEVKIT_VS_LIB; do
26769      libpath=$i
26770
26771  unix_path="$libpath"
26772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26773    windows_path=`$CYGPATH -m "$unix_path"`
26774    libpath="$windows_path"
26775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26776    windows_path=`cmd //c echo $unix_path`
26777    libpath="$windows_path"
26778  fi
26779
26780      VS_LIB="$VS_LIB;$libpath"
26781    done
26782    IFS="$OLDIFS"
26783
26784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26785$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26786
26787  elif test "x$with_toolchain_version" != x; then
26788    # User override; check that it is valid
26789    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26790      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26791$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26792      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26793$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26794      as_fn_error $? "Cannot continue." "$LINENO" 5
26795    fi
26796    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26797  else
26798    # No flag given, use default
26799    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26800  fi
26801
26802  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26803
26804  VS_VERSION="$VS_VERSION"
26805  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26806  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26807  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26808  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26809
26810  # When using --with-tools-dir, assume it points to the correct and default
26811  # version of Visual Studio or that --with-toolchain-version was also set.
26812  if test "x$with_tools_dir" != x; then
26813
26814  if test "x$VS_ENV_CMD" = x; then
26815    VS_VERSION="${VS_VERSION}"
26816    VS_BASE="$with_tools_dir/../.."
26817    METHOD="--with-tools-dir"
26818
26819    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26820      VCVARSFILE="vc/bin/vcvars32.bat"
26821    else
26822      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26823    fi
26824
26825
26826  windows_path="$VS_BASE"
26827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26828    unix_path=`$CYGPATH -u "$windows_path"`
26829    VS_BASE="$unix_path"
26830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26832    VS_BASE="$unix_path"
26833  fi
26834
26835    if test -d "$VS_BASE"; then
26836      if test -f "$VS_BASE/$VCVARSFILE"; then
26837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26838$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26839        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26840        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26841        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26842        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26843      else
26844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26845$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26846        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26847$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26848      fi
26849    fi
26850  fi
26851
26852
26853  if test "x$VS_ENV_CMD" = x; then
26854    VS_VERSION="${VS_VERSION}"
26855    VS_BASE="$with_tools_dir/../../.."
26856    METHOD="--with-tools-dir"
26857
26858    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26859      VCVARSFILE="vc/bin/vcvars32.bat"
26860    else
26861      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26862    fi
26863
26864
26865  windows_path="$VS_BASE"
26866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26867    unix_path=`$CYGPATH -u "$windows_path"`
26868    VS_BASE="$unix_path"
26869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26871    VS_BASE="$unix_path"
26872  fi
26873
26874    if test -d "$VS_BASE"; then
26875      if test -f "$VS_BASE/$VCVARSFILE"; then
26876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26877$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26878        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26879        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26880        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26881        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26882      else
26883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26884$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26885        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26886$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26887      fi
26888    fi
26889  fi
26890
26891    if test "x$VS_ENV_CMD" = x; then
26892      # Having specified an argument which is incorrect will produce an instant failure;
26893      # we should not go on looking
26894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26895$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26896      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26897$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26898      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26899$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26900      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26901    fi
26902  fi
26903
26904  VS_ENV_CMD=""
26905  VS_ENV_ARGS=""
26906
26907  if test "x$VS_COMNTOOLS" != x; then
26908
26909  if test "x$VS_ENV_CMD" = x; then
26910    VS_VERSION="${VS_VERSION}"
26911    VS_BASE="$VS_COMNTOOLS/../.."
26912    METHOD="$VS_COMNTOOLS_VAR variable"
26913
26914    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26915      VCVARSFILE="vc/bin/vcvars32.bat"
26916    else
26917      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26918    fi
26919
26920
26921  windows_path="$VS_BASE"
26922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26923    unix_path=`$CYGPATH -u "$windows_path"`
26924    VS_BASE="$unix_path"
26925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26927    VS_BASE="$unix_path"
26928  fi
26929
26930    if test -d "$VS_BASE"; then
26931      if test -f "$VS_BASE/$VCVARSFILE"; then
26932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26933$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26934        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26935        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26936        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26937        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26938      else
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26940$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26942$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26943      fi
26944    fi
26945  fi
26946
26947  fi
26948  if test "x$PROGRAMFILES" != x; then
26949
26950  if test "x$VS_ENV_CMD" = x; then
26951    VS_VERSION="${VS_VERSION}"
26952    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26953    METHOD="well-known name"
26954
26955    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26956      VCVARSFILE="vc/bin/vcvars32.bat"
26957    else
26958      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26959    fi
26960
26961
26962  windows_path="$VS_BASE"
26963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26964    unix_path=`$CYGPATH -u "$windows_path"`
26965    VS_BASE="$unix_path"
26966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26968    VS_BASE="$unix_path"
26969  fi
26970
26971    if test -d "$VS_BASE"; then
26972      if test -f "$VS_BASE/$VCVARSFILE"; then
26973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26974$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26975        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26976        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26977        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26978        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26979      else
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26981$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26983$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26984      fi
26985    fi
26986  fi
26987
26988  fi
26989  # Work around the insanely named ProgramFiles(x86) env variable
26990  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26991  if test "x$PROGRAMFILES_X86" != x; then
26992
26993  if test "x$VS_ENV_CMD" = x; then
26994    VS_VERSION="${VS_VERSION}"
26995    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26996    METHOD="well-known name"
26997
26998    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26999      VCVARSFILE="vc/bin/vcvars32.bat"
27000    else
27001      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27002    fi
27003
27004
27005  windows_path="$VS_BASE"
27006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27007    unix_path=`$CYGPATH -u "$windows_path"`
27008    VS_BASE="$unix_path"
27009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27011    VS_BASE="$unix_path"
27012  fi
27013
27014    if test -d "$VS_BASE"; then
27015      if test -f "$VS_BASE/$VCVARSFILE"; then
27016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27017$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27018        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27019        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27020        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27021        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27022      else
27023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27024$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27026$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27027      fi
27028    fi
27029  fi
27030
27031  fi
27032
27033  if test "x$VS_ENV_CMD" = x; then
27034    VS_VERSION="${VS_VERSION}"
27035    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27036    METHOD="well-known name"
27037
27038    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27039      VCVARSFILE="vc/bin/vcvars32.bat"
27040    else
27041      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27042    fi
27043
27044
27045  windows_path="$VS_BASE"
27046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27047    unix_path=`$CYGPATH -u "$windows_path"`
27048    VS_BASE="$unix_path"
27049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27051    VS_BASE="$unix_path"
27052  fi
27053
27054    if test -d "$VS_BASE"; then
27055      if test -f "$VS_BASE/$VCVARSFILE"; then
27056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27057$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27058        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27059        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27060        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27061        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27062      else
27063        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27064$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27065        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27066$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27067      fi
27068    fi
27069  fi
27070
27071
27072  if test "x$VS_ENV_CMD" = x; then
27073    VS_VERSION="${VS_VERSION}"
27074    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27075    METHOD="well-known name"
27076
27077    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27078      VCVARSFILE="vc/bin/vcvars32.bat"
27079    else
27080      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27081    fi
27082
27083
27084  windows_path="$VS_BASE"
27085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27086    unix_path=`$CYGPATH -u "$windows_path"`
27087    VS_BASE="$unix_path"
27088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27090    VS_BASE="$unix_path"
27091  fi
27092
27093    if test -d "$VS_BASE"; then
27094      if test -f "$VS_BASE/$VCVARSFILE"; then
27095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27096$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27097        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27098        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27099        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27100        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27101      else
27102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27103$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27104        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27105$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27106      fi
27107    fi
27108  fi
27109
27110
27111  if test "x$SDK_INSTALL_DIR" != x; then
27112    if test "x$ProgramW6432" != x; then
27113
27114  if test "x$VS_ENV_CMD" = x; then
27115    VS_VERSION="${VS_VERSION}"
27116    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27117    METHOD="well-known name"
27118
27119  windows_path="$WIN_SDK_BASE"
27120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27121    unix_path=`$CYGPATH -u "$windows_path"`
27122    WIN_SDK_BASE="$unix_path"
27123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27125    WIN_SDK_BASE="$unix_path"
27126  fi
27127
27128    if test -d "$WIN_SDK_BASE"; then
27129      # There have been cases of partial or broken SDK installations. A missing
27130      # lib dir is not going to work.
27131      if test ! -d "$WIN_SDK_BASE/lib"; then
27132        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27133$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27134        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27135$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27136      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27139        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27140        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27141          VS_ENV_ARGS="/x86"
27142        else
27143          VS_ENV_ARGS="/x64"
27144        fi
27145        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27146        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27147        # TODO: improve detection for other versions of SDK
27148        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27149      else
27150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27153$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27154      fi
27155    fi
27156  fi
27157
27158    fi
27159    if test "x$PROGRAMW6432" != x; then
27160
27161  if test "x$VS_ENV_CMD" = x; then
27162    VS_VERSION="${VS_VERSION}"
27163    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27164    METHOD="well-known name"
27165
27166  windows_path="$WIN_SDK_BASE"
27167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27168    unix_path=`$CYGPATH -u "$windows_path"`
27169    WIN_SDK_BASE="$unix_path"
27170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27172    WIN_SDK_BASE="$unix_path"
27173  fi
27174
27175    if test -d "$WIN_SDK_BASE"; then
27176      # There have been cases of partial or broken SDK installations. A missing
27177      # lib dir is not going to work.
27178      if test ! -d "$WIN_SDK_BASE/lib"; then
27179        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27180$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27181        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27182$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27183      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27186        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27187        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27188          VS_ENV_ARGS="/x86"
27189        else
27190          VS_ENV_ARGS="/x64"
27191        fi
27192        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27193        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27194        # TODO: improve detection for other versions of SDK
27195        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27196      else
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27199        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27200$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27201      fi
27202    fi
27203  fi
27204
27205    fi
27206    if test "x$PROGRAMFILES" != x; then
27207
27208  if test "x$VS_ENV_CMD" = x; then
27209    VS_VERSION="${VS_VERSION}"
27210    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27211    METHOD="well-known name"
27212
27213  windows_path="$WIN_SDK_BASE"
27214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27215    unix_path=`$CYGPATH -u "$windows_path"`
27216    WIN_SDK_BASE="$unix_path"
27217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27219    WIN_SDK_BASE="$unix_path"
27220  fi
27221
27222    if test -d "$WIN_SDK_BASE"; then
27223      # There have been cases of partial or broken SDK installations. A missing
27224      # lib dir is not going to work.
27225      if test ! -d "$WIN_SDK_BASE/lib"; then
27226        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27227$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27228        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27229$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27230      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27232$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27233        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27234        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27235          VS_ENV_ARGS="/x86"
27236        else
27237          VS_ENV_ARGS="/x64"
27238        fi
27239        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27240        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27241        # TODO: improve detection for other versions of SDK
27242        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27243      else
27244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27247$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27248      fi
27249    fi
27250  fi
27251
27252    fi
27253
27254  if test "x$VS_ENV_CMD" = x; then
27255    VS_VERSION="${VS_VERSION}"
27256    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27257    METHOD="well-known name"
27258
27259  windows_path="$WIN_SDK_BASE"
27260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27261    unix_path=`$CYGPATH -u "$windows_path"`
27262    WIN_SDK_BASE="$unix_path"
27263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27265    WIN_SDK_BASE="$unix_path"
27266  fi
27267
27268    if test -d "$WIN_SDK_BASE"; then
27269      # There have been cases of partial or broken SDK installations. A missing
27270      # lib dir is not going to work.
27271      if test ! -d "$WIN_SDK_BASE/lib"; then
27272        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27273$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27274        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27275$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27276      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27279        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27280        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27281          VS_ENV_ARGS="/x86"
27282        else
27283          VS_ENV_ARGS="/x64"
27284        fi
27285        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27286        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27287        # TODO: improve detection for other versions of SDK
27288        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27289      else
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27293$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27294      fi
27295    fi
27296  fi
27297
27298
27299  if test "x$VS_ENV_CMD" = x; then
27300    VS_VERSION="${VS_VERSION}"
27301    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27302    METHOD="well-known name"
27303
27304  windows_path="$WIN_SDK_BASE"
27305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27306    unix_path=`$CYGPATH -u "$windows_path"`
27307    WIN_SDK_BASE="$unix_path"
27308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27310    WIN_SDK_BASE="$unix_path"
27311  fi
27312
27313    if test -d "$WIN_SDK_BASE"; then
27314      # There have been cases of partial or broken SDK installations. A missing
27315      # lib dir is not going to work.
27316      if test ! -d "$WIN_SDK_BASE/lib"; then
27317        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27318$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27319        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27320$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27321      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27323$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27324        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27325        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27326          VS_ENV_ARGS="/x86"
27327        else
27328          VS_ENV_ARGS="/x64"
27329        fi
27330        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27331        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27332        # TODO: improve detection for other versions of SDK
27333        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27334      else
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27336$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27337        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27338$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27339      fi
27340    fi
27341  fi
27342
27343  fi
27344
27345    if test "x$VS_ENV_CMD" != x; then
27346      TOOLCHAIN_VERSION=$VS_VERSION
27347      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27348      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27349      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27350      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27351      # The rest of the variables are already evaled while probing
27352      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27353$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27354      break
27355    fi
27356  done
27357
27358
27359  # If we have a devkit, skip all of the below.
27360  if test "x$DEVKIT_VS_VERSION" = x; then
27361    if test "x$VS_ENV_CMD" != x; then
27362      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27363
27364  # Only process if variable expands to non-empty
27365
27366  if test "x$VS_ENV_CMD" != x; then
27367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27368
27369  # First separate the path from the arguments. This will split at the first
27370  # space.
27371  complete="$VS_ENV_CMD"
27372  path="${complete%% *}"
27373  tmp="$complete EOL"
27374  arguments="${tmp#* }"
27375
27376  # Input might be given as Windows format, start by converting to
27377  # unix format.
27378  new_path=`$CYGPATH -u "$path"`
27379
27380  # Now try to locate executable using which
27381  new_path=`$WHICH "$new_path" 2> /dev/null`
27382  # bat and cmd files are not always considered executable in cygwin causing which
27383  # to not find them
27384  if test "x$new_path" = x \
27385      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27386      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27387    new_path=`$CYGPATH -u "$path"`
27388  fi
27389  if test "x$new_path" = x; then
27390    # Oops. Which didn't find the executable.
27391    # The splitting of arguments from the executable at a space might have been incorrect,
27392    # since paths with space are more likely in Windows. Give it another try with the whole
27393    # argument.
27394    path="$complete"
27395    arguments="EOL"
27396    new_path=`$CYGPATH -u "$path"`
27397    new_path=`$WHICH "$new_path" 2> /dev/null`
27398    # bat and cmd files are not always considered executable in cygwin causing which
27399    # to not find them
27400    if test "x$new_path" = x \
27401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27403      new_path=`$CYGPATH -u "$path"`
27404    fi
27405    if test "x$new_path" = x; then
27406      # It's still not found. Now this is an unrecoverable error.
27407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27408$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27409      has_space=`$ECHO "$complete" | $GREP " "`
27410      if test "x$has_space" != x; then
27411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27413      fi
27414      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27415    fi
27416  fi
27417
27418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27421  # "foo.exe" is OK but "foo" is an error.
27422  #
27423  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27424  # It is also a way to make sure we got the proper file name for the real test later on.
27425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27426  if test "x$test_shortpath" = x; then
27427    # Short path failed, file does not exist as specified.
27428    # Try adding .exe or .cmd
27429    if test -f "${new_path}.exe"; then
27430      input_to_shortpath="${new_path}.exe"
27431    elif test -f "${new_path}.cmd"; then
27432      input_to_shortpath="${new_path}.cmd"
27433    else
27434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27435$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27438      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27439    fi
27440  else
27441    input_to_shortpath="$new_path"
27442  fi
27443
27444  # Call helper function which possibly converts this using DOS-style short mode.
27445  # If so, the updated path is stored in $new_path.
27446  new_path="$input_to_shortpath"
27447
27448  input_path="$input_to_shortpath"
27449  # Check if we need to convert this using DOS-style short mode. If the path
27450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27451  # take no chances and rewrite it.
27452  # Note: m4 eats our [], so we need to use [ and ] instead.
27453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27454  if test "x$has_forbidden_chars" != x; then
27455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27459      # Going to short mode and back again did indeed matter. Since short mode is
27460      # case insensitive, let's make it lowercase to improve readability.
27461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27462      # Now convert it back to Unix-style (cygpath)
27463      input_path=`$CYGPATH -u "$shortmode_path"`
27464      new_path="$input_path"
27465    fi
27466  fi
27467
27468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27469  if test "x$test_cygdrive_prefix" = x; then
27470    # As a simple fix, exclude /usr/bin since it's not a real path.
27471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27473      # a path prefixed by /cygdrive for fixpath to work.
27474      new_path="$CYGWIN_ROOT_PATH$input_path"
27475    fi
27476  fi
27477
27478  # remove trailing .exe if any
27479  new_path="${new_path/%.exe/}"
27480
27481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27482
27483  # First separate the path from the arguments. This will split at the first
27484  # space.
27485  complete="$VS_ENV_CMD"
27486  path="${complete%% *}"
27487  tmp="$complete EOL"
27488  arguments="${tmp#* }"
27489
27490  # Input might be given as Windows format, start by converting to
27491  # unix format.
27492  new_path="$path"
27493
27494  windows_path="$new_path"
27495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27496    unix_path=`$CYGPATH -u "$windows_path"`
27497    new_path="$unix_path"
27498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27500    new_path="$unix_path"
27501  fi
27502
27503
27504  # Now try to locate executable using which
27505  new_path=`$WHICH "$new_path" 2> /dev/null`
27506
27507  if test "x$new_path" = x; then
27508    # Oops. Which didn't find the executable.
27509    # The splitting of arguments from the executable at a space might have been incorrect,
27510    # since paths with space are more likely in Windows. Give it another try with the whole
27511    # argument.
27512    path="$complete"
27513    arguments="EOL"
27514    new_path="$path"
27515
27516  windows_path="$new_path"
27517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27518    unix_path=`$CYGPATH -u "$windows_path"`
27519    new_path="$unix_path"
27520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27522    new_path="$unix_path"
27523  fi
27524
27525
27526    new_path=`$WHICH "$new_path" 2> /dev/null`
27527    # bat and cmd files are not always considered executable in MSYS causing which
27528    # to not find them
27529    if test "x$new_path" = x \
27530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27532      new_path="$path"
27533
27534  windows_path="$new_path"
27535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27536    unix_path=`$CYGPATH -u "$windows_path"`
27537    new_path="$unix_path"
27538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27540    new_path="$unix_path"
27541  fi
27542
27543    fi
27544
27545    if test "x$new_path" = x; then
27546      # It's still not found. Now this is an unrecoverable error.
27547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27548$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27549      has_space=`$ECHO "$complete" | $GREP " "`
27550      if test "x$has_space" != x; then
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27553      fi
27554      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27555    fi
27556  fi
27557
27558  # Now new_path has a complete unix path to the binary
27559  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27560    # Keep paths in /bin as-is, but remove trailing .exe if any
27561    new_path="${new_path/%.exe/}"
27562    # Do not save /bin paths to all_fixpath_prefixes!
27563  else
27564    # Not in mixed or Windows style, start by that.
27565    new_path=`cmd //c echo $new_path`
27566
27567  input_path="$new_path"
27568  # Check if we need to convert this using DOS-style short mode. If the path
27569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27570  # take no chances and rewrite it.
27571  # Note: m4 eats our [], so we need to use [ and ] instead.
27572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27573  if test "x$has_forbidden_chars" != x; then
27574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27576  fi
27577
27578    # Output is in $new_path
27579
27580  windows_path="$new_path"
27581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27582    unix_path=`$CYGPATH -u "$windows_path"`
27583    new_path="$unix_path"
27584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27586    new_path="$unix_path"
27587  fi
27588
27589    # remove trailing .exe if any
27590    new_path="${new_path/%.exe/}"
27591
27592    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27593    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27594  fi
27595
27596    else
27597      # We're on a unix platform. Hooray! :)
27598      # First separate the path from the arguments. This will split at the first
27599      # space.
27600      complete="$VS_ENV_CMD"
27601      path="${complete%% *}"
27602      tmp="$complete EOL"
27603      arguments="${tmp#* }"
27604
27605      # Cannot rely on the command "which" here since it doesn't always work.
27606      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27607      if test -z "$is_absolute_path"; then
27608        # Path to executable is not absolute. Find it.
27609        IFS_save="$IFS"
27610        IFS=:
27611        for p in $PATH; do
27612          if test -f "$p/$path" && test -x "$p/$path"; then
27613            new_path="$p/$path"
27614            break
27615          fi
27616        done
27617        IFS="$IFS_save"
27618      else
27619        # This is an absolute path, we can use it without further modifications.
27620        new_path="$path"
27621      fi
27622
27623      if test "x$new_path" = x; then
27624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27625$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27626        has_space=`$ECHO "$complete" | $GREP " "`
27627        if test "x$has_space" != x; then
27628          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27629$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27630        fi
27631        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27632      fi
27633    fi
27634
27635    # Now join together the path and the arguments once again
27636    if test "x$arguments" != xEOL; then
27637      new_complete="$new_path ${arguments% *}"
27638    else
27639      new_complete="$new_path"
27640    fi
27641
27642    if test "x$complete" != "x$new_complete"; then
27643      VS_ENV_CMD="$new_complete"
27644      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27645$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27646    fi
27647  fi
27648
27649
27650      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27651      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27652$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27653
27654      # We need to create a couple of temporary files.
27655      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27656      $MKDIR -p $VS_ENV_TMP_DIR
27657
27658      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27659      # Instead create a shell script which will set the relevant variables when run.
27660      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27661
27662  unix_path="$WINPATH_VS_ENV_CMD"
27663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27664    windows_path=`$CYGPATH -m "$unix_path"`
27665    WINPATH_VS_ENV_CMD="$windows_path"
27666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27667    windows_path=`cmd //c echo $unix_path`
27668    WINPATH_VS_ENV_CMD="$windows_path"
27669  fi
27670
27671      WINPATH_BASH="$BASH"
27672
27673  unix_path="$WINPATH_BASH"
27674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675    windows_path=`$CYGPATH -m "$unix_path"`
27676    WINPATH_BASH="$windows_path"
27677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27678    windows_path=`cmd //c echo $unix_path`
27679    WINPATH_BASH="$windows_path"
27680  fi
27681
27682
27683      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27684      # script (executable by bash) that will setup the important variables.
27685      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27686      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27687      # This will end up something like:
27688      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27689      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27690      # These will end up something like:
27691      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27692      # The trailing space for everyone except PATH is no typo, but is needed due
27693      # to trailing \ in the Windows paths. These will be stripped later.
27694      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27695          >> $EXTRACT_VC_ENV_BAT_FILE
27696      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27697          >> $EXTRACT_VC_ENV_BAT_FILE
27698      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27699          >> $EXTRACT_VC_ENV_BAT_FILE
27700      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27701          >> $EXTRACT_VC_ENV_BAT_FILE
27702      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27703          >> $EXTRACT_VC_ENV_BAT_FILE
27704      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27705          >> $EXTRACT_VC_ENV_BAT_FILE
27706
27707      # Now execute the newly created bat file.
27708      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27709      # Change directory so we don't need to mess with Windows paths in redirects.
27710      cd $VS_ENV_TMP_DIR
27711      cmd /c extract-vs-env.bat | $CAT
27712      cd $CURDIR
27713
27714      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27715        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27716$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27717        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27718$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27719        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27720$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27721        as_fn_error $? "Cannot continue" "$LINENO" 5
27722      fi
27723
27724      # Now set all paths and other env variables. This will allow the rest of
27725      # the configure script to find and run the compiler in the proper way.
27726      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27727$as_echo "$as_me: Setting extracted environment variables" >&6;}
27728      . $VS_ENV_TMP_DIR/set-vs-env.sh
27729      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27730      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27731    else
27732      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27733      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27734$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27735    fi
27736  fi
27737
27738  # At this point, we should have correct variables in the environment, or we can't continue.
27739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27740$as_echo_n "checking for Visual Studio variables... " >&6; }
27741
27742  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27743      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27744    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27746$as_echo "present but broken" >&6; }
27747      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27748    else
27749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27750$as_echo "ok" >&6; }
27751      # Remove any trailing "\" ";" and " " from the variables.
27752      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27753      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27754      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27755      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27756      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27757      # Remove any paths containing # (typically F#) as that messes up make. This
27758      # is needed if visual studio was installed with F# support.
27759      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27760
27761
27762
27763
27764
27765      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27766      OLDIFS="$IFS"
27767      IFS=";"
27768      for i in $VS_INCLUDE; do
27769        ipath=$i
27770        # Only process non-empty elements
27771        if test "x$ipath" != x; then
27772          IFS="$OLDIFS"
27773          # Check that directory exists before calling fixup_path
27774          testpath=$ipath
27775
27776  windows_path="$testpath"
27777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27778    unix_path=`$CYGPATH -u "$windows_path"`
27779    testpath="$unix_path"
27780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27782    testpath="$unix_path"
27783  fi
27784
27785          if test -d "$testpath"; then
27786
27787  # Only process if variable expands to non-empty
27788
27789  if test "x$ipath" != x; then
27790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27791
27792  # Input might be given as Windows format, start by converting to
27793  # unix format.
27794  path="$ipath"
27795  new_path=`$CYGPATH -u "$path"`
27796
27797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27800  # "foo.exe" is OK but "foo" is an error.
27801  #
27802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27803  # It is also a way to make sure we got the proper file name for the real test later on.
27804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27805  if test "x$test_shortpath" = x; then
27806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27807$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27808    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27809  fi
27810
27811  # Call helper function which possibly converts this using DOS-style short mode.
27812  # If so, the updated path is stored in $new_path.
27813
27814  input_path="$new_path"
27815  # Check if we need to convert this using DOS-style short mode. If the path
27816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27817  # take no chances and rewrite it.
27818  # Note: m4 eats our [], so we need to use [ and ] instead.
27819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27820  if test "x$has_forbidden_chars" != x; then
27821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27825      # Going to short mode and back again did indeed matter. Since short mode is
27826      # case insensitive, let's make it lowercase to improve readability.
27827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27828      # Now convert it back to Unix-style (cygpath)
27829      input_path=`$CYGPATH -u "$shortmode_path"`
27830      new_path="$input_path"
27831    fi
27832  fi
27833
27834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27835  if test "x$test_cygdrive_prefix" = x; then
27836    # As a simple fix, exclude /usr/bin since it's not a real path.
27837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27839      # a path prefixed by /cygdrive for fixpath to work.
27840      new_path="$CYGWIN_ROOT_PATH$input_path"
27841    fi
27842  fi
27843
27844
27845  if test "x$path" != "x$new_path"; then
27846    ipath="$new_path"
27847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27848$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27849  fi
27850
27851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27852
27853  path="$ipath"
27854  has_colon=`$ECHO $path | $GREP ^.:`
27855  new_path="$path"
27856  if test "x$has_colon" = x; then
27857    # Not in mixed or Windows style, start by that.
27858    new_path=`cmd //c echo $path`
27859  fi
27860
27861
27862  input_path="$new_path"
27863  # Check if we need to convert this using DOS-style short mode. If the path
27864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27865  # take no chances and rewrite it.
27866  # Note: m4 eats our [], so we need to use [ and ] instead.
27867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27868  if test "x$has_forbidden_chars" != x; then
27869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27871  fi
27872
27873
27874  windows_path="$new_path"
27875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27876    unix_path=`$CYGPATH -u "$windows_path"`
27877    new_path="$unix_path"
27878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27880    new_path="$unix_path"
27881  fi
27882
27883  if test "x$path" != "x$new_path"; then
27884    ipath="$new_path"
27885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27886$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27887  fi
27888
27889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27891
27892    else
27893      # We're on a unix platform. Hooray! :)
27894      path="$ipath"
27895      has_space=`$ECHO "$path" | $GREP " "`
27896      if test "x$has_space" != x; then
27897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27898$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27900      fi
27901
27902      # Use eval to expand a potential ~
27903      eval path="$path"
27904      if test ! -f "$path" && test ! -d "$path"; then
27905        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27906      fi
27907
27908      ipath="`cd "$path"; $THEPWDCMD -L`"
27909    fi
27910  fi
27911
27912            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27913          fi
27914          IFS=";"
27915        fi
27916      done
27917      # Convert VS_LIB into SYSROOT_LDFLAGS
27918      for i in $VS_LIB; do
27919        libpath=$i
27920        # Only process non-empty elements
27921        if test "x$libpath" != x; then
27922          IFS="$OLDIFS"
27923          # Check that directory exists before calling fixup_path
27924          testpath=$libpath
27925
27926  windows_path="$testpath"
27927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928    unix_path=`$CYGPATH -u "$windows_path"`
27929    testpath="$unix_path"
27930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27932    testpath="$unix_path"
27933  fi
27934
27935          if test -d "$testpath"; then
27936
27937  # Only process if variable expands to non-empty
27938
27939  if test "x$libpath" != x; then
27940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941
27942  # Input might be given as Windows format, start by converting to
27943  # unix format.
27944  path="$libpath"
27945  new_path=`$CYGPATH -u "$path"`
27946
27947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27950  # "foo.exe" is OK but "foo" is an error.
27951  #
27952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27953  # It is also a way to make sure we got the proper file name for the real test later on.
27954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27955  if test "x$test_shortpath" = x; then
27956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27957$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27958    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27959  fi
27960
27961  # Call helper function which possibly converts this using DOS-style short mode.
27962  # If so, the updated path is stored in $new_path.
27963
27964  input_path="$new_path"
27965  # Check if we need to convert this using DOS-style short mode. If the path
27966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27967  # take no chances and rewrite it.
27968  # Note: m4 eats our [], so we need to use [ and ] instead.
27969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27970  if test "x$has_forbidden_chars" != x; then
27971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27975      # Going to short mode and back again did indeed matter. Since short mode is
27976      # case insensitive, let's make it lowercase to improve readability.
27977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27978      # Now convert it back to Unix-style (cygpath)
27979      input_path=`$CYGPATH -u "$shortmode_path"`
27980      new_path="$input_path"
27981    fi
27982  fi
27983
27984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27985  if test "x$test_cygdrive_prefix" = x; then
27986    # As a simple fix, exclude /usr/bin since it's not a real path.
27987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27989      # a path prefixed by /cygdrive for fixpath to work.
27990      new_path="$CYGWIN_ROOT_PATH$input_path"
27991    fi
27992  fi
27993
27994
27995  if test "x$path" != "x$new_path"; then
27996    libpath="$new_path"
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27998$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27999  fi
28000
28001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28002
28003  path="$libpath"
28004  has_colon=`$ECHO $path | $GREP ^.:`
28005  new_path="$path"
28006  if test "x$has_colon" = x; then
28007    # Not in mixed or Windows style, start by that.
28008    new_path=`cmd //c echo $path`
28009  fi
28010
28011
28012  input_path="$new_path"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28021  fi
28022
28023
28024  windows_path="$new_path"
28025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28026    unix_path=`$CYGPATH -u "$windows_path"`
28027    new_path="$unix_path"
28028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28030    new_path="$unix_path"
28031  fi
28032
28033  if test "x$path" != "x$new_path"; then
28034    libpath="$new_path"
28035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28036$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28037  fi
28038
28039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28041
28042    else
28043      # We're on a unix platform. Hooray! :)
28044      path="$libpath"
28045      has_space=`$ECHO "$path" | $GREP " "`
28046      if test "x$has_space" != x; then
28047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28048$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28050      fi
28051
28052      # Use eval to expand a potential ~
28053      eval path="$path"
28054      if test ! -f "$path" && test ! -d "$path"; then
28055        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28056      fi
28057
28058      libpath="`cd "$path"; $THEPWDCMD -L`"
28059    fi
28060  fi
28061
28062            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28063          fi
28064          IFS=";"
28065        fi
28066      done
28067      IFS="$OLDIFS"
28068    fi
28069  else
28070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28071$as_echo "not found" >&6; }
28072
28073    if test "x$VS_ENV_CMD" = x; then
28074      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28075$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28076      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28077$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28078    else
28079      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28080$as_echo "$as_me: Running the extraction script failed." >&6;}
28081    fi
28082    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28083$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28084    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28085$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28086    as_fn_error $? "Cannot continue" "$LINENO" 5
28087  fi
28088
28089    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28090    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28091    PATH="$VS_PATH"
28092    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28093    export INCLUDE="$VS_INCLUDE"
28094    export LIB="$VS_LIB"
28095  fi
28096
28097  # For solaris we really need solaris tools, and not the GNU equivalent.
28098  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28099  # so add that to path before starting to probe.
28100  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28101  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28102    PATH="/usr/ccs/bin:$PATH"
28103  fi
28104
28105  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28106  # override all other locations.
28107  if test "x$TOOLCHAIN_PATH" != x; then
28108    PATH=$TOOLCHAIN_PATH:$PATH
28109  fi
28110
28111
28112  #
28113  # Setup the compilers (CC and CXX)
28114  #
28115
28116  COMPILER_NAME=C
28117  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28118
28119  if test "x$CC" != x; then
28120    # User has supplied compiler name already, always let that override.
28121    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28122$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28123    if test "x`basename $CC`" = "x$CC"; then
28124      # A command without a complete path is provided, search $PATH.
28125
28126      for ac_prog in $CC
28127do
28128  # Extract the first word of "$ac_prog", so it can be a program name with args.
28129set dummy $ac_prog; ac_word=$2
28130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28131$as_echo_n "checking for $ac_word... " >&6; }
28132if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28133  $as_echo_n "(cached) " >&6
28134else
28135  case $POTENTIAL_CC in
28136  [\\/]* | ?:[\\/]*)
28137  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28138  ;;
28139  *)
28140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28141for as_dir in $PATH
28142do
28143  IFS=$as_save_IFS
28144  test -z "$as_dir" && as_dir=.
28145    for ac_exec_ext in '' $ac_executable_extensions; do
28146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28147    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28149    break 2
28150  fi
28151done
28152  done
28153IFS=$as_save_IFS
28154
28155  ;;
28156esac
28157fi
28158POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28159if test -n "$POTENTIAL_CC"; then
28160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28161$as_echo "$POTENTIAL_CC" >&6; }
28162else
28163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28164$as_echo "no" >&6; }
28165fi
28166
28167
28168  test -n "$POTENTIAL_CC" && break
28169done
28170
28171      if test "x$POTENTIAL_CC" != x; then
28172        CC=$POTENTIAL_CC
28173      else
28174        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28175      fi
28176    else
28177      # Otherwise it might already be a complete path
28178      if test ! -x "$CC"; then
28179        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28180      fi
28181    fi
28182  else
28183    # No user supplied value. Locate compiler ourselves.
28184
28185    # If we are cross compiling, assume cross compilation tools follows the
28186    # cross compilation standard where they are prefixed with the autoconf
28187    # standard name for the target. For example the binary
28188    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28189    # If we are not cross compiling, then the default compiler name will be
28190    # used.
28191
28192    CC=
28193    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28194    # before checking the rest of the PATH.
28195    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28196    # step, this should not be necessary.
28197    if test -n "$TOOLCHAIN_PATH"; then
28198      PATH_save="$PATH"
28199      PATH="$TOOLCHAIN_PATH"
28200      for ac_prog in $SEARCH_LIST
28201do
28202  # Extract the first word of "$ac_prog", so it can be a program name with args.
28203set dummy $ac_prog; ac_word=$2
28204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28205$as_echo_n "checking for $ac_word... " >&6; }
28206if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28207  $as_echo_n "(cached) " >&6
28208else
28209  case $TOOLCHAIN_PATH_CC in
28210  [\\/]* | ?:[\\/]*)
28211  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28212  ;;
28213  *)
28214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28215for as_dir in $PATH
28216do
28217  IFS=$as_save_IFS
28218  test -z "$as_dir" && as_dir=.
28219    for ac_exec_ext in '' $ac_executable_extensions; do
28220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28221    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28223    break 2
28224  fi
28225done
28226  done
28227IFS=$as_save_IFS
28228
28229  ;;
28230esac
28231fi
28232TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28233if test -n "$TOOLCHAIN_PATH_CC"; then
28234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28235$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28236else
28237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28238$as_echo "no" >&6; }
28239fi
28240
28241
28242  test -n "$TOOLCHAIN_PATH_CC" && break
28243done
28244
28245      CC=$TOOLCHAIN_PATH_CC
28246      PATH="$PATH_save"
28247    fi
28248
28249    # AC_PATH_PROGS can't be run multiple times with the same variable,
28250    # so create a new name for this run.
28251    if test "x$CC" = x; then
28252      for ac_prog in $SEARCH_LIST
28253do
28254  # Extract the first word of "$ac_prog", so it can be a program name with args.
28255set dummy $ac_prog; ac_word=$2
28256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28257$as_echo_n "checking for $ac_word... " >&6; }
28258if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28259  $as_echo_n "(cached) " >&6
28260else
28261  case $POTENTIAL_CC in
28262  [\\/]* | ?:[\\/]*)
28263  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28264  ;;
28265  *)
28266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28267for as_dir in $PATH
28268do
28269  IFS=$as_save_IFS
28270  test -z "$as_dir" && as_dir=.
28271    for ac_exec_ext in '' $ac_executable_extensions; do
28272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28273    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28275    break 2
28276  fi
28277done
28278  done
28279IFS=$as_save_IFS
28280
28281  ;;
28282esac
28283fi
28284POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28285if test -n "$POTENTIAL_CC"; then
28286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28287$as_echo "$POTENTIAL_CC" >&6; }
28288else
28289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28290$as_echo "no" >&6; }
28291fi
28292
28293
28294  test -n "$POTENTIAL_CC" && break
28295done
28296
28297      CC=$POTENTIAL_CC
28298    fi
28299
28300    if test "x$CC" = x; then
28301
28302  # Print a helpful message on how to acquire the necessary build dependency.
28303  # devkit is the help tag: freetype, cups, pulse, alsa etc
28304  MISSING_DEPENDENCY=devkit
28305
28306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28307    cygwin_help $MISSING_DEPENDENCY
28308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28309    msys_help $MISSING_DEPENDENCY
28310  else
28311    PKGHANDLER_COMMAND=
28312
28313    case $PKGHANDLER in
28314      apt-get)
28315        apt_help     $MISSING_DEPENDENCY ;;
28316      yum)
28317        yum_help     $MISSING_DEPENDENCY ;;
28318      port)
28319        port_help    $MISSING_DEPENDENCY ;;
28320      pkgutil)
28321        pkgutil_help $MISSING_DEPENDENCY ;;
28322      pkgadd)
28323        pkgadd_help  $MISSING_DEPENDENCY ;;
28324    esac
28325
28326    if test "x$PKGHANDLER_COMMAND" != x; then
28327      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28328    fi
28329  fi
28330
28331      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28332    fi
28333  fi
28334
28335  # Now we have a compiler binary in CC. Make sure it's okay.
28336
28337  # Only process if variable expands to non-empty
28338
28339  if test "x$CC" != x; then
28340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28341
28342  # First separate the path from the arguments. This will split at the first
28343  # space.
28344  complete="$CC"
28345  path="${complete%% *}"
28346  tmp="$complete EOL"
28347  arguments="${tmp#* }"
28348
28349  # Input might be given as Windows format, start by converting to
28350  # unix format.
28351  new_path=`$CYGPATH -u "$path"`
28352
28353  # Now try to locate executable using which
28354  new_path=`$WHICH "$new_path" 2> /dev/null`
28355  # bat and cmd files are not always considered executable in cygwin causing which
28356  # to not find them
28357  if test "x$new_path" = x \
28358      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28359      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28360    new_path=`$CYGPATH -u "$path"`
28361  fi
28362  if test "x$new_path" = x; then
28363    # Oops. Which didn't find the executable.
28364    # The splitting of arguments from the executable at a space might have been incorrect,
28365    # since paths with space are more likely in Windows. Give it another try with the whole
28366    # argument.
28367    path="$complete"
28368    arguments="EOL"
28369    new_path=`$CYGPATH -u "$path"`
28370    new_path=`$WHICH "$new_path" 2> /dev/null`
28371    # bat and cmd files are not always considered executable in cygwin causing which
28372    # to not find them
28373    if test "x$new_path" = x \
28374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28376      new_path=`$CYGPATH -u "$path"`
28377    fi
28378    if test "x$new_path" = x; then
28379      # It's still not found. Now this is an unrecoverable error.
28380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28381$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28382      has_space=`$ECHO "$complete" | $GREP " "`
28383      if test "x$has_space" != x; then
28384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28386      fi
28387      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28388    fi
28389  fi
28390
28391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28394  # "foo.exe" is OK but "foo" is an error.
28395  #
28396  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28397  # It is also a way to make sure we got the proper file name for the real test later on.
28398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28399  if test "x$test_shortpath" = x; then
28400    # Short path failed, file does not exist as specified.
28401    # Try adding .exe or .cmd
28402    if test -f "${new_path}.exe"; then
28403      input_to_shortpath="${new_path}.exe"
28404    elif test -f "${new_path}.cmd"; then
28405      input_to_shortpath="${new_path}.cmd"
28406    else
28407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28408$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28411      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28412    fi
28413  else
28414    input_to_shortpath="$new_path"
28415  fi
28416
28417  # Call helper function which possibly converts this using DOS-style short mode.
28418  # If so, the updated path is stored in $new_path.
28419  new_path="$input_to_shortpath"
28420
28421  input_path="$input_to_shortpath"
28422  # Check if we need to convert this using DOS-style short mode. If the path
28423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28424  # take no chances and rewrite it.
28425  # Note: m4 eats our [], so we need to use [ and ] instead.
28426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28427  if test "x$has_forbidden_chars" != x; then
28428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28432      # Going to short mode and back again did indeed matter. Since short mode is
28433      # case insensitive, let's make it lowercase to improve readability.
28434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28435      # Now convert it back to Unix-style (cygpath)
28436      input_path=`$CYGPATH -u "$shortmode_path"`
28437      new_path="$input_path"
28438    fi
28439  fi
28440
28441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28442  if test "x$test_cygdrive_prefix" = x; then
28443    # As a simple fix, exclude /usr/bin since it's not a real path.
28444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28446      # a path prefixed by /cygdrive for fixpath to work.
28447      new_path="$CYGWIN_ROOT_PATH$input_path"
28448    fi
28449  fi
28450
28451  # remove trailing .exe if any
28452  new_path="${new_path/%.exe/}"
28453
28454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28455
28456  # First separate the path from the arguments. This will split at the first
28457  # space.
28458  complete="$CC"
28459  path="${complete%% *}"
28460  tmp="$complete EOL"
28461  arguments="${tmp#* }"
28462
28463  # Input might be given as Windows format, start by converting to
28464  # unix format.
28465  new_path="$path"
28466
28467  windows_path="$new_path"
28468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28469    unix_path=`$CYGPATH -u "$windows_path"`
28470    new_path="$unix_path"
28471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28473    new_path="$unix_path"
28474  fi
28475
28476
28477  # Now try to locate executable using which
28478  new_path=`$WHICH "$new_path" 2> /dev/null`
28479
28480  if test "x$new_path" = x; then
28481    # Oops. Which didn't find the executable.
28482    # The splitting of arguments from the executable at a space might have been incorrect,
28483    # since paths with space are more likely in Windows. Give it another try with the whole
28484    # argument.
28485    path="$complete"
28486    arguments="EOL"
28487    new_path="$path"
28488
28489  windows_path="$new_path"
28490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28491    unix_path=`$CYGPATH -u "$windows_path"`
28492    new_path="$unix_path"
28493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28495    new_path="$unix_path"
28496  fi
28497
28498
28499    new_path=`$WHICH "$new_path" 2> /dev/null`
28500    # bat and cmd files are not always considered executable in MSYS causing which
28501    # to not find them
28502    if test "x$new_path" = x \
28503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28505      new_path="$path"
28506
28507  windows_path="$new_path"
28508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28509    unix_path=`$CYGPATH -u "$windows_path"`
28510    new_path="$unix_path"
28511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28513    new_path="$unix_path"
28514  fi
28515
28516    fi
28517
28518    if test "x$new_path" = x; then
28519      # It's still not found. Now this is an unrecoverable error.
28520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28521$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28522      has_space=`$ECHO "$complete" | $GREP " "`
28523      if test "x$has_space" != x; then
28524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28526      fi
28527      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28528    fi
28529  fi
28530
28531  # Now new_path has a complete unix path to the binary
28532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28533    # Keep paths in /bin as-is, but remove trailing .exe if any
28534    new_path="${new_path/%.exe/}"
28535    # Do not save /bin paths to all_fixpath_prefixes!
28536  else
28537    # Not in mixed or Windows style, start by that.
28538    new_path=`cmd //c echo $new_path`
28539
28540  input_path="$new_path"
28541  # Check if we need to convert this using DOS-style short mode. If the path
28542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28543  # take no chances and rewrite it.
28544  # Note: m4 eats our [], so we need to use [ and ] instead.
28545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28546  if test "x$has_forbidden_chars" != x; then
28547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28549  fi
28550
28551    # Output is in $new_path
28552
28553  windows_path="$new_path"
28554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28555    unix_path=`$CYGPATH -u "$windows_path"`
28556    new_path="$unix_path"
28557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28559    new_path="$unix_path"
28560  fi
28561
28562    # remove trailing .exe if any
28563    new_path="${new_path/%.exe/}"
28564
28565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28567  fi
28568
28569    else
28570      # We're on a unix platform. Hooray! :)
28571      # First separate the path from the arguments. This will split at the first
28572      # space.
28573      complete="$CC"
28574      path="${complete%% *}"
28575      tmp="$complete EOL"
28576      arguments="${tmp#* }"
28577
28578      # Cannot rely on the command "which" here since it doesn't always work.
28579      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28580      if test -z "$is_absolute_path"; then
28581        # Path to executable is not absolute. Find it.
28582        IFS_save="$IFS"
28583        IFS=:
28584        for p in $PATH; do
28585          if test -f "$p/$path" && test -x "$p/$path"; then
28586            new_path="$p/$path"
28587            break
28588          fi
28589        done
28590        IFS="$IFS_save"
28591      else
28592        # This is an absolute path, we can use it without further modifications.
28593        new_path="$path"
28594      fi
28595
28596      if test "x$new_path" = x; then
28597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28598$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28599        has_space=`$ECHO "$complete" | $GREP " "`
28600        if test "x$has_space" != x; then
28601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28603        fi
28604        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28605      fi
28606    fi
28607
28608    # Now join together the path and the arguments once again
28609    if test "x$arguments" != xEOL; then
28610      new_complete="$new_path ${arguments% *}"
28611    else
28612      new_complete="$new_path"
28613    fi
28614
28615    if test "x$complete" != "x$new_complete"; then
28616      CC="$new_complete"
28617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28618$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28619    fi
28620  fi
28621
28622  TEST_COMPILER="$CC"
28623  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28624  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28625  if test "x$OPENJDK_BUILD_OS" != xaix; then
28626    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28628$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28629
28630  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28631    # Follow a chain of symbolic links. Use readlink
28632    # where it exists, else fall back to horribly
28633    # complicated shell code.
28634    if test "x$READLINK_TESTED" != yes; then
28635      # On MacOSX there is a readlink tool with a different
28636      # purpose than the GNU readlink tool. Check the found readlink.
28637      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28638      if test "x$ISGNU" = x; then
28639        # A readlink that we do not know how to use.
28640        # Are there other non-GNU readlinks out there?
28641        READLINK_TESTED=yes
28642        READLINK=
28643      fi
28644    fi
28645
28646    if test "x$READLINK" != x; then
28647      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28648    else
28649      # Save the current directory for restoring afterwards
28650      STARTDIR=$PWD
28651      COUNTER=0
28652      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28653      sym_link_file=`$BASENAME $TEST_COMPILER`
28654      cd $sym_link_dir
28655      # Use -P flag to resolve symlinks in directories.
28656      cd `$THEPWDCMD -P`
28657      sym_link_dir=`$THEPWDCMD -P`
28658      # Resolve file symlinks
28659      while test $COUNTER -lt 20; do
28660        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28661        if test "x$ISLINK" == x; then
28662          # This is not a symbolic link! We are done!
28663          break
28664        fi
28665        # Again resolve directory symlinks since the target of the just found
28666        # link could be in a different directory
28667        cd `$DIRNAME $ISLINK`
28668        sym_link_dir=`$THEPWDCMD -P`
28669        sym_link_file=`$BASENAME $ISLINK`
28670        let COUNTER=COUNTER+1
28671      done
28672      cd $STARTDIR
28673      TEST_COMPILER=$sym_link_dir/$sym_link_file
28674    fi
28675  fi
28676
28677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28678$as_echo "$TEST_COMPILER" >&6; }
28679  fi
28680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28681$as_echo_n "checking if CC is disguised ccache... " >&6; }
28682
28683  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28684  if test "x$COMPILER_BASENAME" = "xccache"; then
28685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28686$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28687    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28688    # We want to control ccache invocation ourselves, so ignore this cc and try
28689    # searching again.
28690
28691    # Remove the path to the fake ccache cc from the PATH
28692    RETRY_COMPILER_SAVED_PATH="$PATH"
28693    COMPILER_DIRNAME=`$DIRNAME $CC`
28694    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28695
28696    # Try again looking for our compiler
28697    if test -n "$ac_tool_prefix"; then
28698  for ac_prog in $TOOLCHAIN_CC_BINARY
28699  do
28700    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28703$as_echo_n "checking for $ac_word... " >&6; }
28704if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28705  $as_echo_n "(cached) " >&6
28706else
28707  if test -n "$PROPER_COMPILER_CC"; then
28708  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28709else
28710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28711for as_dir in $PATH
28712do
28713  IFS=$as_save_IFS
28714  test -z "$as_dir" && as_dir=.
28715    for ac_exec_ext in '' $ac_executable_extensions; do
28716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28717    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28719    break 2
28720  fi
28721done
28722  done
28723IFS=$as_save_IFS
28724
28725fi
28726fi
28727PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28728if test -n "$PROPER_COMPILER_CC"; then
28729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28730$as_echo "$PROPER_COMPILER_CC" >&6; }
28731else
28732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28733$as_echo "no" >&6; }
28734fi
28735
28736
28737    test -n "$PROPER_COMPILER_CC" && break
28738  done
28739fi
28740if test -z "$PROPER_COMPILER_CC"; then
28741  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28742  for ac_prog in $TOOLCHAIN_CC_BINARY
28743do
28744  # Extract the first word of "$ac_prog", so it can be a program name with args.
28745set dummy $ac_prog; ac_word=$2
28746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28747$as_echo_n "checking for $ac_word... " >&6; }
28748if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28749  $as_echo_n "(cached) " >&6
28750else
28751  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28752  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28753else
28754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28755for as_dir in $PATH
28756do
28757  IFS=$as_save_IFS
28758  test -z "$as_dir" && as_dir=.
28759    for ac_exec_ext in '' $ac_executable_extensions; do
28760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28761    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28763    break 2
28764  fi
28765done
28766  done
28767IFS=$as_save_IFS
28768
28769fi
28770fi
28771ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28772if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28774$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28775else
28776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28777$as_echo "no" >&6; }
28778fi
28779
28780
28781  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28782done
28783
28784  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28785    PROPER_COMPILER_CC=""
28786  else
28787    case $cross_compiling:$ac_tool_warned in
28788yes:)
28789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28791ac_tool_warned=yes ;;
28792esac
28793    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28794  fi
28795fi
28796
28797
28798  # Only process if variable expands to non-empty
28799
28800  if test "x$PROPER_COMPILER_CC" != x; then
28801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28802
28803  # First separate the path from the arguments. This will split at the first
28804  # space.
28805  complete="$PROPER_COMPILER_CC"
28806  path="${complete%% *}"
28807  tmp="$complete EOL"
28808  arguments="${tmp#* }"
28809
28810  # Input might be given as Windows format, start by converting to
28811  # unix format.
28812  new_path=`$CYGPATH -u "$path"`
28813
28814  # Now try to locate executable using which
28815  new_path=`$WHICH "$new_path" 2> /dev/null`
28816  # bat and cmd files are not always considered executable in cygwin causing which
28817  # to not find them
28818  if test "x$new_path" = x \
28819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28821    new_path=`$CYGPATH -u "$path"`
28822  fi
28823  if test "x$new_path" = x; then
28824    # Oops. Which didn't find the executable.
28825    # The splitting of arguments from the executable at a space might have been incorrect,
28826    # since paths with space are more likely in Windows. Give it another try with the whole
28827    # argument.
28828    path="$complete"
28829    arguments="EOL"
28830    new_path=`$CYGPATH -u "$path"`
28831    new_path=`$WHICH "$new_path" 2> /dev/null`
28832    # bat and cmd files are not always considered executable in cygwin causing which
28833    # to not find them
28834    if test "x$new_path" = x \
28835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28837      new_path=`$CYGPATH -u "$path"`
28838    fi
28839    if test "x$new_path" = x; then
28840      # It's still not found. Now this is an unrecoverable error.
28841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28842$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28843      has_space=`$ECHO "$complete" | $GREP " "`
28844      if test "x$has_space" != x; then
28845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28847      fi
28848      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28849    fi
28850  fi
28851
28852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28855  # "foo.exe" is OK but "foo" is an error.
28856  #
28857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28858  # It is also a way to make sure we got the proper file name for the real test later on.
28859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28860  if test "x$test_shortpath" = x; then
28861    # Short path failed, file does not exist as specified.
28862    # Try adding .exe or .cmd
28863    if test -f "${new_path}.exe"; then
28864      input_to_shortpath="${new_path}.exe"
28865    elif test -f "${new_path}.cmd"; then
28866      input_to_shortpath="${new_path}.cmd"
28867    else
28868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28869$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28872      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28873    fi
28874  else
28875    input_to_shortpath="$new_path"
28876  fi
28877
28878  # Call helper function which possibly converts this using DOS-style short mode.
28879  # If so, the updated path is stored in $new_path.
28880  new_path="$input_to_shortpath"
28881
28882  input_path="$input_to_shortpath"
28883  # Check if we need to convert this using DOS-style short mode. If the path
28884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28885  # take no chances and rewrite it.
28886  # Note: m4 eats our [], so we need to use [ and ] instead.
28887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28888  if test "x$has_forbidden_chars" != x; then
28889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28893      # Going to short mode and back again did indeed matter. Since short mode is
28894      # case insensitive, let's make it lowercase to improve readability.
28895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28896      # Now convert it back to Unix-style (cygpath)
28897      input_path=`$CYGPATH -u "$shortmode_path"`
28898      new_path="$input_path"
28899    fi
28900  fi
28901
28902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28903  if test "x$test_cygdrive_prefix" = x; then
28904    # As a simple fix, exclude /usr/bin since it's not a real path.
28905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28907      # a path prefixed by /cygdrive for fixpath to work.
28908      new_path="$CYGWIN_ROOT_PATH$input_path"
28909    fi
28910  fi
28911
28912  # remove trailing .exe if any
28913  new_path="${new_path/%.exe/}"
28914
28915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28916
28917  # First separate the path from the arguments. This will split at the first
28918  # space.
28919  complete="$PROPER_COMPILER_CC"
28920  path="${complete%% *}"
28921  tmp="$complete EOL"
28922  arguments="${tmp#* }"
28923
28924  # Input might be given as Windows format, start by converting to
28925  # unix format.
28926  new_path="$path"
28927
28928  windows_path="$new_path"
28929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28930    unix_path=`$CYGPATH -u "$windows_path"`
28931    new_path="$unix_path"
28932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28934    new_path="$unix_path"
28935  fi
28936
28937
28938  # Now try to locate executable using which
28939  new_path=`$WHICH "$new_path" 2> /dev/null`
28940
28941  if test "x$new_path" = x; then
28942    # Oops. Which didn't find the executable.
28943    # The splitting of arguments from the executable at a space might have been incorrect,
28944    # since paths with space are more likely in Windows. Give it another try with the whole
28945    # argument.
28946    path="$complete"
28947    arguments="EOL"
28948    new_path="$path"
28949
28950  windows_path="$new_path"
28951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28952    unix_path=`$CYGPATH -u "$windows_path"`
28953    new_path="$unix_path"
28954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28956    new_path="$unix_path"
28957  fi
28958
28959
28960    new_path=`$WHICH "$new_path" 2> /dev/null`
28961    # bat and cmd files are not always considered executable in MSYS causing which
28962    # to not find them
28963    if test "x$new_path" = x \
28964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28966      new_path="$path"
28967
28968  windows_path="$new_path"
28969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28970    unix_path=`$CYGPATH -u "$windows_path"`
28971    new_path="$unix_path"
28972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28974    new_path="$unix_path"
28975  fi
28976
28977    fi
28978
28979    if test "x$new_path" = x; then
28980      # It's still not found. Now this is an unrecoverable error.
28981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28982$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28983      has_space=`$ECHO "$complete" | $GREP " "`
28984      if test "x$has_space" != x; then
28985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28987      fi
28988      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28989    fi
28990  fi
28991
28992  # Now new_path has a complete unix path to the binary
28993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28994    # Keep paths in /bin as-is, but remove trailing .exe if any
28995    new_path="${new_path/%.exe/}"
28996    # Do not save /bin paths to all_fixpath_prefixes!
28997  else
28998    # Not in mixed or Windows style, start by that.
28999    new_path=`cmd //c echo $new_path`
29000
29001  input_path="$new_path"
29002  # Check if we need to convert this using DOS-style short mode. If the path
29003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29004  # take no chances and rewrite it.
29005  # Note: m4 eats our [], so we need to use [ and ] instead.
29006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29007  if test "x$has_forbidden_chars" != x; then
29008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29010  fi
29011
29012    # Output is in $new_path
29013
29014  windows_path="$new_path"
29015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29016    unix_path=`$CYGPATH -u "$windows_path"`
29017    new_path="$unix_path"
29018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29020    new_path="$unix_path"
29021  fi
29022
29023    # remove trailing .exe if any
29024    new_path="${new_path/%.exe/}"
29025
29026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29028  fi
29029
29030    else
29031      # We're on a unix platform. Hooray! :)
29032      # First separate the path from the arguments. This will split at the first
29033      # space.
29034      complete="$PROPER_COMPILER_CC"
29035      path="${complete%% *}"
29036      tmp="$complete EOL"
29037      arguments="${tmp#* }"
29038
29039      # Cannot rely on the command "which" here since it doesn't always work.
29040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29041      if test -z "$is_absolute_path"; then
29042        # Path to executable is not absolute. Find it.
29043        IFS_save="$IFS"
29044        IFS=:
29045        for p in $PATH; do
29046          if test -f "$p/$path" && test -x "$p/$path"; then
29047            new_path="$p/$path"
29048            break
29049          fi
29050        done
29051        IFS="$IFS_save"
29052      else
29053        # This is an absolute path, we can use it without further modifications.
29054        new_path="$path"
29055      fi
29056
29057      if test "x$new_path" = x; then
29058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29059$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29060        has_space=`$ECHO "$complete" | $GREP " "`
29061        if test "x$has_space" != x; then
29062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29064        fi
29065        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29066      fi
29067    fi
29068
29069    # Now join together the path and the arguments once again
29070    if test "x$arguments" != xEOL; then
29071      new_complete="$new_path ${arguments% *}"
29072    else
29073      new_complete="$new_path"
29074    fi
29075
29076    if test "x$complete" != "x$new_complete"; then
29077      PROPER_COMPILER_CC="$new_complete"
29078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29079$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29080    fi
29081  fi
29082
29083    PATH="$RETRY_COMPILER_SAVED_PATH"
29084
29085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29086$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29087
29088  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29089    # Follow a chain of symbolic links. Use readlink
29090    # where it exists, else fall back to horribly
29091    # complicated shell code.
29092    if test "x$READLINK_TESTED" != yes; then
29093      # On MacOSX there is a readlink tool with a different
29094      # purpose than the GNU readlink tool. Check the found readlink.
29095      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29096      if test "x$ISGNU" = x; then
29097        # A readlink that we do not know how to use.
29098        # Are there other non-GNU readlinks out there?
29099        READLINK_TESTED=yes
29100        READLINK=
29101      fi
29102    fi
29103
29104    if test "x$READLINK" != x; then
29105      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29106    else
29107      # Save the current directory for restoring afterwards
29108      STARTDIR=$PWD
29109      COUNTER=0
29110      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29111      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29112      cd $sym_link_dir
29113      # Use -P flag to resolve symlinks in directories.
29114      cd `$THEPWDCMD -P`
29115      sym_link_dir=`$THEPWDCMD -P`
29116      # Resolve file symlinks
29117      while test $COUNTER -lt 20; do
29118        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29119        if test "x$ISLINK" == x; then
29120          # This is not a symbolic link! We are done!
29121          break
29122        fi
29123        # Again resolve directory symlinks since the target of the just found
29124        # link could be in a different directory
29125        cd `$DIRNAME $ISLINK`
29126        sym_link_dir=`$THEPWDCMD -P`
29127        sym_link_file=`$BASENAME $ISLINK`
29128        let COUNTER=COUNTER+1
29129      done
29130      cd $STARTDIR
29131      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29132    fi
29133  fi
29134
29135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29136$as_echo "$PROPER_COMPILER_CC" >&6; }
29137    CC="$PROPER_COMPILER_CC"
29138  else
29139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29140$as_echo "no, keeping CC" >&6; }
29141  fi
29142
29143
29144  COMPILER=$CC
29145  COMPILER_NAME=$COMPILER_NAME
29146
29147  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29148    # cc -V output typically looks like
29149    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29150    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29151    # Check that this is likely to be the Solaris Studio cc.
29152    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29153    if test $? -ne 0; then
29154      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29155      { $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
29156$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29157      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29158$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29160$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29161      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29162    fi
29163    # Remove usage instructions (if present), and
29164    # collapse compiler output into a single line
29165    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29166        $SED -e 's/ *[Uu]sage:.*//'`
29167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29168        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29169  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29170    # xlc -qversion output typically looks like
29171    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29172    #     Version: 11.01.0000.0015
29173    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29174    # Check that this is likely to be the IBM XL C compiler.
29175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29176    if test $? -ne 0; then
29177      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29178      { $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
29179$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29180      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29181$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29182      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29183$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29184      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29185    fi
29186    # Collapse compiler output into a single line
29187    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29188    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29189        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29190  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29191    # There is no specific version flag, but all output starts with a version string.
29192    # First line typically looks something like:
29193    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29194    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29195    # Check that this is likely to be Microsoft CL.EXE.
29196    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29197    if test $? -ne 0; then
29198      { $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
29199$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29200      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29201$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29202      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29203    fi
29204    # Collapse compiler output into a single line
29205    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29206    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29207        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29208  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29209    # gcc --version output typically looks like
29210    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29211    #     Copyright (C) 2013 Free Software Foundation, Inc.
29212    #     This is free software; see the source for copying conditions.  There is NO
29213    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29214    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29215    # Check that this is likely to be GCC.
29216    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29217    if test $? -ne 0; then
29218      { $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
29219$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29220      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29221$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29222      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29223    fi
29224    # Remove Copyright and legalese from version string, and
29225    # collapse into a single line
29226    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29227        $SED -e 's/ *Copyright .*//'`
29228    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29229        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29230  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29231    # clang --version output typically looks like
29232    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29233    #    clang version 3.3 (tags/RELEASE_33/final)
29234    # or
29235    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29236    #    Target: x86_64-pc-linux-gnu
29237    #    Thread model: posix
29238    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29239    # Check that this is likely to be clang
29240    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29241    if test $? -ne 0; then
29242      { $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
29243$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29244      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29245$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29246      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29247    fi
29248    # Collapse compiler output into a single line
29249    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29250    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29251        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29252  else
29253      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29254  fi
29255  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29256  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29257  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29258  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29259
29260  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29261$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29262
29263
29264  # Now that we have resolved CC ourself, let autoconf have its go at it
29265  ac_ext=c
29266ac_cpp='$CPP $CPPFLAGS'
29267ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29268ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29269ac_compiler_gnu=$ac_cv_c_compiler_gnu
29270if test -n "$ac_tool_prefix"; then
29271  for ac_prog in $CC
29272  do
29273    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29274set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29276$as_echo_n "checking for $ac_word... " >&6; }
29277if ${ac_cv_prog_CC+:} false; then :
29278  $as_echo_n "(cached) " >&6
29279else
29280  if test -n "$CC"; then
29281  ac_cv_prog_CC="$CC" # Let the user override the test.
29282else
29283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29284for as_dir in $PATH
29285do
29286  IFS=$as_save_IFS
29287  test -z "$as_dir" && as_dir=.
29288    for ac_exec_ext in '' $ac_executable_extensions; do
29289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29290    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29292    break 2
29293  fi
29294done
29295  done
29296IFS=$as_save_IFS
29297
29298fi
29299fi
29300CC=$ac_cv_prog_CC
29301if test -n "$CC"; then
29302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29303$as_echo "$CC" >&6; }
29304else
29305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29306$as_echo "no" >&6; }
29307fi
29308
29309
29310    test -n "$CC" && break
29311  done
29312fi
29313if test -z "$CC"; then
29314  ac_ct_CC=$CC
29315  for ac_prog in $CC
29316do
29317  # Extract the first word of "$ac_prog", so it can be a program name with args.
29318set dummy $ac_prog; ac_word=$2
29319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29320$as_echo_n "checking for $ac_word... " >&6; }
29321if ${ac_cv_prog_ac_ct_CC+:} false; then :
29322  $as_echo_n "(cached) " >&6
29323else
29324  if test -n "$ac_ct_CC"; then
29325  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29326else
29327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29328for as_dir in $PATH
29329do
29330  IFS=$as_save_IFS
29331  test -z "$as_dir" && as_dir=.
29332    for ac_exec_ext in '' $ac_executable_extensions; do
29333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29334    ac_cv_prog_ac_ct_CC="$ac_prog"
29335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29336    break 2
29337  fi
29338done
29339  done
29340IFS=$as_save_IFS
29341
29342fi
29343fi
29344ac_ct_CC=$ac_cv_prog_ac_ct_CC
29345if test -n "$ac_ct_CC"; then
29346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29347$as_echo "$ac_ct_CC" >&6; }
29348else
29349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29350$as_echo "no" >&6; }
29351fi
29352
29353
29354  test -n "$ac_ct_CC" && break
29355done
29356
29357  if test "x$ac_ct_CC" = x; then
29358    CC=""
29359  else
29360    case $cross_compiling:$ac_tool_warned in
29361yes:)
29362{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29363$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29364ac_tool_warned=yes ;;
29365esac
29366    CC=$ac_ct_CC
29367  fi
29368fi
29369
29370
29371test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29373as_fn_error $? "no acceptable C compiler found in \$PATH
29374See \`config.log' for more details" "$LINENO" 5; }
29375
29376# Provide some information about the compiler.
29377$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29378set X $ac_compile
29379ac_compiler=$2
29380for ac_option in --version -v -V -qversion; do
29381  { { ac_try="$ac_compiler $ac_option >&5"
29382case "(($ac_try" in
29383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29384  *) ac_try_echo=$ac_try;;
29385esac
29386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29387$as_echo "$ac_try_echo"; } >&5
29388  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29389  ac_status=$?
29390  if test -s conftest.err; then
29391    sed '10a\
29392... rest of stderr output deleted ...
29393         10q' conftest.err >conftest.er1
29394    cat conftest.er1 >&5
29395  fi
29396  rm -f conftest.er1 conftest.err
29397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29398  test $ac_status = 0; }
29399done
29400
29401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29402/* end confdefs.h.  */
29403
29404int
29405main ()
29406{
29407
29408  ;
29409  return 0;
29410}
29411_ACEOF
29412ac_clean_files_save=$ac_clean_files
29413ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29414# Try to create an executable without -o first, disregard a.out.
29415# It will help us diagnose broken compilers, and finding out an intuition
29416# of exeext.
29417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29418$as_echo_n "checking whether the C compiler works... " >&6; }
29419ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29420
29421# The possible output files:
29422ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29423
29424ac_rmfiles=
29425for ac_file in $ac_files
29426do
29427  case $ac_file in
29428    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29429    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29430  esac
29431done
29432rm -f $ac_rmfiles
29433
29434if { { ac_try="$ac_link_default"
29435case "(($ac_try" in
29436  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29437  *) ac_try_echo=$ac_try;;
29438esac
29439eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29440$as_echo "$ac_try_echo"; } >&5
29441  (eval "$ac_link_default") 2>&5
29442  ac_status=$?
29443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29444  test $ac_status = 0; }; then :
29445  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29446# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29447# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29448# so that the user can short-circuit this test for compilers unknown to
29449# Autoconf.
29450for ac_file in $ac_files ''
29451do
29452  test -f "$ac_file" || continue
29453  case $ac_file in
29454    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29455	;;
29456    [ab].out )
29457	# We found the default executable, but exeext='' is most
29458	# certainly right.
29459	break;;
29460    *.* )
29461	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29462	then :; else
29463	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29464	fi
29465	# We set ac_cv_exeext here because the later test for it is not
29466	# safe: cross compilers may not add the suffix if given an `-o'
29467	# argument, so we may need to know it at that point already.
29468	# Even if this section looks crufty: it has the advantage of
29469	# actually working.
29470	break;;
29471    * )
29472	break;;
29473  esac
29474done
29475test "$ac_cv_exeext" = no && ac_cv_exeext=
29476
29477else
29478  ac_file=''
29479fi
29480if test -z "$ac_file"; then :
29481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29482$as_echo "no" >&6; }
29483$as_echo "$as_me: failed program was:" >&5
29484sed 's/^/| /' conftest.$ac_ext >&5
29485
29486{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29488as_fn_error 77 "C compiler cannot create executables
29489See \`config.log' for more details" "$LINENO" 5; }
29490else
29491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29492$as_echo "yes" >&6; }
29493fi
29494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29495$as_echo_n "checking for C compiler default output file name... " >&6; }
29496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29497$as_echo "$ac_file" >&6; }
29498ac_exeext=$ac_cv_exeext
29499
29500rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29501ac_clean_files=$ac_clean_files_save
29502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29503$as_echo_n "checking for suffix of executables... " >&6; }
29504if { { ac_try="$ac_link"
29505case "(($ac_try" in
29506  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29507  *) ac_try_echo=$ac_try;;
29508esac
29509eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29510$as_echo "$ac_try_echo"; } >&5
29511  (eval "$ac_link") 2>&5
29512  ac_status=$?
29513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29514  test $ac_status = 0; }; then :
29515  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29516# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29517# work properly (i.e., refer to `conftest.exe'), while it won't with
29518# `rm'.
29519for ac_file in conftest.exe conftest conftest.*; do
29520  test -f "$ac_file" || continue
29521  case $ac_file in
29522    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29523    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29524	  break;;
29525    * ) break;;
29526  esac
29527done
29528else
29529  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29531as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29532See \`config.log' for more details" "$LINENO" 5; }
29533fi
29534rm -f conftest conftest$ac_cv_exeext
29535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29536$as_echo "$ac_cv_exeext" >&6; }
29537
29538rm -f conftest.$ac_ext
29539EXEEXT=$ac_cv_exeext
29540ac_exeext=$EXEEXT
29541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29542/* end confdefs.h.  */
29543#include <stdio.h>
29544int
29545main ()
29546{
29547FILE *f = fopen ("conftest.out", "w");
29548 return ferror (f) || fclose (f) != 0;
29549
29550  ;
29551  return 0;
29552}
29553_ACEOF
29554ac_clean_files="$ac_clean_files conftest.out"
29555# Check that the compiler produces executables we can run.  If not, either
29556# the compiler is broken, or we cross compile.
29557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29558$as_echo_n "checking whether we are cross compiling... " >&6; }
29559if test "$cross_compiling" != yes; then
29560  { { ac_try="$ac_link"
29561case "(($ac_try" in
29562  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29563  *) ac_try_echo=$ac_try;;
29564esac
29565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29566$as_echo "$ac_try_echo"; } >&5
29567  (eval "$ac_link") 2>&5
29568  ac_status=$?
29569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29570  test $ac_status = 0; }
29571  if { ac_try='./conftest$ac_cv_exeext'
29572  { { case "(($ac_try" in
29573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29574  *) ac_try_echo=$ac_try;;
29575esac
29576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29577$as_echo "$ac_try_echo"; } >&5
29578  (eval "$ac_try") 2>&5
29579  ac_status=$?
29580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29581  test $ac_status = 0; }; }; then
29582    cross_compiling=no
29583  else
29584    if test "$cross_compiling" = maybe; then
29585	cross_compiling=yes
29586    else
29587	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29589as_fn_error $? "cannot run C compiled programs.
29590If you meant to cross compile, use \`--host'.
29591See \`config.log' for more details" "$LINENO" 5; }
29592    fi
29593  fi
29594fi
29595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29596$as_echo "$cross_compiling" >&6; }
29597
29598rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29599ac_clean_files=$ac_clean_files_save
29600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29601$as_echo_n "checking for suffix of object files... " >&6; }
29602if ${ac_cv_objext+:} false; then :
29603  $as_echo_n "(cached) " >&6
29604else
29605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29606/* end confdefs.h.  */
29607
29608int
29609main ()
29610{
29611
29612  ;
29613  return 0;
29614}
29615_ACEOF
29616rm -f conftest.o conftest.obj
29617if { { ac_try="$ac_compile"
29618case "(($ac_try" in
29619  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29620  *) ac_try_echo=$ac_try;;
29621esac
29622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29623$as_echo "$ac_try_echo"; } >&5
29624  (eval "$ac_compile") 2>&5
29625  ac_status=$?
29626  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29627  test $ac_status = 0; }; then :
29628  for ac_file in conftest.o conftest.obj conftest.*; do
29629  test -f "$ac_file" || continue;
29630  case $ac_file in
29631    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29632    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29633       break;;
29634  esac
29635done
29636else
29637  $as_echo "$as_me: failed program was:" >&5
29638sed 's/^/| /' conftest.$ac_ext >&5
29639
29640{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29642as_fn_error $? "cannot compute suffix of object files: cannot compile
29643See \`config.log' for more details" "$LINENO" 5; }
29644fi
29645rm -f conftest.$ac_cv_objext conftest.$ac_ext
29646fi
29647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29648$as_echo "$ac_cv_objext" >&6; }
29649OBJEXT=$ac_cv_objext
29650ac_objext=$OBJEXT
29651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29652$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29653if ${ac_cv_c_compiler_gnu+:} false; then :
29654  $as_echo_n "(cached) " >&6
29655else
29656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29657/* end confdefs.h.  */
29658
29659int
29660main ()
29661{
29662#ifndef __GNUC__
29663       choke me
29664#endif
29665
29666  ;
29667  return 0;
29668}
29669_ACEOF
29670if ac_fn_c_try_compile "$LINENO"; then :
29671  ac_compiler_gnu=yes
29672else
29673  ac_compiler_gnu=no
29674fi
29675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29676ac_cv_c_compiler_gnu=$ac_compiler_gnu
29677
29678fi
29679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29680$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29681if test $ac_compiler_gnu = yes; then
29682  GCC=yes
29683else
29684  GCC=
29685fi
29686ac_test_CFLAGS=${CFLAGS+set}
29687ac_save_CFLAGS=$CFLAGS
29688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29689$as_echo_n "checking whether $CC accepts -g... " >&6; }
29690if ${ac_cv_prog_cc_g+:} false; then :
29691  $as_echo_n "(cached) " >&6
29692else
29693  ac_save_c_werror_flag=$ac_c_werror_flag
29694   ac_c_werror_flag=yes
29695   ac_cv_prog_cc_g=no
29696   CFLAGS="-g"
29697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29698/* end confdefs.h.  */
29699
29700int
29701main ()
29702{
29703
29704  ;
29705  return 0;
29706}
29707_ACEOF
29708if ac_fn_c_try_compile "$LINENO"; then :
29709  ac_cv_prog_cc_g=yes
29710else
29711  CFLAGS=""
29712      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29713/* end confdefs.h.  */
29714
29715int
29716main ()
29717{
29718
29719  ;
29720  return 0;
29721}
29722_ACEOF
29723if ac_fn_c_try_compile "$LINENO"; then :
29724
29725else
29726  ac_c_werror_flag=$ac_save_c_werror_flag
29727	 CFLAGS="-g"
29728	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29729/* end confdefs.h.  */
29730
29731int
29732main ()
29733{
29734
29735  ;
29736  return 0;
29737}
29738_ACEOF
29739if ac_fn_c_try_compile "$LINENO"; then :
29740  ac_cv_prog_cc_g=yes
29741fi
29742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29743fi
29744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29745fi
29746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29747   ac_c_werror_flag=$ac_save_c_werror_flag
29748fi
29749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29750$as_echo "$ac_cv_prog_cc_g" >&6; }
29751if test "$ac_test_CFLAGS" = set; then
29752  CFLAGS=$ac_save_CFLAGS
29753elif test $ac_cv_prog_cc_g = yes; then
29754  if test "$GCC" = yes; then
29755    CFLAGS="-g -O2"
29756  else
29757    CFLAGS="-g"
29758  fi
29759else
29760  if test "$GCC" = yes; then
29761    CFLAGS="-O2"
29762  else
29763    CFLAGS=
29764  fi
29765fi
29766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29767$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29768if ${ac_cv_prog_cc_c89+:} false; then :
29769  $as_echo_n "(cached) " >&6
29770else
29771  ac_cv_prog_cc_c89=no
29772ac_save_CC=$CC
29773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29774/* end confdefs.h.  */
29775#include <stdarg.h>
29776#include <stdio.h>
29777struct stat;
29778/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29779struct buf { int x; };
29780FILE * (*rcsopen) (struct buf *, struct stat *, int);
29781static char *e (p, i)
29782     char **p;
29783     int i;
29784{
29785  return p[i];
29786}
29787static char *f (char * (*g) (char **, int), char **p, ...)
29788{
29789  char *s;
29790  va_list v;
29791  va_start (v,p);
29792  s = g (p, va_arg (v,int));
29793  va_end (v);
29794  return s;
29795}
29796
29797/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29798   function prototypes and stuff, but not '\xHH' hex character constants.
29799   These don't provoke an error unfortunately, instead are silently treated
29800   as 'x'.  The following induces an error, until -std is added to get
29801   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29802   array size at least.  It's necessary to write '\x00'==0 to get something
29803   that's true only with -std.  */
29804int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29805
29806/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29807   inside strings and character constants.  */
29808#define FOO(x) 'x'
29809int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29810
29811int test (int i, double x);
29812struct s1 {int (*f) (int a);};
29813struct s2 {int (*f) (double a);};
29814int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29815int argc;
29816char **argv;
29817int
29818main ()
29819{
29820return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29821  ;
29822  return 0;
29823}
29824_ACEOF
29825for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29826	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29827do
29828  CC="$ac_save_CC $ac_arg"
29829  if ac_fn_c_try_compile "$LINENO"; then :
29830  ac_cv_prog_cc_c89=$ac_arg
29831fi
29832rm -f core conftest.err conftest.$ac_objext
29833  test "x$ac_cv_prog_cc_c89" != "xno" && break
29834done
29835rm -f conftest.$ac_ext
29836CC=$ac_save_CC
29837
29838fi
29839# AC_CACHE_VAL
29840case "x$ac_cv_prog_cc_c89" in
29841  x)
29842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29843$as_echo "none needed" >&6; } ;;
29844  xno)
29845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29846$as_echo "unsupported" >&6; } ;;
29847  *)
29848    CC="$CC $ac_cv_prog_cc_c89"
29849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29850$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29851esac
29852if test "x$ac_cv_prog_cc_c89" != xno; then :
29853
29854fi
29855
29856ac_ext=cpp
29857ac_cpp='$CXXCPP $CPPFLAGS'
29858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29861
29862
29863
29864  COMPILER_NAME=C++
29865  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29866
29867  if test "x$CXX" != x; then
29868    # User has supplied compiler name already, always let that override.
29869    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29870$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29871    if test "x`basename $CXX`" = "x$CXX"; then
29872      # A command without a complete path is provided, search $PATH.
29873
29874      for ac_prog in $CXX
29875do
29876  # Extract the first word of "$ac_prog", so it can be a program name with args.
29877set dummy $ac_prog; ac_word=$2
29878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29879$as_echo_n "checking for $ac_word... " >&6; }
29880if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29881  $as_echo_n "(cached) " >&6
29882else
29883  case $POTENTIAL_CXX in
29884  [\\/]* | ?:[\\/]*)
29885  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29886  ;;
29887  *)
29888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29889for as_dir in $PATH
29890do
29891  IFS=$as_save_IFS
29892  test -z "$as_dir" && as_dir=.
29893    for ac_exec_ext in '' $ac_executable_extensions; do
29894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29895    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29897    break 2
29898  fi
29899done
29900  done
29901IFS=$as_save_IFS
29902
29903  ;;
29904esac
29905fi
29906POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29907if test -n "$POTENTIAL_CXX"; then
29908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29909$as_echo "$POTENTIAL_CXX" >&6; }
29910else
29911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29912$as_echo "no" >&6; }
29913fi
29914
29915
29916  test -n "$POTENTIAL_CXX" && break
29917done
29918
29919      if test "x$POTENTIAL_CXX" != x; then
29920        CXX=$POTENTIAL_CXX
29921      else
29922        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29923      fi
29924    else
29925      # Otherwise it might already be a complete path
29926      if test ! -x "$CXX"; then
29927        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29928      fi
29929    fi
29930  else
29931    # No user supplied value. Locate compiler ourselves.
29932
29933    # If we are cross compiling, assume cross compilation tools follows the
29934    # cross compilation standard where they are prefixed with the autoconf
29935    # standard name for the target. For example the binary
29936    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29937    # If we are not cross compiling, then the default compiler name will be
29938    # used.
29939
29940    CXX=
29941    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29942    # before checking the rest of the PATH.
29943    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29944    # step, this should not be necessary.
29945    if test -n "$TOOLCHAIN_PATH"; then
29946      PATH_save="$PATH"
29947      PATH="$TOOLCHAIN_PATH"
29948      for ac_prog in $SEARCH_LIST
29949do
29950  # Extract the first word of "$ac_prog", so it can be a program name with args.
29951set dummy $ac_prog; ac_word=$2
29952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29953$as_echo_n "checking for $ac_word... " >&6; }
29954if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29955  $as_echo_n "(cached) " >&6
29956else
29957  case $TOOLCHAIN_PATH_CXX in
29958  [\\/]* | ?:[\\/]*)
29959  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29960  ;;
29961  *)
29962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29963for as_dir in $PATH
29964do
29965  IFS=$as_save_IFS
29966  test -z "$as_dir" && as_dir=.
29967    for ac_exec_ext in '' $ac_executable_extensions; do
29968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29969    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29971    break 2
29972  fi
29973done
29974  done
29975IFS=$as_save_IFS
29976
29977  ;;
29978esac
29979fi
29980TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29981if test -n "$TOOLCHAIN_PATH_CXX"; then
29982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29983$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29984else
29985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29986$as_echo "no" >&6; }
29987fi
29988
29989
29990  test -n "$TOOLCHAIN_PATH_CXX" && break
29991done
29992
29993      CXX=$TOOLCHAIN_PATH_CXX
29994      PATH="$PATH_save"
29995    fi
29996
29997    # AC_PATH_PROGS can't be run multiple times with the same variable,
29998    # so create a new name for this run.
29999    if test "x$CXX" = x; then
30000      for ac_prog in $SEARCH_LIST
30001do
30002  # Extract the first word of "$ac_prog", so it can be a program name with args.
30003set dummy $ac_prog; ac_word=$2
30004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30005$as_echo_n "checking for $ac_word... " >&6; }
30006if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30007  $as_echo_n "(cached) " >&6
30008else
30009  case $POTENTIAL_CXX in
30010  [\\/]* | ?:[\\/]*)
30011  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30012  ;;
30013  *)
30014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30015for as_dir in $PATH
30016do
30017  IFS=$as_save_IFS
30018  test -z "$as_dir" && as_dir=.
30019    for ac_exec_ext in '' $ac_executable_extensions; do
30020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30021    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30023    break 2
30024  fi
30025done
30026  done
30027IFS=$as_save_IFS
30028
30029  ;;
30030esac
30031fi
30032POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30033if test -n "$POTENTIAL_CXX"; then
30034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30035$as_echo "$POTENTIAL_CXX" >&6; }
30036else
30037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30038$as_echo "no" >&6; }
30039fi
30040
30041
30042  test -n "$POTENTIAL_CXX" && break
30043done
30044
30045      CXX=$POTENTIAL_CXX
30046    fi
30047
30048    if test "x$CXX" = x; then
30049
30050  # Print a helpful message on how to acquire the necessary build dependency.
30051  # devkit is the help tag: freetype, cups, pulse, alsa etc
30052  MISSING_DEPENDENCY=devkit
30053
30054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30055    cygwin_help $MISSING_DEPENDENCY
30056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30057    msys_help $MISSING_DEPENDENCY
30058  else
30059    PKGHANDLER_COMMAND=
30060
30061    case $PKGHANDLER in
30062      apt-get)
30063        apt_help     $MISSING_DEPENDENCY ;;
30064      yum)
30065        yum_help     $MISSING_DEPENDENCY ;;
30066      port)
30067        port_help    $MISSING_DEPENDENCY ;;
30068      pkgutil)
30069        pkgutil_help $MISSING_DEPENDENCY ;;
30070      pkgadd)
30071        pkgadd_help  $MISSING_DEPENDENCY ;;
30072    esac
30073
30074    if test "x$PKGHANDLER_COMMAND" != x; then
30075      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30076    fi
30077  fi
30078
30079      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30080    fi
30081  fi
30082
30083  # Now we have a compiler binary in CXX. Make sure it's okay.
30084
30085  # Only process if variable expands to non-empty
30086
30087  if test "x$CXX" != x; then
30088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30089
30090  # First separate the path from the arguments. This will split at the first
30091  # space.
30092  complete="$CXX"
30093  path="${complete%% *}"
30094  tmp="$complete EOL"
30095  arguments="${tmp#* }"
30096
30097  # Input might be given as Windows format, start by converting to
30098  # unix format.
30099  new_path=`$CYGPATH -u "$path"`
30100
30101  # Now try to locate executable using which
30102  new_path=`$WHICH "$new_path" 2> /dev/null`
30103  # bat and cmd files are not always considered executable in cygwin causing which
30104  # to not find them
30105  if test "x$new_path" = x \
30106      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30107      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30108    new_path=`$CYGPATH -u "$path"`
30109  fi
30110  if test "x$new_path" = x; then
30111    # Oops. Which didn't find the executable.
30112    # The splitting of arguments from the executable at a space might have been incorrect,
30113    # since paths with space are more likely in Windows. Give it another try with the whole
30114    # argument.
30115    path="$complete"
30116    arguments="EOL"
30117    new_path=`$CYGPATH -u "$path"`
30118    new_path=`$WHICH "$new_path" 2> /dev/null`
30119    # bat and cmd files are not always considered executable in cygwin causing which
30120    # to not find them
30121    if test "x$new_path" = x \
30122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30124      new_path=`$CYGPATH -u "$path"`
30125    fi
30126    if test "x$new_path" = x; then
30127      # It's still not found. Now this is an unrecoverable error.
30128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30129$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30130      has_space=`$ECHO "$complete" | $GREP " "`
30131      if test "x$has_space" != x; then
30132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30134      fi
30135      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30136    fi
30137  fi
30138
30139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30142  # "foo.exe" is OK but "foo" is an error.
30143  #
30144  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30145  # It is also a way to make sure we got the proper file name for the real test later on.
30146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30147  if test "x$test_shortpath" = x; then
30148    # Short path failed, file does not exist as specified.
30149    # Try adding .exe or .cmd
30150    if test -f "${new_path}.exe"; then
30151      input_to_shortpath="${new_path}.exe"
30152    elif test -f "${new_path}.cmd"; then
30153      input_to_shortpath="${new_path}.cmd"
30154    else
30155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30156$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30157      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30158$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30159      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30160    fi
30161  else
30162    input_to_shortpath="$new_path"
30163  fi
30164
30165  # Call helper function which possibly converts this using DOS-style short mode.
30166  # If so, the updated path is stored in $new_path.
30167  new_path="$input_to_shortpath"
30168
30169  input_path="$input_to_shortpath"
30170  # Check if we need to convert this using DOS-style short mode. If the path
30171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30172  # take no chances and rewrite it.
30173  # Note: m4 eats our [], so we need to use [ and ] instead.
30174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30175  if test "x$has_forbidden_chars" != x; then
30176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30180      # Going to short mode and back again did indeed matter. Since short mode is
30181      # case insensitive, let's make it lowercase to improve readability.
30182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30183      # Now convert it back to Unix-style (cygpath)
30184      input_path=`$CYGPATH -u "$shortmode_path"`
30185      new_path="$input_path"
30186    fi
30187  fi
30188
30189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30190  if test "x$test_cygdrive_prefix" = x; then
30191    # As a simple fix, exclude /usr/bin since it's not a real path.
30192    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30194      # a path prefixed by /cygdrive for fixpath to work.
30195      new_path="$CYGWIN_ROOT_PATH$input_path"
30196    fi
30197  fi
30198
30199  # remove trailing .exe if any
30200  new_path="${new_path/%.exe/}"
30201
30202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30203
30204  # First separate the path from the arguments. This will split at the first
30205  # space.
30206  complete="$CXX"
30207  path="${complete%% *}"
30208  tmp="$complete EOL"
30209  arguments="${tmp#* }"
30210
30211  # Input might be given as Windows format, start by converting to
30212  # unix format.
30213  new_path="$path"
30214
30215  windows_path="$new_path"
30216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30217    unix_path=`$CYGPATH -u "$windows_path"`
30218    new_path="$unix_path"
30219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30221    new_path="$unix_path"
30222  fi
30223
30224
30225  # Now try to locate executable using which
30226  new_path=`$WHICH "$new_path" 2> /dev/null`
30227
30228  if test "x$new_path" = x; then
30229    # Oops. Which didn't find the executable.
30230    # The splitting of arguments from the executable at a space might have been incorrect,
30231    # since paths with space are more likely in Windows. Give it another try with the whole
30232    # argument.
30233    path="$complete"
30234    arguments="EOL"
30235    new_path="$path"
30236
30237  windows_path="$new_path"
30238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30239    unix_path=`$CYGPATH -u "$windows_path"`
30240    new_path="$unix_path"
30241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30243    new_path="$unix_path"
30244  fi
30245
30246
30247    new_path=`$WHICH "$new_path" 2> /dev/null`
30248    # bat and cmd files are not always considered executable in MSYS causing which
30249    # to not find them
30250    if test "x$new_path" = x \
30251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30253      new_path="$path"
30254
30255  windows_path="$new_path"
30256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30257    unix_path=`$CYGPATH -u "$windows_path"`
30258    new_path="$unix_path"
30259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30261    new_path="$unix_path"
30262  fi
30263
30264    fi
30265
30266    if test "x$new_path" = x; then
30267      # It's still not found. Now this is an unrecoverable error.
30268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30269$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30270      has_space=`$ECHO "$complete" | $GREP " "`
30271      if test "x$has_space" != x; then
30272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30274      fi
30275      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30276    fi
30277  fi
30278
30279  # Now new_path has a complete unix path to the binary
30280  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30281    # Keep paths in /bin as-is, but remove trailing .exe if any
30282    new_path="${new_path/%.exe/}"
30283    # Do not save /bin paths to all_fixpath_prefixes!
30284  else
30285    # Not in mixed or Windows style, start by that.
30286    new_path=`cmd //c echo $new_path`
30287
30288  input_path="$new_path"
30289  # Check if we need to convert this using DOS-style short mode. If the path
30290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30291  # take no chances and rewrite it.
30292  # Note: m4 eats our [], so we need to use [ and ] instead.
30293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30294  if test "x$has_forbidden_chars" != x; then
30295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30297  fi
30298
30299    # Output is in $new_path
30300
30301  windows_path="$new_path"
30302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30303    unix_path=`$CYGPATH -u "$windows_path"`
30304    new_path="$unix_path"
30305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30307    new_path="$unix_path"
30308  fi
30309
30310    # remove trailing .exe if any
30311    new_path="${new_path/%.exe/}"
30312
30313    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30314    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30315  fi
30316
30317    else
30318      # We're on a unix platform. Hooray! :)
30319      # First separate the path from the arguments. This will split at the first
30320      # space.
30321      complete="$CXX"
30322      path="${complete%% *}"
30323      tmp="$complete EOL"
30324      arguments="${tmp#* }"
30325
30326      # Cannot rely on the command "which" here since it doesn't always work.
30327      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30328      if test -z "$is_absolute_path"; then
30329        # Path to executable is not absolute. Find it.
30330        IFS_save="$IFS"
30331        IFS=:
30332        for p in $PATH; do
30333          if test -f "$p/$path" && test -x "$p/$path"; then
30334            new_path="$p/$path"
30335            break
30336          fi
30337        done
30338        IFS="$IFS_save"
30339      else
30340        # This is an absolute path, we can use it without further modifications.
30341        new_path="$path"
30342      fi
30343
30344      if test "x$new_path" = x; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30346$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30347        has_space=`$ECHO "$complete" | $GREP " "`
30348        if test "x$has_space" != x; then
30349          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30350$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30351        fi
30352        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30353      fi
30354    fi
30355
30356    # Now join together the path and the arguments once again
30357    if test "x$arguments" != xEOL; then
30358      new_complete="$new_path ${arguments% *}"
30359    else
30360      new_complete="$new_path"
30361    fi
30362
30363    if test "x$complete" != "x$new_complete"; then
30364      CXX="$new_complete"
30365      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30366$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30367    fi
30368  fi
30369
30370  TEST_COMPILER="$CXX"
30371  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30372  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30373  if test "x$OPENJDK_BUILD_OS" != xaix; then
30374    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30376$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30377
30378  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30379    # Follow a chain of symbolic links. Use readlink
30380    # where it exists, else fall back to horribly
30381    # complicated shell code.
30382    if test "x$READLINK_TESTED" != yes; then
30383      # On MacOSX there is a readlink tool with a different
30384      # purpose than the GNU readlink tool. Check the found readlink.
30385      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30386      if test "x$ISGNU" = x; then
30387        # A readlink that we do not know how to use.
30388        # Are there other non-GNU readlinks out there?
30389        READLINK_TESTED=yes
30390        READLINK=
30391      fi
30392    fi
30393
30394    if test "x$READLINK" != x; then
30395      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30396    else
30397      # Save the current directory for restoring afterwards
30398      STARTDIR=$PWD
30399      COUNTER=0
30400      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30401      sym_link_file=`$BASENAME $TEST_COMPILER`
30402      cd $sym_link_dir
30403      # Use -P flag to resolve symlinks in directories.
30404      cd `$THEPWDCMD -P`
30405      sym_link_dir=`$THEPWDCMD -P`
30406      # Resolve file symlinks
30407      while test $COUNTER -lt 20; do
30408        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30409        if test "x$ISLINK" == x; then
30410          # This is not a symbolic link! We are done!
30411          break
30412        fi
30413        # Again resolve directory symlinks since the target of the just found
30414        # link could be in a different directory
30415        cd `$DIRNAME $ISLINK`
30416        sym_link_dir=`$THEPWDCMD -P`
30417        sym_link_file=`$BASENAME $ISLINK`
30418        let COUNTER=COUNTER+1
30419      done
30420      cd $STARTDIR
30421      TEST_COMPILER=$sym_link_dir/$sym_link_file
30422    fi
30423  fi
30424
30425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30426$as_echo "$TEST_COMPILER" >&6; }
30427  fi
30428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30429$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30430
30431  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30432  if test "x$COMPILER_BASENAME" = "xccache"; then
30433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30434$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30435    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30436    # We want to control ccache invocation ourselves, so ignore this cc and try
30437    # searching again.
30438
30439    # Remove the path to the fake ccache cc from the PATH
30440    RETRY_COMPILER_SAVED_PATH="$PATH"
30441    COMPILER_DIRNAME=`$DIRNAME $CXX`
30442    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30443
30444    # Try again looking for our compiler
30445    if test -n "$ac_tool_prefix"; then
30446  for ac_prog in $TOOLCHAIN_CXX_BINARY
30447  do
30448    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30451$as_echo_n "checking for $ac_word... " >&6; }
30452if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30453  $as_echo_n "(cached) " >&6
30454else
30455  if test -n "$PROPER_COMPILER_CXX"; then
30456  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30457else
30458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30459for as_dir in $PATH
30460do
30461  IFS=$as_save_IFS
30462  test -z "$as_dir" && as_dir=.
30463    for ac_exec_ext in '' $ac_executable_extensions; do
30464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30465    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30467    break 2
30468  fi
30469done
30470  done
30471IFS=$as_save_IFS
30472
30473fi
30474fi
30475PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30476if test -n "$PROPER_COMPILER_CXX"; then
30477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30478$as_echo "$PROPER_COMPILER_CXX" >&6; }
30479else
30480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30481$as_echo "no" >&6; }
30482fi
30483
30484
30485    test -n "$PROPER_COMPILER_CXX" && break
30486  done
30487fi
30488if test -z "$PROPER_COMPILER_CXX"; then
30489  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30490  for ac_prog in $TOOLCHAIN_CXX_BINARY
30491do
30492  # Extract the first word of "$ac_prog", so it can be a program name with args.
30493set dummy $ac_prog; ac_word=$2
30494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30495$as_echo_n "checking for $ac_word... " >&6; }
30496if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30497  $as_echo_n "(cached) " >&6
30498else
30499  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30500  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30501else
30502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30503for as_dir in $PATH
30504do
30505  IFS=$as_save_IFS
30506  test -z "$as_dir" && as_dir=.
30507    for ac_exec_ext in '' $ac_executable_extensions; do
30508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30509    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30511    break 2
30512  fi
30513done
30514  done
30515IFS=$as_save_IFS
30516
30517fi
30518fi
30519ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30520if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30522$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30523else
30524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30525$as_echo "no" >&6; }
30526fi
30527
30528
30529  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30530done
30531
30532  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30533    PROPER_COMPILER_CXX=""
30534  else
30535    case $cross_compiling:$ac_tool_warned in
30536yes:)
30537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30539ac_tool_warned=yes ;;
30540esac
30541    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30542  fi
30543fi
30544
30545
30546  # Only process if variable expands to non-empty
30547
30548  if test "x$PROPER_COMPILER_CXX" != x; then
30549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30550
30551  # First separate the path from the arguments. This will split at the first
30552  # space.
30553  complete="$PROPER_COMPILER_CXX"
30554  path="${complete%% *}"
30555  tmp="$complete EOL"
30556  arguments="${tmp#* }"
30557
30558  # Input might be given as Windows format, start by converting to
30559  # unix format.
30560  new_path=`$CYGPATH -u "$path"`
30561
30562  # Now try to locate executable using which
30563  new_path=`$WHICH "$new_path" 2> /dev/null`
30564  # bat and cmd files are not always considered executable in cygwin causing which
30565  # to not find them
30566  if test "x$new_path" = x \
30567      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30568      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30569    new_path=`$CYGPATH -u "$path"`
30570  fi
30571  if test "x$new_path" = x; then
30572    # Oops. Which didn't find the executable.
30573    # The splitting of arguments from the executable at a space might have been incorrect,
30574    # since paths with space are more likely in Windows. Give it another try with the whole
30575    # argument.
30576    path="$complete"
30577    arguments="EOL"
30578    new_path=`$CYGPATH -u "$path"`
30579    new_path=`$WHICH "$new_path" 2> /dev/null`
30580    # bat and cmd files are not always considered executable in cygwin causing which
30581    # to not find them
30582    if test "x$new_path" = x \
30583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30585      new_path=`$CYGPATH -u "$path"`
30586    fi
30587    if test "x$new_path" = x; then
30588      # It's still not found. Now this is an unrecoverable error.
30589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30590$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30591      has_space=`$ECHO "$complete" | $GREP " "`
30592      if test "x$has_space" != x; then
30593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30595      fi
30596      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30597    fi
30598  fi
30599
30600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30603  # "foo.exe" is OK but "foo" is an error.
30604  #
30605  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30606  # It is also a way to make sure we got the proper file name for the real test later on.
30607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30608  if test "x$test_shortpath" = x; then
30609    # Short path failed, file does not exist as specified.
30610    # Try adding .exe or .cmd
30611    if test -f "${new_path}.exe"; then
30612      input_to_shortpath="${new_path}.exe"
30613    elif test -f "${new_path}.cmd"; then
30614      input_to_shortpath="${new_path}.cmd"
30615    else
30616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30617$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30618      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30619$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30620      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30621    fi
30622  else
30623    input_to_shortpath="$new_path"
30624  fi
30625
30626  # Call helper function which possibly converts this using DOS-style short mode.
30627  # If so, the updated path is stored in $new_path.
30628  new_path="$input_to_shortpath"
30629
30630  input_path="$input_to_shortpath"
30631  # Check if we need to convert this using DOS-style short mode. If the path
30632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30633  # take no chances and rewrite it.
30634  # Note: m4 eats our [], so we need to use [ and ] instead.
30635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30636  if test "x$has_forbidden_chars" != x; then
30637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30641      # Going to short mode and back again did indeed matter. Since short mode is
30642      # case insensitive, let's make it lowercase to improve readability.
30643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30644      # Now convert it back to Unix-style (cygpath)
30645      input_path=`$CYGPATH -u "$shortmode_path"`
30646      new_path="$input_path"
30647    fi
30648  fi
30649
30650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30651  if test "x$test_cygdrive_prefix" = x; then
30652    # As a simple fix, exclude /usr/bin since it's not a real path.
30653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30655      # a path prefixed by /cygdrive for fixpath to work.
30656      new_path="$CYGWIN_ROOT_PATH$input_path"
30657    fi
30658  fi
30659
30660  # remove trailing .exe if any
30661  new_path="${new_path/%.exe/}"
30662
30663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30664
30665  # First separate the path from the arguments. This will split at the first
30666  # space.
30667  complete="$PROPER_COMPILER_CXX"
30668  path="${complete%% *}"
30669  tmp="$complete EOL"
30670  arguments="${tmp#* }"
30671
30672  # Input might be given as Windows format, start by converting to
30673  # unix format.
30674  new_path="$path"
30675
30676  windows_path="$new_path"
30677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30678    unix_path=`$CYGPATH -u "$windows_path"`
30679    new_path="$unix_path"
30680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30682    new_path="$unix_path"
30683  fi
30684
30685
30686  # Now try to locate executable using which
30687  new_path=`$WHICH "$new_path" 2> /dev/null`
30688
30689  if test "x$new_path" = x; then
30690    # Oops. Which didn't find the executable.
30691    # The splitting of arguments from the executable at a space might have been incorrect,
30692    # since paths with space are more likely in Windows. Give it another try with the whole
30693    # argument.
30694    path="$complete"
30695    arguments="EOL"
30696    new_path="$path"
30697
30698  windows_path="$new_path"
30699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30700    unix_path=`$CYGPATH -u "$windows_path"`
30701    new_path="$unix_path"
30702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30704    new_path="$unix_path"
30705  fi
30706
30707
30708    new_path=`$WHICH "$new_path" 2> /dev/null`
30709    # bat and cmd files are not always considered executable in MSYS causing which
30710    # to not find them
30711    if test "x$new_path" = x \
30712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30714      new_path="$path"
30715
30716  windows_path="$new_path"
30717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30718    unix_path=`$CYGPATH -u "$windows_path"`
30719    new_path="$unix_path"
30720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30722    new_path="$unix_path"
30723  fi
30724
30725    fi
30726
30727    if test "x$new_path" = x; then
30728      # It's still not found. Now this is an unrecoverable error.
30729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30730$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30731      has_space=`$ECHO "$complete" | $GREP " "`
30732      if test "x$has_space" != x; then
30733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30735      fi
30736      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30737    fi
30738  fi
30739
30740  # Now new_path has a complete unix path to the binary
30741  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30742    # Keep paths in /bin as-is, but remove trailing .exe if any
30743    new_path="${new_path/%.exe/}"
30744    # Do not save /bin paths to all_fixpath_prefixes!
30745  else
30746    # Not in mixed or Windows style, start by that.
30747    new_path=`cmd //c echo $new_path`
30748
30749  input_path="$new_path"
30750  # Check if we need to convert this using DOS-style short mode. If the path
30751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30752  # take no chances and rewrite it.
30753  # Note: m4 eats our [], so we need to use [ and ] instead.
30754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30755  if test "x$has_forbidden_chars" != x; then
30756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30758  fi
30759
30760    # Output is in $new_path
30761
30762  windows_path="$new_path"
30763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30764    unix_path=`$CYGPATH -u "$windows_path"`
30765    new_path="$unix_path"
30766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30768    new_path="$unix_path"
30769  fi
30770
30771    # remove trailing .exe if any
30772    new_path="${new_path/%.exe/}"
30773
30774    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30775    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30776  fi
30777
30778    else
30779      # We're on a unix platform. Hooray! :)
30780      # First separate the path from the arguments. This will split at the first
30781      # space.
30782      complete="$PROPER_COMPILER_CXX"
30783      path="${complete%% *}"
30784      tmp="$complete EOL"
30785      arguments="${tmp#* }"
30786
30787      # Cannot rely on the command "which" here since it doesn't always work.
30788      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30789      if test -z "$is_absolute_path"; then
30790        # Path to executable is not absolute. Find it.
30791        IFS_save="$IFS"
30792        IFS=:
30793        for p in $PATH; do
30794          if test -f "$p/$path" && test -x "$p/$path"; then
30795            new_path="$p/$path"
30796            break
30797          fi
30798        done
30799        IFS="$IFS_save"
30800      else
30801        # This is an absolute path, we can use it without further modifications.
30802        new_path="$path"
30803      fi
30804
30805      if test "x$new_path" = x; then
30806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30807$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30808        has_space=`$ECHO "$complete" | $GREP " "`
30809        if test "x$has_space" != x; then
30810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30812        fi
30813        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30814      fi
30815    fi
30816
30817    # Now join together the path and the arguments once again
30818    if test "x$arguments" != xEOL; then
30819      new_complete="$new_path ${arguments% *}"
30820    else
30821      new_complete="$new_path"
30822    fi
30823
30824    if test "x$complete" != "x$new_complete"; then
30825      PROPER_COMPILER_CXX="$new_complete"
30826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30827$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30828    fi
30829  fi
30830
30831    PATH="$RETRY_COMPILER_SAVED_PATH"
30832
30833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30834$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30835
30836  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30837    # Follow a chain of symbolic links. Use readlink
30838    # where it exists, else fall back to horribly
30839    # complicated shell code.
30840    if test "x$READLINK_TESTED" != yes; then
30841      # On MacOSX there is a readlink tool with a different
30842      # purpose than the GNU readlink tool. Check the found readlink.
30843      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30844      if test "x$ISGNU" = x; then
30845        # A readlink that we do not know how to use.
30846        # Are there other non-GNU readlinks out there?
30847        READLINK_TESTED=yes
30848        READLINK=
30849      fi
30850    fi
30851
30852    if test "x$READLINK" != x; then
30853      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30854    else
30855      # Save the current directory for restoring afterwards
30856      STARTDIR=$PWD
30857      COUNTER=0
30858      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30859      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30860      cd $sym_link_dir
30861      # Use -P flag to resolve symlinks in directories.
30862      cd `$THEPWDCMD -P`
30863      sym_link_dir=`$THEPWDCMD -P`
30864      # Resolve file symlinks
30865      while test $COUNTER -lt 20; do
30866        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30867        if test "x$ISLINK" == x; then
30868          # This is not a symbolic link! We are done!
30869          break
30870        fi
30871        # Again resolve directory symlinks since the target of the just found
30872        # link could be in a different directory
30873        cd `$DIRNAME $ISLINK`
30874        sym_link_dir=`$THEPWDCMD -P`
30875        sym_link_file=`$BASENAME $ISLINK`
30876        let COUNTER=COUNTER+1
30877      done
30878      cd $STARTDIR
30879      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30880    fi
30881  fi
30882
30883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30884$as_echo "$PROPER_COMPILER_CXX" >&6; }
30885    CXX="$PROPER_COMPILER_CXX"
30886  else
30887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30888$as_echo "no, keeping CXX" >&6; }
30889  fi
30890
30891
30892  COMPILER=$CXX
30893  COMPILER_NAME=$COMPILER_NAME
30894
30895  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30896    # cc -V output typically looks like
30897    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30898    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30899    # Check that this is likely to be the Solaris Studio cc.
30900    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30901    if test $? -ne 0; then
30902      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30903      { $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
30904$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30905      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30906$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30907      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30908$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30909      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30910    fi
30911    # Remove usage instructions (if present), and
30912    # collapse compiler output into a single line
30913    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30914        $SED -e 's/ *[Uu]sage:.*//'`
30915    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30916        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30917  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30918    # xlc -qversion output typically looks like
30919    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30920    #     Version: 11.01.0000.0015
30921    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30922    # Check that this is likely to be the IBM XL C compiler.
30923    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30924    if test $? -ne 0; then
30925      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30926      { $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
30927$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30928      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30929$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30930      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30931$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30932      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30933    fi
30934    # Collapse compiler output into a single line
30935    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30936    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30937        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30938  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30939    # There is no specific version flag, but all output starts with a version string.
30940    # First line typically looks something like:
30941    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30942    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30943    # Check that this is likely to be Microsoft CL.EXE.
30944    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30945    if test $? -ne 0; then
30946      { $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
30947$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30948      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30949$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30950      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30951    fi
30952    # Collapse compiler output into a single line
30953    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30954    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30955        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30956  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30957    # gcc --version output typically looks like
30958    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30959    #     Copyright (C) 2013 Free Software Foundation, Inc.
30960    #     This is free software; see the source for copying conditions.  There is NO
30961    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30962    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30963    # Check that this is likely to be GCC.
30964    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30965    if test $? -ne 0; then
30966      { $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
30967$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30969$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30970      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30971    fi
30972    # Remove Copyright and legalese from version string, and
30973    # collapse into a single line
30974    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30975        $SED -e 's/ *Copyright .*//'`
30976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30977        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30978  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30979    # clang --version output typically looks like
30980    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30981    #    clang version 3.3 (tags/RELEASE_33/final)
30982    # or
30983    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30984    #    Target: x86_64-pc-linux-gnu
30985    #    Thread model: posix
30986    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30987    # Check that this is likely to be clang
30988    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30989    if test $? -ne 0; then
30990      { $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
30991$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30992      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30993$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30994      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30995    fi
30996    # Collapse compiler output into a single line
30997    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30998    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30999        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31000  else
31001      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31002  fi
31003  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31004  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31005  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31006  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31007
31008  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31009$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31010
31011
31012  # Now that we have resolved CXX ourself, let autoconf have its go at it
31013  ac_ext=cpp
31014ac_cpp='$CXXCPP $CPPFLAGS'
31015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31018if test -z "$CXX"; then
31019  if test -n "$CCC"; then
31020    CXX=$CCC
31021  else
31022    if test -n "$ac_tool_prefix"; then
31023  for ac_prog in $CXX
31024  do
31025    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31028$as_echo_n "checking for $ac_word... " >&6; }
31029if ${ac_cv_prog_CXX+:} false; then :
31030  $as_echo_n "(cached) " >&6
31031else
31032  if test -n "$CXX"; then
31033  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31034else
31035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31036for as_dir in $PATH
31037do
31038  IFS=$as_save_IFS
31039  test -z "$as_dir" && as_dir=.
31040    for ac_exec_ext in '' $ac_executable_extensions; do
31041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31042    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31044    break 2
31045  fi
31046done
31047  done
31048IFS=$as_save_IFS
31049
31050fi
31051fi
31052CXX=$ac_cv_prog_CXX
31053if test -n "$CXX"; then
31054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31055$as_echo "$CXX" >&6; }
31056else
31057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31058$as_echo "no" >&6; }
31059fi
31060
31061
31062    test -n "$CXX" && break
31063  done
31064fi
31065if test -z "$CXX"; then
31066  ac_ct_CXX=$CXX
31067  for ac_prog in $CXX
31068do
31069  # Extract the first word of "$ac_prog", so it can be a program name with args.
31070set dummy $ac_prog; ac_word=$2
31071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31072$as_echo_n "checking for $ac_word... " >&6; }
31073if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31074  $as_echo_n "(cached) " >&6
31075else
31076  if test -n "$ac_ct_CXX"; then
31077  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31078else
31079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31080for as_dir in $PATH
31081do
31082  IFS=$as_save_IFS
31083  test -z "$as_dir" && as_dir=.
31084    for ac_exec_ext in '' $ac_executable_extensions; do
31085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31086    ac_cv_prog_ac_ct_CXX="$ac_prog"
31087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31088    break 2
31089  fi
31090done
31091  done
31092IFS=$as_save_IFS
31093
31094fi
31095fi
31096ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31097if test -n "$ac_ct_CXX"; then
31098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31099$as_echo "$ac_ct_CXX" >&6; }
31100else
31101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31102$as_echo "no" >&6; }
31103fi
31104
31105
31106  test -n "$ac_ct_CXX" && break
31107done
31108
31109  if test "x$ac_ct_CXX" = x; then
31110    CXX="g++"
31111  else
31112    case $cross_compiling:$ac_tool_warned in
31113yes:)
31114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31116ac_tool_warned=yes ;;
31117esac
31118    CXX=$ac_ct_CXX
31119  fi
31120fi
31121
31122  fi
31123fi
31124# Provide some information about the compiler.
31125$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31126set X $ac_compile
31127ac_compiler=$2
31128for ac_option in --version -v -V -qversion; do
31129  { { ac_try="$ac_compiler $ac_option >&5"
31130case "(($ac_try" in
31131  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31132  *) ac_try_echo=$ac_try;;
31133esac
31134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31135$as_echo "$ac_try_echo"; } >&5
31136  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31137  ac_status=$?
31138  if test -s conftest.err; then
31139    sed '10a\
31140... rest of stderr output deleted ...
31141         10q' conftest.err >conftest.er1
31142    cat conftest.er1 >&5
31143  fi
31144  rm -f conftest.er1 conftest.err
31145  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31146  test $ac_status = 0; }
31147done
31148
31149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31150$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31151if ${ac_cv_cxx_compiler_gnu+:} false; then :
31152  $as_echo_n "(cached) " >&6
31153else
31154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31155/* end confdefs.h.  */
31156
31157int
31158main ()
31159{
31160#ifndef __GNUC__
31161       choke me
31162#endif
31163
31164  ;
31165  return 0;
31166}
31167_ACEOF
31168if ac_fn_cxx_try_compile "$LINENO"; then :
31169  ac_compiler_gnu=yes
31170else
31171  ac_compiler_gnu=no
31172fi
31173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31174ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31175
31176fi
31177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31178$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31179if test $ac_compiler_gnu = yes; then
31180  GXX=yes
31181else
31182  GXX=
31183fi
31184ac_test_CXXFLAGS=${CXXFLAGS+set}
31185ac_save_CXXFLAGS=$CXXFLAGS
31186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31187$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31188if ${ac_cv_prog_cxx_g+:} false; then :
31189  $as_echo_n "(cached) " >&6
31190else
31191  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31192   ac_cxx_werror_flag=yes
31193   ac_cv_prog_cxx_g=no
31194   CXXFLAGS="-g"
31195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31196/* end confdefs.h.  */
31197
31198int
31199main ()
31200{
31201
31202  ;
31203  return 0;
31204}
31205_ACEOF
31206if ac_fn_cxx_try_compile "$LINENO"; then :
31207  ac_cv_prog_cxx_g=yes
31208else
31209  CXXFLAGS=""
31210      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31211/* end confdefs.h.  */
31212
31213int
31214main ()
31215{
31216
31217  ;
31218  return 0;
31219}
31220_ACEOF
31221if ac_fn_cxx_try_compile "$LINENO"; then :
31222
31223else
31224  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31225	 CXXFLAGS="-g"
31226	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31227/* end confdefs.h.  */
31228
31229int
31230main ()
31231{
31232
31233  ;
31234  return 0;
31235}
31236_ACEOF
31237if ac_fn_cxx_try_compile "$LINENO"; then :
31238  ac_cv_prog_cxx_g=yes
31239fi
31240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31241fi
31242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31243fi
31244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31245   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31246fi
31247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31248$as_echo "$ac_cv_prog_cxx_g" >&6; }
31249if test "$ac_test_CXXFLAGS" = set; then
31250  CXXFLAGS=$ac_save_CXXFLAGS
31251elif test $ac_cv_prog_cxx_g = yes; then
31252  if test "$GXX" = yes; then
31253    CXXFLAGS="-g -O2"
31254  else
31255    CXXFLAGS="-g"
31256  fi
31257else
31258  if test "$GXX" = yes; then
31259    CXXFLAGS="-O2"
31260  else
31261    CXXFLAGS=
31262  fi
31263fi
31264ac_ext=cpp
31265ac_cpp='$CXXCPP $CPPFLAGS'
31266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31269
31270
31271  #
31272  # Setup the preprocessor (CPP and CXXCPP)
31273  #
31274  ac_ext=c
31275ac_cpp='$CPP $CPPFLAGS'
31276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31278ac_compiler_gnu=$ac_cv_c_compiler_gnu
31279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31280$as_echo_n "checking how to run the C preprocessor... " >&6; }
31281# On Suns, sometimes $CPP names a directory.
31282if test -n "$CPP" && test -d "$CPP"; then
31283  CPP=
31284fi
31285if test -z "$CPP"; then
31286  if ${ac_cv_prog_CPP+:} false; then :
31287  $as_echo_n "(cached) " >&6
31288else
31289      # Double quotes because CPP needs to be expanded
31290    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31291    do
31292      ac_preproc_ok=false
31293for ac_c_preproc_warn_flag in '' yes
31294do
31295  # Use a header file that comes with gcc, so configuring glibc
31296  # with a fresh cross-compiler works.
31297  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31298  # <limits.h> exists even on freestanding compilers.
31299  # On the NeXT, cc -E runs the code through the compiler's parser,
31300  # not just through cpp. "Syntax error" is here to catch this case.
31301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31302/* end confdefs.h.  */
31303#ifdef __STDC__
31304# include <limits.h>
31305#else
31306# include <assert.h>
31307#endif
31308		     Syntax error
31309_ACEOF
31310if ac_fn_c_try_cpp "$LINENO"; then :
31311
31312else
31313  # Broken: fails on valid input.
31314continue
31315fi
31316rm -f conftest.err conftest.i conftest.$ac_ext
31317
31318  # OK, works on sane cases.  Now check whether nonexistent headers
31319  # can be detected and how.
31320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31321/* end confdefs.h.  */
31322#include <ac_nonexistent.h>
31323_ACEOF
31324if ac_fn_c_try_cpp "$LINENO"; then :
31325  # Broken: success on invalid input.
31326continue
31327else
31328  # Passes both tests.
31329ac_preproc_ok=:
31330break
31331fi
31332rm -f conftest.err conftest.i conftest.$ac_ext
31333
31334done
31335# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31336rm -f conftest.i conftest.err conftest.$ac_ext
31337if $ac_preproc_ok; then :
31338  break
31339fi
31340
31341    done
31342    ac_cv_prog_CPP=$CPP
31343
31344fi
31345  CPP=$ac_cv_prog_CPP
31346else
31347  ac_cv_prog_CPP=$CPP
31348fi
31349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31350$as_echo "$CPP" >&6; }
31351ac_preproc_ok=false
31352for ac_c_preproc_warn_flag in '' yes
31353do
31354  # Use a header file that comes with gcc, so configuring glibc
31355  # with a fresh cross-compiler works.
31356  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31357  # <limits.h> exists even on freestanding compilers.
31358  # On the NeXT, cc -E runs the code through the compiler's parser,
31359  # not just through cpp. "Syntax error" is here to catch this case.
31360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31361/* end confdefs.h.  */
31362#ifdef __STDC__
31363# include <limits.h>
31364#else
31365# include <assert.h>
31366#endif
31367		     Syntax error
31368_ACEOF
31369if ac_fn_c_try_cpp "$LINENO"; then :
31370
31371else
31372  # Broken: fails on valid input.
31373continue
31374fi
31375rm -f conftest.err conftest.i conftest.$ac_ext
31376
31377  # OK, works on sane cases.  Now check whether nonexistent headers
31378  # can be detected and how.
31379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31380/* end confdefs.h.  */
31381#include <ac_nonexistent.h>
31382_ACEOF
31383if ac_fn_c_try_cpp "$LINENO"; then :
31384  # Broken: success on invalid input.
31385continue
31386else
31387  # Passes both tests.
31388ac_preproc_ok=:
31389break
31390fi
31391rm -f conftest.err conftest.i conftest.$ac_ext
31392
31393done
31394# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31395rm -f conftest.i conftest.err conftest.$ac_ext
31396if $ac_preproc_ok; then :
31397
31398else
31399  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31401as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31402See \`config.log' for more details" "$LINENO" 5; }
31403fi
31404
31405ac_ext=cpp
31406ac_cpp='$CXXCPP $CPPFLAGS'
31407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31410
31411
31412  # Only process if variable expands to non-empty
31413
31414  if test "x$CPP" != x; then
31415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31416
31417  # First separate the path from the arguments. This will split at the first
31418  # space.
31419  complete="$CPP"
31420  path="${complete%% *}"
31421  tmp="$complete EOL"
31422  arguments="${tmp#* }"
31423
31424  # Input might be given as Windows format, start by converting to
31425  # unix format.
31426  new_path=`$CYGPATH -u "$path"`
31427
31428  # Now try to locate executable using which
31429  new_path=`$WHICH "$new_path" 2> /dev/null`
31430  # bat and cmd files are not always considered executable in cygwin causing which
31431  # to not find them
31432  if test "x$new_path" = x \
31433      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31434      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31435    new_path=`$CYGPATH -u "$path"`
31436  fi
31437  if test "x$new_path" = x; then
31438    # Oops. Which didn't find the executable.
31439    # The splitting of arguments from the executable at a space might have been incorrect,
31440    # since paths with space are more likely in Windows. Give it another try with the whole
31441    # argument.
31442    path="$complete"
31443    arguments="EOL"
31444    new_path=`$CYGPATH -u "$path"`
31445    new_path=`$WHICH "$new_path" 2> /dev/null`
31446    # bat and cmd files are not always considered executable in cygwin causing which
31447    # to not find them
31448    if test "x$new_path" = x \
31449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31451      new_path=`$CYGPATH -u "$path"`
31452    fi
31453    if test "x$new_path" = x; then
31454      # It's still not found. Now this is an unrecoverable error.
31455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31456$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31457      has_space=`$ECHO "$complete" | $GREP " "`
31458      if test "x$has_space" != x; then
31459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31461      fi
31462      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31463    fi
31464  fi
31465
31466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31469  # "foo.exe" is OK but "foo" is an error.
31470  #
31471  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31472  # It is also a way to make sure we got the proper file name for the real test later on.
31473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31474  if test "x$test_shortpath" = x; then
31475    # Short path failed, file does not exist as specified.
31476    # Try adding .exe or .cmd
31477    if test -f "${new_path}.exe"; then
31478      input_to_shortpath="${new_path}.exe"
31479    elif test -f "${new_path}.cmd"; then
31480      input_to_shortpath="${new_path}.cmd"
31481    else
31482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31483$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31486      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31487    fi
31488  else
31489    input_to_shortpath="$new_path"
31490  fi
31491
31492  # Call helper function which possibly converts this using DOS-style short mode.
31493  # If so, the updated path is stored in $new_path.
31494  new_path="$input_to_shortpath"
31495
31496  input_path="$input_to_shortpath"
31497  # Check if we need to convert this using DOS-style short mode. If the path
31498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31499  # take no chances and rewrite it.
31500  # Note: m4 eats our [], so we need to use [ and ] instead.
31501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31502  if test "x$has_forbidden_chars" != x; then
31503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31507      # Going to short mode and back again did indeed matter. Since short mode is
31508      # case insensitive, let's make it lowercase to improve readability.
31509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31510      # Now convert it back to Unix-style (cygpath)
31511      input_path=`$CYGPATH -u "$shortmode_path"`
31512      new_path="$input_path"
31513    fi
31514  fi
31515
31516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31517  if test "x$test_cygdrive_prefix" = x; then
31518    # As a simple fix, exclude /usr/bin since it's not a real path.
31519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31521      # a path prefixed by /cygdrive for fixpath to work.
31522      new_path="$CYGWIN_ROOT_PATH$input_path"
31523    fi
31524  fi
31525
31526  # remove trailing .exe if any
31527  new_path="${new_path/%.exe/}"
31528
31529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31530
31531  # First separate the path from the arguments. This will split at the first
31532  # space.
31533  complete="$CPP"
31534  path="${complete%% *}"
31535  tmp="$complete EOL"
31536  arguments="${tmp#* }"
31537
31538  # Input might be given as Windows format, start by converting to
31539  # unix format.
31540  new_path="$path"
31541
31542  windows_path="$new_path"
31543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31544    unix_path=`$CYGPATH -u "$windows_path"`
31545    new_path="$unix_path"
31546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31548    new_path="$unix_path"
31549  fi
31550
31551
31552  # Now try to locate executable using which
31553  new_path=`$WHICH "$new_path" 2> /dev/null`
31554
31555  if test "x$new_path" = x; then
31556    # Oops. Which didn't find the executable.
31557    # The splitting of arguments from the executable at a space might have been incorrect,
31558    # since paths with space are more likely in Windows. Give it another try with the whole
31559    # argument.
31560    path="$complete"
31561    arguments="EOL"
31562    new_path="$path"
31563
31564  windows_path="$new_path"
31565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31566    unix_path=`$CYGPATH -u "$windows_path"`
31567    new_path="$unix_path"
31568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31570    new_path="$unix_path"
31571  fi
31572
31573
31574    new_path=`$WHICH "$new_path" 2> /dev/null`
31575    # bat and cmd files are not always considered executable in MSYS causing which
31576    # to not find them
31577    if test "x$new_path" = x \
31578        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31579        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31580      new_path="$path"
31581
31582  windows_path="$new_path"
31583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31584    unix_path=`$CYGPATH -u "$windows_path"`
31585    new_path="$unix_path"
31586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31588    new_path="$unix_path"
31589  fi
31590
31591    fi
31592
31593    if test "x$new_path" = x; then
31594      # It's still not found. Now this is an unrecoverable error.
31595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31596$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31597      has_space=`$ECHO "$complete" | $GREP " "`
31598      if test "x$has_space" != x; then
31599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31601      fi
31602      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31603    fi
31604  fi
31605
31606  # Now new_path has a complete unix path to the binary
31607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31608    # Keep paths in /bin as-is, but remove trailing .exe if any
31609    new_path="${new_path/%.exe/}"
31610    # Do not save /bin paths to all_fixpath_prefixes!
31611  else
31612    # Not in mixed or Windows style, start by that.
31613    new_path=`cmd //c echo $new_path`
31614
31615  input_path="$new_path"
31616  # Check if we need to convert this using DOS-style short mode. If the path
31617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31618  # take no chances and rewrite it.
31619  # Note: m4 eats our [], so we need to use [ and ] instead.
31620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31621  if test "x$has_forbidden_chars" != x; then
31622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31624  fi
31625
31626    # Output is in $new_path
31627
31628  windows_path="$new_path"
31629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31630    unix_path=`$CYGPATH -u "$windows_path"`
31631    new_path="$unix_path"
31632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31634    new_path="$unix_path"
31635  fi
31636
31637    # remove trailing .exe if any
31638    new_path="${new_path/%.exe/}"
31639
31640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31642  fi
31643
31644    else
31645      # We're on a unix platform. Hooray! :)
31646      # First separate the path from the arguments. This will split at the first
31647      # space.
31648      complete="$CPP"
31649      path="${complete%% *}"
31650      tmp="$complete EOL"
31651      arguments="${tmp#* }"
31652
31653      # Cannot rely on the command "which" here since it doesn't always work.
31654      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31655      if test -z "$is_absolute_path"; then
31656        # Path to executable is not absolute. Find it.
31657        IFS_save="$IFS"
31658        IFS=:
31659        for p in $PATH; do
31660          if test -f "$p/$path" && test -x "$p/$path"; then
31661            new_path="$p/$path"
31662            break
31663          fi
31664        done
31665        IFS="$IFS_save"
31666      else
31667        # This is an absolute path, we can use it without further modifications.
31668        new_path="$path"
31669      fi
31670
31671      if test "x$new_path" = x; then
31672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31673$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31674        has_space=`$ECHO "$complete" | $GREP " "`
31675        if test "x$has_space" != x; then
31676          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31678        fi
31679        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31680      fi
31681    fi
31682
31683    # Now join together the path and the arguments once again
31684    if test "x$arguments" != xEOL; then
31685      new_complete="$new_path ${arguments% *}"
31686    else
31687      new_complete="$new_path"
31688    fi
31689
31690    if test "x$complete" != "x$new_complete"; then
31691      CPP="$new_complete"
31692      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31693$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31694    fi
31695  fi
31696
31697  ac_ext=cpp
31698ac_cpp='$CXXCPP $CPPFLAGS'
31699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31703$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31704if test -z "$CXXCPP"; then
31705  if ${ac_cv_prog_CXXCPP+:} false; then :
31706  $as_echo_n "(cached) " >&6
31707else
31708      # Double quotes because CXXCPP needs to be expanded
31709    for CXXCPP in "$CXX -E" "/lib/cpp"
31710    do
31711      ac_preproc_ok=false
31712for ac_cxx_preproc_warn_flag in '' yes
31713do
31714  # Use a header file that comes with gcc, so configuring glibc
31715  # with a fresh cross-compiler works.
31716  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31717  # <limits.h> exists even on freestanding compilers.
31718  # On the NeXT, cc -E runs the code through the compiler's parser,
31719  # not just through cpp. "Syntax error" is here to catch this case.
31720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31721/* end confdefs.h.  */
31722#ifdef __STDC__
31723# include <limits.h>
31724#else
31725# include <assert.h>
31726#endif
31727		     Syntax error
31728_ACEOF
31729if ac_fn_cxx_try_cpp "$LINENO"; then :
31730
31731else
31732  # Broken: fails on valid input.
31733continue
31734fi
31735rm -f conftest.err conftest.i conftest.$ac_ext
31736
31737  # OK, works on sane cases.  Now check whether nonexistent headers
31738  # can be detected and how.
31739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31740/* end confdefs.h.  */
31741#include <ac_nonexistent.h>
31742_ACEOF
31743if ac_fn_cxx_try_cpp "$LINENO"; then :
31744  # Broken: success on invalid input.
31745continue
31746else
31747  # Passes both tests.
31748ac_preproc_ok=:
31749break
31750fi
31751rm -f conftest.err conftest.i conftest.$ac_ext
31752
31753done
31754# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31755rm -f conftest.i conftest.err conftest.$ac_ext
31756if $ac_preproc_ok; then :
31757  break
31758fi
31759
31760    done
31761    ac_cv_prog_CXXCPP=$CXXCPP
31762
31763fi
31764  CXXCPP=$ac_cv_prog_CXXCPP
31765else
31766  ac_cv_prog_CXXCPP=$CXXCPP
31767fi
31768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31769$as_echo "$CXXCPP" >&6; }
31770ac_preproc_ok=false
31771for ac_cxx_preproc_warn_flag in '' yes
31772do
31773  # Use a header file that comes with gcc, so configuring glibc
31774  # with a fresh cross-compiler works.
31775  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31776  # <limits.h> exists even on freestanding compilers.
31777  # On the NeXT, cc -E runs the code through the compiler's parser,
31778  # not just through cpp. "Syntax error" is here to catch this case.
31779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31780/* end confdefs.h.  */
31781#ifdef __STDC__
31782# include <limits.h>
31783#else
31784# include <assert.h>
31785#endif
31786		     Syntax error
31787_ACEOF
31788if ac_fn_cxx_try_cpp "$LINENO"; then :
31789
31790else
31791  # Broken: fails on valid input.
31792continue
31793fi
31794rm -f conftest.err conftest.i conftest.$ac_ext
31795
31796  # OK, works on sane cases.  Now check whether nonexistent headers
31797  # can be detected and how.
31798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31799/* end confdefs.h.  */
31800#include <ac_nonexistent.h>
31801_ACEOF
31802if ac_fn_cxx_try_cpp "$LINENO"; then :
31803  # Broken: success on invalid input.
31804continue
31805else
31806  # Passes both tests.
31807ac_preproc_ok=:
31808break
31809fi
31810rm -f conftest.err conftest.i conftest.$ac_ext
31811
31812done
31813# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31814rm -f conftest.i conftest.err conftest.$ac_ext
31815if $ac_preproc_ok; then :
31816
31817else
31818  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31820as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31821See \`config.log' for more details" "$LINENO" 5; }
31822fi
31823
31824ac_ext=cpp
31825ac_cpp='$CXXCPP $CPPFLAGS'
31826ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31827ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31828ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31829
31830
31831  # Only process if variable expands to non-empty
31832
31833  if test "x$CXXCPP" != x; then
31834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31835
31836  # First separate the path from the arguments. This will split at the first
31837  # space.
31838  complete="$CXXCPP"
31839  path="${complete%% *}"
31840  tmp="$complete EOL"
31841  arguments="${tmp#* }"
31842
31843  # Input might be given as Windows format, start by converting to
31844  # unix format.
31845  new_path=`$CYGPATH -u "$path"`
31846
31847  # Now try to locate executable using which
31848  new_path=`$WHICH "$new_path" 2> /dev/null`
31849  # bat and cmd files are not always considered executable in cygwin causing which
31850  # to not find them
31851  if test "x$new_path" = x \
31852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31854    new_path=`$CYGPATH -u "$path"`
31855  fi
31856  if test "x$new_path" = x; then
31857    # Oops. Which didn't find the executable.
31858    # The splitting of arguments from the executable at a space might have been incorrect,
31859    # since paths with space are more likely in Windows. Give it another try with the whole
31860    # argument.
31861    path="$complete"
31862    arguments="EOL"
31863    new_path=`$CYGPATH -u "$path"`
31864    new_path=`$WHICH "$new_path" 2> /dev/null`
31865    # bat and cmd files are not always considered executable in cygwin causing which
31866    # to not find them
31867    if test "x$new_path" = x \
31868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31870      new_path=`$CYGPATH -u "$path"`
31871    fi
31872    if test "x$new_path" = x; then
31873      # It's still not found. Now this is an unrecoverable error.
31874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31875$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31876      has_space=`$ECHO "$complete" | $GREP " "`
31877      if test "x$has_space" != x; then
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31880      fi
31881      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31882    fi
31883  fi
31884
31885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31888  # "foo.exe" is OK but "foo" is an error.
31889  #
31890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31891  # It is also a way to make sure we got the proper file name for the real test later on.
31892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31893  if test "x$test_shortpath" = x; then
31894    # Short path failed, file does not exist as specified.
31895    # Try adding .exe or .cmd
31896    if test -f "${new_path}.exe"; then
31897      input_to_shortpath="${new_path}.exe"
31898    elif test -f "${new_path}.cmd"; then
31899      input_to_shortpath="${new_path}.cmd"
31900    else
31901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31902$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31905      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31906    fi
31907  else
31908    input_to_shortpath="$new_path"
31909  fi
31910
31911  # Call helper function which possibly converts this using DOS-style short mode.
31912  # If so, the updated path is stored in $new_path.
31913  new_path="$input_to_shortpath"
31914
31915  input_path="$input_to_shortpath"
31916  # Check if we need to convert this using DOS-style short mode. If the path
31917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31918  # take no chances and rewrite it.
31919  # Note: m4 eats our [], so we need to use [ and ] instead.
31920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31921  if test "x$has_forbidden_chars" != x; then
31922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31926      # Going to short mode and back again did indeed matter. Since short mode is
31927      # case insensitive, let's make it lowercase to improve readability.
31928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31929      # Now convert it back to Unix-style (cygpath)
31930      input_path=`$CYGPATH -u "$shortmode_path"`
31931      new_path="$input_path"
31932    fi
31933  fi
31934
31935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31936  if test "x$test_cygdrive_prefix" = x; then
31937    # As a simple fix, exclude /usr/bin since it's not a real path.
31938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31940      # a path prefixed by /cygdrive for fixpath to work.
31941      new_path="$CYGWIN_ROOT_PATH$input_path"
31942    fi
31943  fi
31944
31945  # remove trailing .exe if any
31946  new_path="${new_path/%.exe/}"
31947
31948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31949
31950  # First separate the path from the arguments. This will split at the first
31951  # space.
31952  complete="$CXXCPP"
31953  path="${complete%% *}"
31954  tmp="$complete EOL"
31955  arguments="${tmp#* }"
31956
31957  # Input might be given as Windows format, start by converting to
31958  # unix format.
31959  new_path="$path"
31960
31961  windows_path="$new_path"
31962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31963    unix_path=`$CYGPATH -u "$windows_path"`
31964    new_path="$unix_path"
31965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31967    new_path="$unix_path"
31968  fi
31969
31970
31971  # Now try to locate executable using which
31972  new_path=`$WHICH "$new_path" 2> /dev/null`
31973
31974  if test "x$new_path" = x; then
31975    # Oops. Which didn't find the executable.
31976    # The splitting of arguments from the executable at a space might have been incorrect,
31977    # since paths with space are more likely in Windows. Give it another try with the whole
31978    # argument.
31979    path="$complete"
31980    arguments="EOL"
31981    new_path="$path"
31982
31983  windows_path="$new_path"
31984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31985    unix_path=`$CYGPATH -u "$windows_path"`
31986    new_path="$unix_path"
31987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31989    new_path="$unix_path"
31990  fi
31991
31992
31993    new_path=`$WHICH "$new_path" 2> /dev/null`
31994    # bat and cmd files are not always considered executable in MSYS causing which
31995    # to not find them
31996    if test "x$new_path" = x \
31997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31999      new_path="$path"
32000
32001  windows_path="$new_path"
32002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32003    unix_path=`$CYGPATH -u "$windows_path"`
32004    new_path="$unix_path"
32005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32007    new_path="$unix_path"
32008  fi
32009
32010    fi
32011
32012    if test "x$new_path" = x; then
32013      # It's still not found. Now this is an unrecoverable error.
32014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32015$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32016      has_space=`$ECHO "$complete" | $GREP " "`
32017      if test "x$has_space" != x; then
32018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32020      fi
32021      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32022    fi
32023  fi
32024
32025  # Now new_path has a complete unix path to the binary
32026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32027    # Keep paths in /bin as-is, but remove trailing .exe if any
32028    new_path="${new_path/%.exe/}"
32029    # Do not save /bin paths to all_fixpath_prefixes!
32030  else
32031    # Not in mixed or Windows style, start by that.
32032    new_path=`cmd //c echo $new_path`
32033
32034  input_path="$new_path"
32035  # Check if we need to convert this using DOS-style short mode. If the path
32036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32037  # take no chances and rewrite it.
32038  # Note: m4 eats our [], so we need to use [ and ] instead.
32039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32040  if test "x$has_forbidden_chars" != x; then
32041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32043  fi
32044
32045    # Output is in $new_path
32046
32047  windows_path="$new_path"
32048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32049    unix_path=`$CYGPATH -u "$windows_path"`
32050    new_path="$unix_path"
32051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32053    new_path="$unix_path"
32054  fi
32055
32056    # remove trailing .exe if any
32057    new_path="${new_path/%.exe/}"
32058
32059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32061  fi
32062
32063    else
32064      # We're on a unix platform. Hooray! :)
32065      # First separate the path from the arguments. This will split at the first
32066      # space.
32067      complete="$CXXCPP"
32068      path="${complete%% *}"
32069      tmp="$complete EOL"
32070      arguments="${tmp#* }"
32071
32072      # Cannot rely on the command "which" here since it doesn't always work.
32073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32074      if test -z "$is_absolute_path"; then
32075        # Path to executable is not absolute. Find it.
32076        IFS_save="$IFS"
32077        IFS=:
32078        for p in $PATH; do
32079          if test -f "$p/$path" && test -x "$p/$path"; then
32080            new_path="$p/$path"
32081            break
32082          fi
32083        done
32084        IFS="$IFS_save"
32085      else
32086        # This is an absolute path, we can use it without further modifications.
32087        new_path="$path"
32088      fi
32089
32090      if test "x$new_path" = x; then
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32092$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32093        has_space=`$ECHO "$complete" | $GREP " "`
32094        if test "x$has_space" != x; then
32095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32097        fi
32098        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32099      fi
32100    fi
32101
32102    # Now join together the path and the arguments once again
32103    if test "x$arguments" != xEOL; then
32104      new_complete="$new_path ${arguments% *}"
32105    else
32106      new_complete="$new_path"
32107    fi
32108
32109    if test "x$complete" != "x$new_complete"; then
32110      CXXCPP="$new_complete"
32111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32112$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32113    fi
32114  fi
32115
32116
32117  #
32118  # Setup the linker (LD)
32119  #
32120  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32121    # In the Microsoft toolchain we have a separate LD command "link".
32122    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32123    # a cygwin program for something completely different.
32124    # Extract the first word of "link", so it can be a program name with args.
32125set dummy link; ac_word=$2
32126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32127$as_echo_n "checking for $ac_word... " >&6; }
32128if ${ac_cv_prog_LD+:} false; then :
32129  $as_echo_n "(cached) " >&6
32130else
32131  if test -n "$LD"; then
32132  ac_cv_prog_LD="$LD" # Let the user override the test.
32133else
32134  ac_prog_rejected=no
32135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32136for as_dir in $PATH
32137do
32138  IFS=$as_save_IFS
32139  test -z "$as_dir" && as_dir=.
32140    for ac_exec_ext in '' $ac_executable_extensions; do
32141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32142    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32143       ac_prog_rejected=yes
32144       continue
32145     fi
32146    ac_cv_prog_LD="link"
32147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32148    break 2
32149  fi
32150done
32151  done
32152IFS=$as_save_IFS
32153
32154if test $ac_prog_rejected = yes; then
32155  # We found a bogon in the path, so make sure we never use it.
32156  set dummy $ac_cv_prog_LD
32157  shift
32158  if test $# != 0; then
32159    # We chose a different compiler from the bogus one.
32160    # However, it has the same basename, so the bogon will be chosen
32161    # first if we set LD to just the basename; use the full file name.
32162    shift
32163    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32164  fi
32165fi
32166fi
32167fi
32168LD=$ac_cv_prog_LD
32169if test -n "$LD"; then
32170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32171$as_echo "$LD" >&6; }
32172else
32173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32174$as_echo "no" >&6; }
32175fi
32176
32177
32178
32179  # Only process if variable expands to non-empty
32180
32181  if test "x$LD" != x; then
32182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32183
32184  # First separate the path from the arguments. This will split at the first
32185  # space.
32186  complete="$LD"
32187  path="${complete%% *}"
32188  tmp="$complete EOL"
32189  arguments="${tmp#* }"
32190
32191  # Input might be given as Windows format, start by converting to
32192  # unix format.
32193  new_path=`$CYGPATH -u "$path"`
32194
32195  # Now try to locate executable using which
32196  new_path=`$WHICH "$new_path" 2> /dev/null`
32197  # bat and cmd files are not always considered executable in cygwin causing which
32198  # to not find them
32199  if test "x$new_path" = x \
32200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32202    new_path=`$CYGPATH -u "$path"`
32203  fi
32204  if test "x$new_path" = x; then
32205    # Oops. Which didn't find the executable.
32206    # The splitting of arguments from the executable at a space might have been incorrect,
32207    # since paths with space are more likely in Windows. Give it another try with the whole
32208    # argument.
32209    path="$complete"
32210    arguments="EOL"
32211    new_path=`$CYGPATH -u "$path"`
32212    new_path=`$WHICH "$new_path" 2> /dev/null`
32213    # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
32219    fi
32220    if test "x$new_path" = x; then
32221      # It's still not found. Now this is an unrecoverable error.
32222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32223$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32224      has_space=`$ECHO "$complete" | $GREP " "`
32225      if test "x$has_space" != x; then
32226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32228      fi
32229      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32230    fi
32231  fi
32232
32233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32236  # "foo.exe" is OK but "foo" is an error.
32237  #
32238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32239  # It is also a way to make sure we got the proper file name for the real test later on.
32240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32241  if test "x$test_shortpath" = x; then
32242    # Short path failed, file does not exist as specified.
32243    # Try adding .exe or .cmd
32244    if test -f "${new_path}.exe"; then
32245      input_to_shortpath="${new_path}.exe"
32246    elif test -f "${new_path}.cmd"; then
32247      input_to_shortpath="${new_path}.cmd"
32248    else
32249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32250$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32253      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32254    fi
32255  else
32256    input_to_shortpath="$new_path"
32257  fi
32258
32259  # Call helper function which possibly converts this using DOS-style short mode.
32260  # If so, the updated path is stored in $new_path.
32261  new_path="$input_to_shortpath"
32262
32263  input_path="$input_to_shortpath"
32264  # Check if we need to convert this using DOS-style short mode. If the path
32265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32266  # take no chances and rewrite it.
32267  # Note: m4 eats our [], so we need to use [ and ] instead.
32268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32269  if test "x$has_forbidden_chars" != x; then
32270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32274      # Going to short mode and back again did indeed matter. Since short mode is
32275      # case insensitive, let's make it lowercase to improve readability.
32276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32277      # Now convert it back to Unix-style (cygpath)
32278      input_path=`$CYGPATH -u "$shortmode_path"`
32279      new_path="$input_path"
32280    fi
32281  fi
32282
32283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32284  if test "x$test_cygdrive_prefix" = x; then
32285    # As a simple fix, exclude /usr/bin since it's not a real path.
32286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32288      # a path prefixed by /cygdrive for fixpath to work.
32289      new_path="$CYGWIN_ROOT_PATH$input_path"
32290    fi
32291  fi
32292
32293  # remove trailing .exe if any
32294  new_path="${new_path/%.exe/}"
32295
32296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32297
32298  # First separate the path from the arguments. This will split at the first
32299  # space.
32300  complete="$LD"
32301  path="${complete%% *}"
32302  tmp="$complete EOL"
32303  arguments="${tmp#* }"
32304
32305  # Input might be given as Windows format, start by converting to
32306  # unix format.
32307  new_path="$path"
32308
32309  windows_path="$new_path"
32310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32311    unix_path=`$CYGPATH -u "$windows_path"`
32312    new_path="$unix_path"
32313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32315    new_path="$unix_path"
32316  fi
32317
32318
32319  # Now try to locate executable using which
32320  new_path=`$WHICH "$new_path" 2> /dev/null`
32321
32322  if test "x$new_path" = x; then
32323    # Oops. Which didn't find the executable.
32324    # The splitting of arguments from the executable at a space might have been incorrect,
32325    # since paths with space are more likely in Windows. Give it another try with the whole
32326    # argument.
32327    path="$complete"
32328    arguments="EOL"
32329    new_path="$path"
32330
32331  windows_path="$new_path"
32332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32333    unix_path=`$CYGPATH -u "$windows_path"`
32334    new_path="$unix_path"
32335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32337    new_path="$unix_path"
32338  fi
32339
32340
32341    new_path=`$WHICH "$new_path" 2> /dev/null`
32342    # bat and cmd files are not always considered executable in MSYS causing which
32343    # to not find them
32344    if test "x$new_path" = x \
32345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32347      new_path="$path"
32348
32349  windows_path="$new_path"
32350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32351    unix_path=`$CYGPATH -u "$windows_path"`
32352    new_path="$unix_path"
32353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32355    new_path="$unix_path"
32356  fi
32357
32358    fi
32359
32360    if test "x$new_path" = x; then
32361      # It's still not found. Now this is an unrecoverable error.
32362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32363$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32364      has_space=`$ECHO "$complete" | $GREP " "`
32365      if test "x$has_space" != x; then
32366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32368      fi
32369      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32370    fi
32371  fi
32372
32373  # Now new_path has a complete unix path to the binary
32374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32375    # Keep paths in /bin as-is, but remove trailing .exe if any
32376    new_path="${new_path/%.exe/}"
32377    # Do not save /bin paths to all_fixpath_prefixes!
32378  else
32379    # Not in mixed or Windows style, start by that.
32380    new_path=`cmd //c echo $new_path`
32381
32382  input_path="$new_path"
32383  # Check if we need to convert this using DOS-style short mode. If the path
32384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32385  # take no chances and rewrite it.
32386  # Note: m4 eats our [], so we need to use [ and ] instead.
32387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32388  if test "x$has_forbidden_chars" != x; then
32389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32391  fi
32392
32393    # Output is in $new_path
32394
32395  windows_path="$new_path"
32396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32397    unix_path=`$CYGPATH -u "$windows_path"`
32398    new_path="$unix_path"
32399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32401    new_path="$unix_path"
32402  fi
32403
32404    # remove trailing .exe if any
32405    new_path="${new_path/%.exe/}"
32406
32407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32409  fi
32410
32411    else
32412      # We're on a unix platform. Hooray! :)
32413      # First separate the path from the arguments. This will split at the first
32414      # space.
32415      complete="$LD"
32416      path="${complete%% *}"
32417      tmp="$complete EOL"
32418      arguments="${tmp#* }"
32419
32420      # Cannot rely on the command "which" here since it doesn't always work.
32421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32422      if test -z "$is_absolute_path"; then
32423        # Path to executable is not absolute. Find it.
32424        IFS_save="$IFS"
32425        IFS=:
32426        for p in $PATH; do
32427          if test -f "$p/$path" && test -x "$p/$path"; then
32428            new_path="$p/$path"
32429            break
32430          fi
32431        done
32432        IFS="$IFS_save"
32433      else
32434        # This is an absolute path, we can use it without further modifications.
32435        new_path="$path"
32436      fi
32437
32438      if test "x$new_path" = x; then
32439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32440$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32441        has_space=`$ECHO "$complete" | $GREP " "`
32442        if test "x$has_space" != x; then
32443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32445        fi
32446        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32447      fi
32448    fi
32449
32450    # Now join together the path and the arguments once again
32451    if test "x$arguments" != xEOL; then
32452      new_complete="$new_path ${arguments% *}"
32453    else
32454      new_complete="$new_path"
32455    fi
32456
32457    if test "x$complete" != "x$new_complete"; then
32458      LD="$new_complete"
32459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32460$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32461    fi
32462  fi
32463
32464    # Verify that we indeed succeeded with this trick.
32465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32466$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32467    "$LD" --version > /dev/null
32468    if test $? -eq 0 ; then
32469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32470$as_echo "no" >&6; }
32471      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32472    else
32473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32474$as_echo "yes" >&6; }
32475    fi
32476    LDCXX="$LD"
32477  else
32478    # All other toolchains use the compiler to link.
32479    LD="$CC"
32480    LDCXX="$CXX"
32481  fi
32482
32483  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32484
32485
32486  #
32487  # Setup the assembler (AS)
32488  #
32489  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32490    # FIXME: should this really be solaris, or solstudio?
32491
32492
32493  # Publish this variable in the help.
32494
32495
32496  if test "x$AS" = x; then
32497    # The variable is not set by user, try to locate tool using the code snippet
32498    for ac_prog in as
32499do
32500  # Extract the first word of "$ac_prog", so it can be a program name with args.
32501set dummy $ac_prog; ac_word=$2
32502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32503$as_echo_n "checking for $ac_word... " >&6; }
32504if ${ac_cv_path_AS+:} false; then :
32505  $as_echo_n "(cached) " >&6
32506else
32507  case $AS in
32508  [\\/]* | ?:[\\/]*)
32509  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32510  ;;
32511  *)
32512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32513for as_dir in $PATH
32514do
32515  IFS=$as_save_IFS
32516  test -z "$as_dir" && as_dir=.
32517    for ac_exec_ext in '' $ac_executable_extensions; do
32518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32519    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32521    break 2
32522  fi
32523done
32524  done
32525IFS=$as_save_IFS
32526
32527  ;;
32528esac
32529fi
32530AS=$ac_cv_path_AS
32531if test -n "$AS"; then
32532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32533$as_echo "$AS" >&6; }
32534else
32535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32536$as_echo "no" >&6; }
32537fi
32538
32539
32540  test -n "$AS" && break
32541done
32542
32543  else
32544    # The variable is set, but is it from the command line or the environment?
32545
32546    # Try to remove the string !AS! from our list.
32547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32549      # If it failed, the variable was not from the command line. Ignore it,
32550      # but warn the user (except for BASH, which is always set by the calling BASH).
32551      if test "xAS" != xBASH; then
32552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32553$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32554      fi
32555      # Try to locate tool using the code snippet
32556      for ac_prog in as
32557do
32558  # Extract the first word of "$ac_prog", so it can be a program name with args.
32559set dummy $ac_prog; ac_word=$2
32560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32561$as_echo_n "checking for $ac_word... " >&6; }
32562if ${ac_cv_path_AS+:} false; then :
32563  $as_echo_n "(cached) " >&6
32564else
32565  case $AS in
32566  [\\/]* | ?:[\\/]*)
32567  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32568  ;;
32569  *)
32570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32571for as_dir in $PATH
32572do
32573  IFS=$as_save_IFS
32574  test -z "$as_dir" && as_dir=.
32575    for ac_exec_ext in '' $ac_executable_extensions; do
32576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32577    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32579    break 2
32580  fi
32581done
32582  done
32583IFS=$as_save_IFS
32584
32585  ;;
32586esac
32587fi
32588AS=$ac_cv_path_AS
32589if test -n "$AS"; then
32590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32591$as_echo "$AS" >&6; }
32592else
32593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32594$as_echo "no" >&6; }
32595fi
32596
32597
32598  test -n "$AS" && break
32599done
32600
32601    else
32602      # If it succeeded, then it was overridden by the user. We will use it
32603      # for the tool.
32604
32605      # First remove it from the list of overridden variables, so we can test
32606      # for unknown variables in the end.
32607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32608
32609      # Check if the provided tool contains a complete path.
32610      tool_specified="$AS"
32611      tool_basename="${tool_specified##*/}"
32612      if test "x$tool_basename" = "x$tool_specified"; then
32613        # A command without a complete path is provided, search $PATH.
32614        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32615$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32616        # Extract the first word of "$tool_basename", so it can be a program name with args.
32617set dummy $tool_basename; ac_word=$2
32618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32619$as_echo_n "checking for $ac_word... " >&6; }
32620if ${ac_cv_path_AS+:} false; then :
32621  $as_echo_n "(cached) " >&6
32622else
32623  case $AS in
32624  [\\/]* | ?:[\\/]*)
32625  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32626  ;;
32627  *)
32628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32629for as_dir in $PATH
32630do
32631  IFS=$as_save_IFS
32632  test -z "$as_dir" && as_dir=.
32633    for ac_exec_ext in '' $ac_executable_extensions; do
32634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32635    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32637    break 2
32638  fi
32639done
32640  done
32641IFS=$as_save_IFS
32642
32643  ;;
32644esac
32645fi
32646AS=$ac_cv_path_AS
32647if test -n "$AS"; then
32648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32649$as_echo "$AS" >&6; }
32650else
32651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32652$as_echo "no" >&6; }
32653fi
32654
32655
32656        if test "x$AS" = x; then
32657          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32658        fi
32659      else
32660        # Otherwise we believe it is a complete path. Use it as it is.
32661        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32662$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32664$as_echo_n "checking for AS... " >&6; }
32665        if test ! -x "$tool_specified"; then
32666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32667$as_echo "not found" >&6; }
32668          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32669        fi
32670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32671$as_echo "$tool_specified" >&6; }
32672      fi
32673    fi
32674  fi
32675
32676
32677
32678  # Only process if variable expands to non-empty
32679
32680  if test "x$AS" != x; then
32681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32682
32683  # First separate the path from the arguments. This will split at the first
32684  # space.
32685  complete="$AS"
32686  path="${complete%% *}"
32687  tmp="$complete EOL"
32688  arguments="${tmp#* }"
32689
32690  # Input might be given as Windows format, start by converting to
32691  # unix format.
32692  new_path=`$CYGPATH -u "$path"`
32693
32694  # Now try to locate executable using which
32695  new_path=`$WHICH "$new_path" 2> /dev/null`
32696  # bat and cmd files are not always considered executable in cygwin causing which
32697  # to not find them
32698  if test "x$new_path" = x \
32699      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32700      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32701    new_path=`$CYGPATH -u "$path"`
32702  fi
32703  if test "x$new_path" = x; then
32704    # Oops. Which didn't find the executable.
32705    # The splitting of arguments from the executable at a space might have been incorrect,
32706    # since paths with space are more likely in Windows. Give it another try with the whole
32707    # argument.
32708    path="$complete"
32709    arguments="EOL"
32710    new_path=`$CYGPATH -u "$path"`
32711    new_path=`$WHICH "$new_path" 2> /dev/null`
32712    # bat and cmd files are not always considered executable in cygwin causing which
32713    # to not find them
32714    if test "x$new_path" = x \
32715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32717      new_path=`$CYGPATH -u "$path"`
32718    fi
32719    if test "x$new_path" = x; then
32720      # It's still not found. Now this is an unrecoverable error.
32721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32722$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32723      has_space=`$ECHO "$complete" | $GREP " "`
32724      if test "x$has_space" != x; then
32725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32727      fi
32728      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32729    fi
32730  fi
32731
32732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32735  # "foo.exe" is OK but "foo" is an error.
32736  #
32737  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32738  # It is also a way to make sure we got the proper file name for the real test later on.
32739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32740  if test "x$test_shortpath" = x; then
32741    # Short path failed, file does not exist as specified.
32742    # Try adding .exe or .cmd
32743    if test -f "${new_path}.exe"; then
32744      input_to_shortpath="${new_path}.exe"
32745    elif test -f "${new_path}.cmd"; then
32746      input_to_shortpath="${new_path}.cmd"
32747    else
32748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32749$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32752      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32753    fi
32754  else
32755    input_to_shortpath="$new_path"
32756  fi
32757
32758  # Call helper function which possibly converts this using DOS-style short mode.
32759  # If so, the updated path is stored in $new_path.
32760  new_path="$input_to_shortpath"
32761
32762  input_path="$input_to_shortpath"
32763  # Check if we need to convert this using DOS-style short mode. If the path
32764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32765  # take no chances and rewrite it.
32766  # Note: m4 eats our [], so we need to use [ and ] instead.
32767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32768  if test "x$has_forbidden_chars" != x; then
32769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32773      # Going to short mode and back again did indeed matter. Since short mode is
32774      # case insensitive, let's make it lowercase to improve readability.
32775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32776      # Now convert it back to Unix-style (cygpath)
32777      input_path=`$CYGPATH -u "$shortmode_path"`
32778      new_path="$input_path"
32779    fi
32780  fi
32781
32782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32783  if test "x$test_cygdrive_prefix" = x; then
32784    # As a simple fix, exclude /usr/bin since it's not a real path.
32785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32787      # a path prefixed by /cygdrive for fixpath to work.
32788      new_path="$CYGWIN_ROOT_PATH$input_path"
32789    fi
32790  fi
32791
32792  # remove trailing .exe if any
32793  new_path="${new_path/%.exe/}"
32794
32795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32796
32797  # First separate the path from the arguments. This will split at the first
32798  # space.
32799  complete="$AS"
32800  path="${complete%% *}"
32801  tmp="$complete EOL"
32802  arguments="${tmp#* }"
32803
32804  # Input might be given as Windows format, start by converting to
32805  # unix format.
32806  new_path="$path"
32807
32808  windows_path="$new_path"
32809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32810    unix_path=`$CYGPATH -u "$windows_path"`
32811    new_path="$unix_path"
32812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32814    new_path="$unix_path"
32815  fi
32816
32817
32818  # Now try to locate executable using which
32819  new_path=`$WHICH "$new_path" 2> /dev/null`
32820
32821  if test "x$new_path" = x; then
32822    # Oops. Which didn't find the executable.
32823    # The splitting of arguments from the executable at a space might have been incorrect,
32824    # since paths with space are more likely in Windows. Give it another try with the whole
32825    # argument.
32826    path="$complete"
32827    arguments="EOL"
32828    new_path="$path"
32829
32830  windows_path="$new_path"
32831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32832    unix_path=`$CYGPATH -u "$windows_path"`
32833    new_path="$unix_path"
32834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32836    new_path="$unix_path"
32837  fi
32838
32839
32840    new_path=`$WHICH "$new_path" 2> /dev/null`
32841    # bat and cmd files are not always considered executable in MSYS causing which
32842    # to not find them
32843    if test "x$new_path" = x \
32844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32846      new_path="$path"
32847
32848  windows_path="$new_path"
32849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32850    unix_path=`$CYGPATH -u "$windows_path"`
32851    new_path="$unix_path"
32852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32854    new_path="$unix_path"
32855  fi
32856
32857    fi
32858
32859    if test "x$new_path" = x; then
32860      # It's still not found. Now this is an unrecoverable error.
32861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32862$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32863      has_space=`$ECHO "$complete" | $GREP " "`
32864      if test "x$has_space" != x; then
32865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32867      fi
32868      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32869    fi
32870  fi
32871
32872  # Now new_path has a complete unix path to the binary
32873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32874    # Keep paths in /bin as-is, but remove trailing .exe if any
32875    new_path="${new_path/%.exe/}"
32876    # Do not save /bin paths to all_fixpath_prefixes!
32877  else
32878    # Not in mixed or Windows style, start by that.
32879    new_path=`cmd //c echo $new_path`
32880
32881  input_path="$new_path"
32882  # Check if we need to convert this using DOS-style short mode. If the path
32883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32884  # take no chances and rewrite it.
32885  # Note: m4 eats our [], so we need to use [ and ] instead.
32886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32887  if test "x$has_forbidden_chars" != x; then
32888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32890  fi
32891
32892    # Output is in $new_path
32893
32894  windows_path="$new_path"
32895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32896    unix_path=`$CYGPATH -u "$windows_path"`
32897    new_path="$unix_path"
32898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32900    new_path="$unix_path"
32901  fi
32902
32903    # remove trailing .exe if any
32904    new_path="${new_path/%.exe/}"
32905
32906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32908  fi
32909
32910    else
32911      # We're on a unix platform. Hooray! :)
32912      # First separate the path from the arguments. This will split at the first
32913      # space.
32914      complete="$AS"
32915      path="${complete%% *}"
32916      tmp="$complete EOL"
32917      arguments="${tmp#* }"
32918
32919      # Cannot rely on the command "which" here since it doesn't always work.
32920      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32921      if test -z "$is_absolute_path"; then
32922        # Path to executable is not absolute. Find it.
32923        IFS_save="$IFS"
32924        IFS=:
32925        for p in $PATH; do
32926          if test -f "$p/$path" && test -x "$p/$path"; then
32927            new_path="$p/$path"
32928            break
32929          fi
32930        done
32931        IFS="$IFS_save"
32932      else
32933        # This is an absolute path, we can use it without further modifications.
32934        new_path="$path"
32935      fi
32936
32937      if test "x$new_path" = x; then
32938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32939$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32940        has_space=`$ECHO "$complete" | $GREP " "`
32941        if test "x$has_space" != x; then
32942          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32944        fi
32945        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32946      fi
32947    fi
32948
32949    # Now join together the path and the arguments once again
32950    if test "x$arguments" != xEOL; then
32951      new_complete="$new_path ${arguments% *}"
32952    else
32953      new_complete="$new_path"
32954    fi
32955
32956    if test "x$complete" != "x$new_complete"; then
32957      AS="$new_complete"
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32959$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32960    fi
32961  fi
32962
32963  else
32964    # FIXME: is this correct for microsoft?
32965    AS="$CC -c"
32966  fi
32967
32968
32969  #
32970  # Setup the archiver (AR)
32971  #
32972  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32973    # The corresponding ar tool is lib.exe (used to create static libraries)
32974    # Extract the first word of "lib", so it can be a program name with args.
32975set dummy lib; ac_word=$2
32976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32977$as_echo_n "checking for $ac_word... " >&6; }
32978if ${ac_cv_prog_AR+:} false; then :
32979  $as_echo_n "(cached) " >&6
32980else
32981  if test -n "$AR"; then
32982  ac_cv_prog_AR="$AR" # Let the user override the test.
32983else
32984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32985for as_dir in $PATH
32986do
32987  IFS=$as_save_IFS
32988  test -z "$as_dir" && as_dir=.
32989    for ac_exec_ext in '' $ac_executable_extensions; do
32990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32991    ac_cv_prog_AR="lib"
32992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32993    break 2
32994  fi
32995done
32996  done
32997IFS=$as_save_IFS
32998
32999fi
33000fi
33001AR=$ac_cv_prog_AR
33002if test -n "$AR"; then
33003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33004$as_echo "$AR" >&6; }
33005else
33006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33007$as_echo "no" >&6; }
33008fi
33009
33010
33011  else
33012
33013
33014  # Publish this variable in the help.
33015
33016
33017  if test "x$AR" = x; then
33018    # The variable is not set by user, try to locate tool using the code snippet
33019    if test -n "$ac_tool_prefix"; then
33020  for ac_prog in ar
33021  do
33022    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33023set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33025$as_echo_n "checking for $ac_word... " >&6; }
33026if ${ac_cv_prog_AR+:} false; then :
33027  $as_echo_n "(cached) " >&6
33028else
33029  if test -n "$AR"; then
33030  ac_cv_prog_AR="$AR" # Let the user override the test.
33031else
33032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33033for as_dir in $PATH
33034do
33035  IFS=$as_save_IFS
33036  test -z "$as_dir" && as_dir=.
33037    for ac_exec_ext in '' $ac_executable_extensions; do
33038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33039    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33041    break 2
33042  fi
33043done
33044  done
33045IFS=$as_save_IFS
33046
33047fi
33048fi
33049AR=$ac_cv_prog_AR
33050if test -n "$AR"; then
33051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33052$as_echo "$AR" >&6; }
33053else
33054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33055$as_echo "no" >&6; }
33056fi
33057
33058
33059    test -n "$AR" && break
33060  done
33061fi
33062if test -z "$AR"; then
33063  ac_ct_AR=$AR
33064  for ac_prog in ar
33065do
33066  # Extract the first word of "$ac_prog", so it can be a program name with args.
33067set dummy $ac_prog; ac_word=$2
33068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33069$as_echo_n "checking for $ac_word... " >&6; }
33070if ${ac_cv_prog_ac_ct_AR+:} false; then :
33071  $as_echo_n "(cached) " >&6
33072else
33073  if test -n "$ac_ct_AR"; then
33074  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33075else
33076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33077for as_dir in $PATH
33078do
33079  IFS=$as_save_IFS
33080  test -z "$as_dir" && as_dir=.
33081    for ac_exec_ext in '' $ac_executable_extensions; do
33082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33083    ac_cv_prog_ac_ct_AR="$ac_prog"
33084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33085    break 2
33086  fi
33087done
33088  done
33089IFS=$as_save_IFS
33090
33091fi
33092fi
33093ac_ct_AR=$ac_cv_prog_ac_ct_AR
33094if test -n "$ac_ct_AR"; then
33095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33096$as_echo "$ac_ct_AR" >&6; }
33097else
33098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33099$as_echo "no" >&6; }
33100fi
33101
33102
33103  test -n "$ac_ct_AR" && break
33104done
33105
33106  if test "x$ac_ct_AR" = x; then
33107    AR=""
33108  else
33109    case $cross_compiling:$ac_tool_warned in
33110yes:)
33111{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33112$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33113ac_tool_warned=yes ;;
33114esac
33115    AR=$ac_ct_AR
33116  fi
33117fi
33118
33119  else
33120    # The variable is set, but is it from the command line or the environment?
33121
33122    # Try to remove the string !AR! from our list.
33123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33125      # If it failed, the variable was not from the command line. Ignore it,
33126      # but warn the user (except for BASH, which is always set by the calling BASH).
33127      if test "xAR" != xBASH; then
33128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33129$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33130      fi
33131      # Try to locate tool using the code snippet
33132      if test -n "$ac_tool_prefix"; then
33133  for ac_prog in ar
33134  do
33135    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33136set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33138$as_echo_n "checking for $ac_word... " >&6; }
33139if ${ac_cv_prog_AR+:} false; then :
33140  $as_echo_n "(cached) " >&6
33141else
33142  if test -n "$AR"; then
33143  ac_cv_prog_AR="$AR" # Let the user override the test.
33144else
33145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33146for as_dir in $PATH
33147do
33148  IFS=$as_save_IFS
33149  test -z "$as_dir" && as_dir=.
33150    for ac_exec_ext in '' $ac_executable_extensions; do
33151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33152    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33154    break 2
33155  fi
33156done
33157  done
33158IFS=$as_save_IFS
33159
33160fi
33161fi
33162AR=$ac_cv_prog_AR
33163if test -n "$AR"; then
33164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33165$as_echo "$AR" >&6; }
33166else
33167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33168$as_echo "no" >&6; }
33169fi
33170
33171
33172    test -n "$AR" && break
33173  done
33174fi
33175if test -z "$AR"; then
33176  ac_ct_AR=$AR
33177  for ac_prog in ar
33178do
33179  # Extract the first word of "$ac_prog", so it can be a program name with args.
33180set dummy $ac_prog; ac_word=$2
33181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33182$as_echo_n "checking for $ac_word... " >&6; }
33183if ${ac_cv_prog_ac_ct_AR+:} false; then :
33184  $as_echo_n "(cached) " >&6
33185else
33186  if test -n "$ac_ct_AR"; then
33187  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33188else
33189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33190for as_dir in $PATH
33191do
33192  IFS=$as_save_IFS
33193  test -z "$as_dir" && as_dir=.
33194    for ac_exec_ext in '' $ac_executable_extensions; do
33195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33196    ac_cv_prog_ac_ct_AR="$ac_prog"
33197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33198    break 2
33199  fi
33200done
33201  done
33202IFS=$as_save_IFS
33203
33204fi
33205fi
33206ac_ct_AR=$ac_cv_prog_ac_ct_AR
33207if test -n "$ac_ct_AR"; then
33208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33209$as_echo "$ac_ct_AR" >&6; }
33210else
33211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33212$as_echo "no" >&6; }
33213fi
33214
33215
33216  test -n "$ac_ct_AR" && break
33217done
33218
33219  if test "x$ac_ct_AR" = x; then
33220    AR=""
33221  else
33222    case $cross_compiling:$ac_tool_warned in
33223yes:)
33224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33226ac_tool_warned=yes ;;
33227esac
33228    AR=$ac_ct_AR
33229  fi
33230fi
33231
33232    else
33233      # If it succeeded, then it was overridden by the user. We will use it
33234      # for the tool.
33235
33236      # First remove it from the list of overridden variables, so we can test
33237      # for unknown variables in the end.
33238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33239
33240      # Check if the provided tool contains a complete path.
33241      tool_specified="$AR"
33242      tool_basename="${tool_specified##*/}"
33243      if test "x$tool_basename" = "x$tool_specified"; then
33244        # A command without a complete path is provided, search $PATH.
33245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33246$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33247        # Extract the first word of "$tool_basename", so it can be a program name with args.
33248set dummy $tool_basename; ac_word=$2
33249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33250$as_echo_n "checking for $ac_word... " >&6; }
33251if ${ac_cv_path_AR+:} false; then :
33252  $as_echo_n "(cached) " >&6
33253else
33254  case $AR in
33255  [\\/]* | ?:[\\/]*)
33256  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33257  ;;
33258  *)
33259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33260for as_dir in $PATH
33261do
33262  IFS=$as_save_IFS
33263  test -z "$as_dir" && as_dir=.
33264    for ac_exec_ext in '' $ac_executable_extensions; do
33265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33266    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33268    break 2
33269  fi
33270done
33271  done
33272IFS=$as_save_IFS
33273
33274  ;;
33275esac
33276fi
33277AR=$ac_cv_path_AR
33278if test -n "$AR"; then
33279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33280$as_echo "$AR" >&6; }
33281else
33282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33283$as_echo "no" >&6; }
33284fi
33285
33286
33287        if test "x$AR" = x; then
33288          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33289        fi
33290      else
33291        # Otherwise we believe it is a complete path. Use it as it is.
33292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33293$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33295$as_echo_n "checking for AR... " >&6; }
33296        if test ! -x "$tool_specified"; then
33297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33298$as_echo "not found" >&6; }
33299          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33300        fi
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33302$as_echo "$tool_specified" >&6; }
33303      fi
33304    fi
33305  fi
33306
33307
33308  fi
33309
33310  # Only process if variable expands to non-empty
33311
33312  if test "x$AR" != x; then
33313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33314
33315  # First separate the path from the arguments. This will split at the first
33316  # space.
33317  complete="$AR"
33318  path="${complete%% *}"
33319  tmp="$complete EOL"
33320  arguments="${tmp#* }"
33321
33322  # Input might be given as Windows format, start by converting to
33323  # unix format.
33324  new_path=`$CYGPATH -u "$path"`
33325
33326  # Now try to locate executable using which
33327  new_path=`$WHICH "$new_path" 2> /dev/null`
33328  # bat and cmd files are not always considered executable in cygwin causing which
33329  # to not find them
33330  if test "x$new_path" = x \
33331      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33332      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33333    new_path=`$CYGPATH -u "$path"`
33334  fi
33335  if test "x$new_path" = x; then
33336    # Oops. Which didn't find the executable.
33337    # The splitting of arguments from the executable at a space might have been incorrect,
33338    # since paths with space are more likely in Windows. Give it another try with the whole
33339    # argument.
33340    path="$complete"
33341    arguments="EOL"
33342    new_path=`$CYGPATH -u "$path"`
33343    new_path=`$WHICH "$new_path" 2> /dev/null`
33344    # bat and cmd files are not always considered executable in cygwin causing which
33345    # to not find them
33346    if test "x$new_path" = x \
33347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33349      new_path=`$CYGPATH -u "$path"`
33350    fi
33351    if test "x$new_path" = x; then
33352      # It's still not found. Now this is an unrecoverable error.
33353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33354$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33355      has_space=`$ECHO "$complete" | $GREP " "`
33356      if test "x$has_space" != x; then
33357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33359      fi
33360      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33361    fi
33362  fi
33363
33364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33367  # "foo.exe" is OK but "foo" is an error.
33368  #
33369  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33370  # It is also a way to make sure we got the proper file name for the real test later on.
33371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33372  if test "x$test_shortpath" = x; then
33373    # Short path failed, file does not exist as specified.
33374    # Try adding .exe or .cmd
33375    if test -f "${new_path}.exe"; then
33376      input_to_shortpath="${new_path}.exe"
33377    elif test -f "${new_path}.cmd"; then
33378      input_to_shortpath="${new_path}.cmd"
33379    else
33380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33381$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33384      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33385    fi
33386  else
33387    input_to_shortpath="$new_path"
33388  fi
33389
33390  # Call helper function which possibly converts this using DOS-style short mode.
33391  # If so, the updated path is stored in $new_path.
33392  new_path="$input_to_shortpath"
33393
33394  input_path="$input_to_shortpath"
33395  # Check if we need to convert this using DOS-style short mode. If the path
33396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33397  # take no chances and rewrite it.
33398  # Note: m4 eats our [], so we need to use [ and ] instead.
33399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33400  if test "x$has_forbidden_chars" != x; then
33401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33405      # Going to short mode and back again did indeed matter. Since short mode is
33406      # case insensitive, let's make it lowercase to improve readability.
33407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33408      # Now convert it back to Unix-style (cygpath)
33409      input_path=`$CYGPATH -u "$shortmode_path"`
33410      new_path="$input_path"
33411    fi
33412  fi
33413
33414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33415  if test "x$test_cygdrive_prefix" = x; then
33416    # As a simple fix, exclude /usr/bin since it's not a real path.
33417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33419      # a path prefixed by /cygdrive for fixpath to work.
33420      new_path="$CYGWIN_ROOT_PATH$input_path"
33421    fi
33422  fi
33423
33424  # remove trailing .exe if any
33425  new_path="${new_path/%.exe/}"
33426
33427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33428
33429  # First separate the path from the arguments. This will split at the first
33430  # space.
33431  complete="$AR"
33432  path="${complete%% *}"
33433  tmp="$complete EOL"
33434  arguments="${tmp#* }"
33435
33436  # Input might be given as Windows format, start by converting to
33437  # unix format.
33438  new_path="$path"
33439
33440  windows_path="$new_path"
33441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33442    unix_path=`$CYGPATH -u "$windows_path"`
33443    new_path="$unix_path"
33444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33446    new_path="$unix_path"
33447  fi
33448
33449
33450  # Now try to locate executable using which
33451  new_path=`$WHICH "$new_path" 2> /dev/null`
33452
33453  if test "x$new_path" = x; then
33454    # Oops. Which didn't find the executable.
33455    # The splitting of arguments from the executable at a space might have been incorrect,
33456    # since paths with space are more likely in Windows. Give it another try with the whole
33457    # argument.
33458    path="$complete"
33459    arguments="EOL"
33460    new_path="$path"
33461
33462  windows_path="$new_path"
33463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33464    unix_path=`$CYGPATH -u "$windows_path"`
33465    new_path="$unix_path"
33466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33468    new_path="$unix_path"
33469  fi
33470
33471
33472    new_path=`$WHICH "$new_path" 2> /dev/null`
33473    # bat and cmd files are not always considered executable in MSYS causing which
33474    # to not find them
33475    if test "x$new_path" = x \
33476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33478      new_path="$path"
33479
33480  windows_path="$new_path"
33481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33482    unix_path=`$CYGPATH -u "$windows_path"`
33483    new_path="$unix_path"
33484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33486    new_path="$unix_path"
33487  fi
33488
33489    fi
33490
33491    if test "x$new_path" = x; then
33492      # It's still not found. Now this is an unrecoverable error.
33493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33494$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33495      has_space=`$ECHO "$complete" | $GREP " "`
33496      if test "x$has_space" != x; then
33497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33499      fi
33500      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33501    fi
33502  fi
33503
33504  # Now new_path has a complete unix path to the binary
33505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33506    # Keep paths in /bin as-is, but remove trailing .exe if any
33507    new_path="${new_path/%.exe/}"
33508    # Do not save /bin paths to all_fixpath_prefixes!
33509  else
33510    # Not in mixed or Windows style, start by that.
33511    new_path=`cmd //c echo $new_path`
33512
33513  input_path="$new_path"
33514  # Check if we need to convert this using DOS-style short mode. If the path
33515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33516  # take no chances and rewrite it.
33517  # Note: m4 eats our [], so we need to use [ and ] instead.
33518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33519  if test "x$has_forbidden_chars" != x; then
33520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33522  fi
33523
33524    # Output is in $new_path
33525
33526  windows_path="$new_path"
33527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33528    unix_path=`$CYGPATH -u "$windows_path"`
33529    new_path="$unix_path"
33530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33532    new_path="$unix_path"
33533  fi
33534
33535    # remove trailing .exe if any
33536    new_path="${new_path/%.exe/}"
33537
33538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33540  fi
33541
33542    else
33543      # We're on a unix platform. Hooray! :)
33544      # First separate the path from the arguments. This will split at the first
33545      # space.
33546      complete="$AR"
33547      path="${complete%% *}"
33548      tmp="$complete EOL"
33549      arguments="${tmp#* }"
33550
33551      # Cannot rely on the command "which" here since it doesn't always work.
33552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33553      if test -z "$is_absolute_path"; then
33554        # Path to executable is not absolute. Find it.
33555        IFS_save="$IFS"
33556        IFS=:
33557        for p in $PATH; do
33558          if test -f "$p/$path" && test -x "$p/$path"; then
33559            new_path="$p/$path"
33560            break
33561          fi
33562        done
33563        IFS="$IFS_save"
33564      else
33565        # This is an absolute path, we can use it without further modifications.
33566        new_path="$path"
33567      fi
33568
33569      if test "x$new_path" = x; then
33570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33571$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33572        has_space=`$ECHO "$complete" | $GREP " "`
33573        if test "x$has_space" != x; then
33574          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33575$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33576        fi
33577        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33578      fi
33579    fi
33580
33581    # Now join together the path and the arguments once again
33582    if test "x$arguments" != xEOL; then
33583      new_complete="$new_path ${arguments% *}"
33584    else
33585      new_complete="$new_path"
33586    fi
33587
33588    if test "x$complete" != "x$new_complete"; then
33589      AR="$new_complete"
33590      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33591$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33592    fi
33593  fi
33594
33595
33596
33597  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33598
33599
33600  # Publish this variable in the help.
33601
33602
33603  if test "x$LIPO" = x; then
33604    # The variable is not set by user, try to locate tool using the code snippet
33605    for ac_prog in lipo
33606do
33607  # Extract the first word of "$ac_prog", so it can be a program name with args.
33608set dummy $ac_prog; ac_word=$2
33609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33610$as_echo_n "checking for $ac_word... " >&6; }
33611if ${ac_cv_path_LIPO+:} false; then :
33612  $as_echo_n "(cached) " >&6
33613else
33614  case $LIPO in
33615  [\\/]* | ?:[\\/]*)
33616  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33617  ;;
33618  *)
33619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33620for as_dir in $PATH
33621do
33622  IFS=$as_save_IFS
33623  test -z "$as_dir" && as_dir=.
33624    for ac_exec_ext in '' $ac_executable_extensions; do
33625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33626    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33628    break 2
33629  fi
33630done
33631  done
33632IFS=$as_save_IFS
33633
33634  ;;
33635esac
33636fi
33637LIPO=$ac_cv_path_LIPO
33638if test -n "$LIPO"; then
33639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33640$as_echo "$LIPO" >&6; }
33641else
33642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33643$as_echo "no" >&6; }
33644fi
33645
33646
33647  test -n "$LIPO" && break
33648done
33649
33650  else
33651    # The variable is set, but is it from the command line or the environment?
33652
33653    # Try to remove the string !LIPO! from our list.
33654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33656      # If it failed, the variable was not from the command line. Ignore it,
33657      # but warn the user (except for BASH, which is always set by the calling BASH).
33658      if test "xLIPO" != xBASH; then
33659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33660$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33661      fi
33662      # Try to locate tool using the code snippet
33663      for ac_prog in lipo
33664do
33665  # Extract the first word of "$ac_prog", so it can be a program name with args.
33666set dummy $ac_prog; ac_word=$2
33667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33668$as_echo_n "checking for $ac_word... " >&6; }
33669if ${ac_cv_path_LIPO+:} false; then :
33670  $as_echo_n "(cached) " >&6
33671else
33672  case $LIPO in
33673  [\\/]* | ?:[\\/]*)
33674  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33675  ;;
33676  *)
33677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33678for as_dir in $PATH
33679do
33680  IFS=$as_save_IFS
33681  test -z "$as_dir" && as_dir=.
33682    for ac_exec_ext in '' $ac_executable_extensions; do
33683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33684    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33686    break 2
33687  fi
33688done
33689  done
33690IFS=$as_save_IFS
33691
33692  ;;
33693esac
33694fi
33695LIPO=$ac_cv_path_LIPO
33696if test -n "$LIPO"; then
33697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33698$as_echo "$LIPO" >&6; }
33699else
33700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33701$as_echo "no" >&6; }
33702fi
33703
33704
33705  test -n "$LIPO" && break
33706done
33707
33708    else
33709      # If it succeeded, then it was overridden by the user. We will use it
33710      # for the tool.
33711
33712      # First remove it from the list of overridden variables, so we can test
33713      # for unknown variables in the end.
33714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33715
33716      # Check if the provided tool contains a complete path.
33717      tool_specified="$LIPO"
33718      tool_basename="${tool_specified##*/}"
33719      if test "x$tool_basename" = "x$tool_specified"; then
33720        # A command without a complete path is provided, search $PATH.
33721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33722$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33723        # Extract the first word of "$tool_basename", so it can be a program name with args.
33724set dummy $tool_basename; ac_word=$2
33725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33726$as_echo_n "checking for $ac_word... " >&6; }
33727if ${ac_cv_path_LIPO+:} false; then :
33728  $as_echo_n "(cached) " >&6
33729else
33730  case $LIPO in
33731  [\\/]* | ?:[\\/]*)
33732  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33733  ;;
33734  *)
33735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33736for as_dir in $PATH
33737do
33738  IFS=$as_save_IFS
33739  test -z "$as_dir" && as_dir=.
33740    for ac_exec_ext in '' $ac_executable_extensions; do
33741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33742    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33744    break 2
33745  fi
33746done
33747  done
33748IFS=$as_save_IFS
33749
33750  ;;
33751esac
33752fi
33753LIPO=$ac_cv_path_LIPO
33754if test -n "$LIPO"; then
33755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33756$as_echo "$LIPO" >&6; }
33757else
33758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33759$as_echo "no" >&6; }
33760fi
33761
33762
33763        if test "x$LIPO" = x; then
33764          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33765        fi
33766      else
33767        # Otherwise we believe it is a complete path. Use it as it is.
33768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33769$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33771$as_echo_n "checking for LIPO... " >&6; }
33772        if test ! -x "$tool_specified"; then
33773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33774$as_echo "not found" >&6; }
33775          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33776        fi
33777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33778$as_echo "$tool_specified" >&6; }
33779      fi
33780    fi
33781  fi
33782
33783
33784
33785  # Only process if variable expands to non-empty
33786
33787  if test "x$LIPO" != x; then
33788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33789
33790  # First separate the path from the arguments. This will split at the first
33791  # space.
33792  complete="$LIPO"
33793  path="${complete%% *}"
33794  tmp="$complete EOL"
33795  arguments="${tmp#* }"
33796
33797  # Input might be given as Windows format, start by converting to
33798  # unix format.
33799  new_path=`$CYGPATH -u "$path"`
33800
33801  # Now try to locate executable using which
33802  new_path=`$WHICH "$new_path" 2> /dev/null`
33803  # bat and cmd files are not always considered executable in cygwin causing which
33804  # to not find them
33805  if test "x$new_path" = x \
33806      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33807      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33808    new_path=`$CYGPATH -u "$path"`
33809  fi
33810  if test "x$new_path" = x; then
33811    # Oops. Which didn't find the executable.
33812    # The splitting of arguments from the executable at a space might have been incorrect,
33813    # since paths with space are more likely in Windows. Give it another try with the whole
33814    # argument.
33815    path="$complete"
33816    arguments="EOL"
33817    new_path=`$CYGPATH -u "$path"`
33818    new_path=`$WHICH "$new_path" 2> /dev/null`
33819    # bat and cmd files are not always considered executable in cygwin causing which
33820    # to not find them
33821    if test "x$new_path" = x \
33822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33824      new_path=`$CYGPATH -u "$path"`
33825    fi
33826    if test "x$new_path" = x; then
33827      # It's still not found. Now this is an unrecoverable error.
33828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33829$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33830      has_space=`$ECHO "$complete" | $GREP " "`
33831      if test "x$has_space" != x; then
33832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33834      fi
33835      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33836    fi
33837  fi
33838
33839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33842  # "foo.exe" is OK but "foo" is an error.
33843  #
33844  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33845  # It is also a way to make sure we got the proper file name for the real test later on.
33846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33847  if test "x$test_shortpath" = x; then
33848    # Short path failed, file does not exist as specified.
33849    # Try adding .exe or .cmd
33850    if test -f "${new_path}.exe"; then
33851      input_to_shortpath="${new_path}.exe"
33852    elif test -f "${new_path}.cmd"; then
33853      input_to_shortpath="${new_path}.cmd"
33854    else
33855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33856$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33859      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33860    fi
33861  else
33862    input_to_shortpath="$new_path"
33863  fi
33864
33865  # Call helper function which possibly converts this using DOS-style short mode.
33866  # If so, the updated path is stored in $new_path.
33867  new_path="$input_to_shortpath"
33868
33869  input_path="$input_to_shortpath"
33870  # Check if we need to convert this using DOS-style short mode. If the path
33871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33872  # take no chances and rewrite it.
33873  # Note: m4 eats our [], so we need to use [ and ] instead.
33874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33875  if test "x$has_forbidden_chars" != x; then
33876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33880      # Going to short mode and back again did indeed matter. Since short mode is
33881      # case insensitive, let's make it lowercase to improve readability.
33882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33883      # Now convert it back to Unix-style (cygpath)
33884      input_path=`$CYGPATH -u "$shortmode_path"`
33885      new_path="$input_path"
33886    fi
33887  fi
33888
33889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33890  if test "x$test_cygdrive_prefix" = x; then
33891    # As a simple fix, exclude /usr/bin since it's not a real path.
33892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33894      # a path prefixed by /cygdrive for fixpath to work.
33895      new_path="$CYGWIN_ROOT_PATH$input_path"
33896    fi
33897  fi
33898
33899  # remove trailing .exe if any
33900  new_path="${new_path/%.exe/}"
33901
33902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33903
33904  # First separate the path from the arguments. This will split at the first
33905  # space.
33906  complete="$LIPO"
33907  path="${complete%% *}"
33908  tmp="$complete EOL"
33909  arguments="${tmp#* }"
33910
33911  # Input might be given as Windows format, start by converting to
33912  # unix format.
33913  new_path="$path"
33914
33915  windows_path="$new_path"
33916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33917    unix_path=`$CYGPATH -u "$windows_path"`
33918    new_path="$unix_path"
33919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33921    new_path="$unix_path"
33922  fi
33923
33924
33925  # Now try to locate executable using which
33926  new_path=`$WHICH "$new_path" 2> /dev/null`
33927
33928  if test "x$new_path" = x; then
33929    # Oops. Which didn't find the executable.
33930    # The splitting of arguments from the executable at a space might have been incorrect,
33931    # since paths with space are more likely in Windows. Give it another try with the whole
33932    # argument.
33933    path="$complete"
33934    arguments="EOL"
33935    new_path="$path"
33936
33937  windows_path="$new_path"
33938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33939    unix_path=`$CYGPATH -u "$windows_path"`
33940    new_path="$unix_path"
33941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33943    new_path="$unix_path"
33944  fi
33945
33946
33947    new_path=`$WHICH "$new_path" 2> /dev/null`
33948    # bat and cmd files are not always considered executable in MSYS causing which
33949    # to not find them
33950    if test "x$new_path" = x \
33951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33953      new_path="$path"
33954
33955  windows_path="$new_path"
33956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33957    unix_path=`$CYGPATH -u "$windows_path"`
33958    new_path="$unix_path"
33959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33961    new_path="$unix_path"
33962  fi
33963
33964    fi
33965
33966    if test "x$new_path" = x; then
33967      # It's still not found. Now this is an unrecoverable error.
33968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33969$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33970      has_space=`$ECHO "$complete" | $GREP " "`
33971      if test "x$has_space" != x; then
33972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33974      fi
33975      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33976    fi
33977  fi
33978
33979  # Now new_path has a complete unix path to the binary
33980  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33981    # Keep paths in /bin as-is, but remove trailing .exe if any
33982    new_path="${new_path/%.exe/}"
33983    # Do not save /bin paths to all_fixpath_prefixes!
33984  else
33985    # Not in mixed or Windows style, start by that.
33986    new_path=`cmd //c echo $new_path`
33987
33988  input_path="$new_path"
33989  # Check if we need to convert this using DOS-style short mode. If the path
33990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33991  # take no chances and rewrite it.
33992  # Note: m4 eats our [], so we need to use [ and ] instead.
33993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33994  if test "x$has_forbidden_chars" != x; then
33995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33997  fi
33998
33999    # Output is in $new_path
34000
34001  windows_path="$new_path"
34002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34003    unix_path=`$CYGPATH -u "$windows_path"`
34004    new_path="$unix_path"
34005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34007    new_path="$unix_path"
34008  fi
34009
34010    # remove trailing .exe if any
34011    new_path="${new_path/%.exe/}"
34012
34013    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34014    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34015  fi
34016
34017    else
34018      # We're on a unix platform. Hooray! :)
34019      # First separate the path from the arguments. This will split at the first
34020      # space.
34021      complete="$LIPO"
34022      path="${complete%% *}"
34023      tmp="$complete EOL"
34024      arguments="${tmp#* }"
34025
34026      # Cannot rely on the command "which" here since it doesn't always work.
34027      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34028      if test -z "$is_absolute_path"; then
34029        # Path to executable is not absolute. Find it.
34030        IFS_save="$IFS"
34031        IFS=:
34032        for p in $PATH; do
34033          if test -f "$p/$path" && test -x "$p/$path"; then
34034            new_path="$p/$path"
34035            break
34036          fi
34037        done
34038        IFS="$IFS_save"
34039      else
34040        # This is an absolute path, we can use it without further modifications.
34041        new_path="$path"
34042      fi
34043
34044      if test "x$new_path" = x; then
34045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34046$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34047        has_space=`$ECHO "$complete" | $GREP " "`
34048        if test "x$has_space" != x; then
34049          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34050$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34051        fi
34052        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34053      fi
34054    fi
34055
34056    # Now join together the path and the arguments once again
34057    if test "x$arguments" != xEOL; then
34058      new_complete="$new_path ${arguments% *}"
34059    else
34060      new_complete="$new_path"
34061    fi
34062
34063    if test "x$complete" != "x$new_complete"; then
34064      LIPO="$new_complete"
34065      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34066$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34067    fi
34068  fi
34069
34070  fi
34071
34072  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34073    # Extract the first word of "mt", so it can be a program name with args.
34074set dummy mt; ac_word=$2
34075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34076$as_echo_n "checking for $ac_word... " >&6; }
34077if ${ac_cv_prog_MT+:} false; then :
34078  $as_echo_n "(cached) " >&6
34079else
34080  if test -n "$MT"; then
34081  ac_cv_prog_MT="$MT" # Let the user override the test.
34082else
34083  ac_prog_rejected=no
34084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34085for as_dir in $PATH
34086do
34087  IFS=$as_save_IFS
34088  test -z "$as_dir" && as_dir=.
34089    for ac_exec_ext in '' $ac_executable_extensions; do
34090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34091    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34092       ac_prog_rejected=yes
34093       continue
34094     fi
34095    ac_cv_prog_MT="mt"
34096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34097    break 2
34098  fi
34099done
34100  done
34101IFS=$as_save_IFS
34102
34103if test $ac_prog_rejected = yes; then
34104  # We found a bogon in the path, so make sure we never use it.
34105  set dummy $ac_cv_prog_MT
34106  shift
34107  if test $# != 0; then
34108    # We chose a different compiler from the bogus one.
34109    # However, it has the same basename, so the bogon will be chosen
34110    # first if we set MT to just the basename; use the full file name.
34111    shift
34112    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34113  fi
34114fi
34115fi
34116fi
34117MT=$ac_cv_prog_MT
34118if test -n "$MT"; then
34119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34120$as_echo "$MT" >&6; }
34121else
34122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34123$as_echo "no" >&6; }
34124fi
34125
34126
34127
34128  # Only process if variable expands to non-empty
34129
34130  if test "x$MT" != x; then
34131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34132
34133  # First separate the path from the arguments. This will split at the first
34134  # space.
34135  complete="$MT"
34136  path="${complete%% *}"
34137  tmp="$complete EOL"
34138  arguments="${tmp#* }"
34139
34140  # Input might be given as Windows format, start by converting to
34141  # unix format.
34142  new_path=`$CYGPATH -u "$path"`
34143
34144  # Now try to locate executable using which
34145  new_path=`$WHICH "$new_path" 2> /dev/null`
34146  # bat and cmd files are not always considered executable in cygwin causing which
34147  # to not find them
34148  if test "x$new_path" = x \
34149      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34150      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34151    new_path=`$CYGPATH -u "$path"`
34152  fi
34153  if test "x$new_path" = x; then
34154    # Oops. Which didn't find the executable.
34155    # The splitting of arguments from the executable at a space might have been incorrect,
34156    # since paths with space are more likely in Windows. Give it another try with the whole
34157    # argument.
34158    path="$complete"
34159    arguments="EOL"
34160    new_path=`$CYGPATH -u "$path"`
34161    new_path=`$WHICH "$new_path" 2> /dev/null`
34162    # bat and cmd files are not always considered executable in cygwin causing which
34163    # to not find them
34164    if test "x$new_path" = x \
34165        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34166        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34167      new_path=`$CYGPATH -u "$path"`
34168    fi
34169    if test "x$new_path" = x; then
34170      # It's still not found. Now this is an unrecoverable error.
34171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34172$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34173      has_space=`$ECHO "$complete" | $GREP " "`
34174      if test "x$has_space" != x; then
34175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34177      fi
34178      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34179    fi
34180  fi
34181
34182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34185  # "foo.exe" is OK but "foo" is an error.
34186  #
34187  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34188  # It is also a way to make sure we got the proper file name for the real test later on.
34189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34190  if test "x$test_shortpath" = x; then
34191    # Short path failed, file does not exist as specified.
34192    # Try adding .exe or .cmd
34193    if test -f "${new_path}.exe"; then
34194      input_to_shortpath="${new_path}.exe"
34195    elif test -f "${new_path}.cmd"; then
34196      input_to_shortpath="${new_path}.cmd"
34197    else
34198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34199$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34200      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34201$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34202      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34203    fi
34204  else
34205    input_to_shortpath="$new_path"
34206  fi
34207
34208  # Call helper function which possibly converts this using DOS-style short mode.
34209  # If so, the updated path is stored in $new_path.
34210  new_path="$input_to_shortpath"
34211
34212  input_path="$input_to_shortpath"
34213  # Check if we need to convert this using DOS-style short mode. If the path
34214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34215  # take no chances and rewrite it.
34216  # Note: m4 eats our [], so we need to use [ and ] instead.
34217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34218  if test "x$has_forbidden_chars" != x; then
34219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34223      # Going to short mode and back again did indeed matter. Since short mode is
34224      # case insensitive, let's make it lowercase to improve readability.
34225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34226      # Now convert it back to Unix-style (cygpath)
34227      input_path=`$CYGPATH -u "$shortmode_path"`
34228      new_path="$input_path"
34229    fi
34230  fi
34231
34232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34233  if test "x$test_cygdrive_prefix" = x; then
34234    # As a simple fix, exclude /usr/bin since it's not a real path.
34235    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34237      # a path prefixed by /cygdrive for fixpath to work.
34238      new_path="$CYGWIN_ROOT_PATH$input_path"
34239    fi
34240  fi
34241
34242  # remove trailing .exe if any
34243  new_path="${new_path/%.exe/}"
34244
34245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34246
34247  # First separate the path from the arguments. This will split at the first
34248  # space.
34249  complete="$MT"
34250  path="${complete%% *}"
34251  tmp="$complete EOL"
34252  arguments="${tmp#* }"
34253
34254  # Input might be given as Windows format, start by converting to
34255  # unix format.
34256  new_path="$path"
34257
34258  windows_path="$new_path"
34259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34260    unix_path=`$CYGPATH -u "$windows_path"`
34261    new_path="$unix_path"
34262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34264    new_path="$unix_path"
34265  fi
34266
34267
34268  # Now try to locate executable using which
34269  new_path=`$WHICH "$new_path" 2> /dev/null`
34270
34271  if test "x$new_path" = x; then
34272    # Oops. Which didn't find the executable.
34273    # The splitting of arguments from the executable at a space might have been incorrect,
34274    # since paths with space are more likely in Windows. Give it another try with the whole
34275    # argument.
34276    path="$complete"
34277    arguments="EOL"
34278    new_path="$path"
34279
34280  windows_path="$new_path"
34281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34282    unix_path=`$CYGPATH -u "$windows_path"`
34283    new_path="$unix_path"
34284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34286    new_path="$unix_path"
34287  fi
34288
34289
34290    new_path=`$WHICH "$new_path" 2> /dev/null`
34291    # bat and cmd files are not always considered executable in MSYS causing which
34292    # to not find them
34293    if test "x$new_path" = x \
34294        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34295        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34296      new_path="$path"
34297
34298  windows_path="$new_path"
34299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34300    unix_path=`$CYGPATH -u "$windows_path"`
34301    new_path="$unix_path"
34302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34304    new_path="$unix_path"
34305  fi
34306
34307    fi
34308
34309    if test "x$new_path" = x; then
34310      # It's still not found. Now this is an unrecoverable error.
34311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34312$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34313      has_space=`$ECHO "$complete" | $GREP " "`
34314      if test "x$has_space" != x; then
34315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34317      fi
34318      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34319    fi
34320  fi
34321
34322  # Now new_path has a complete unix path to the binary
34323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34324    # Keep paths in /bin as-is, but remove trailing .exe if any
34325    new_path="${new_path/%.exe/}"
34326    # Do not save /bin paths to all_fixpath_prefixes!
34327  else
34328    # Not in mixed or Windows style, start by that.
34329    new_path=`cmd //c echo $new_path`
34330
34331  input_path="$new_path"
34332  # Check if we need to convert this using DOS-style short mode. If the path
34333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34334  # take no chances and rewrite it.
34335  # Note: m4 eats our [], so we need to use [ and ] instead.
34336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34337  if test "x$has_forbidden_chars" != x; then
34338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34340  fi
34341
34342    # Output is in $new_path
34343
34344  windows_path="$new_path"
34345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34346    unix_path=`$CYGPATH -u "$windows_path"`
34347    new_path="$unix_path"
34348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34350    new_path="$unix_path"
34351  fi
34352
34353    # remove trailing .exe if any
34354    new_path="${new_path/%.exe/}"
34355
34356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34358  fi
34359
34360    else
34361      # We're on a unix platform. Hooray! :)
34362      # First separate the path from the arguments. This will split at the first
34363      # space.
34364      complete="$MT"
34365      path="${complete%% *}"
34366      tmp="$complete EOL"
34367      arguments="${tmp#* }"
34368
34369      # Cannot rely on the command "which" here since it doesn't always work.
34370      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34371      if test -z "$is_absolute_path"; then
34372        # Path to executable is not absolute. Find it.
34373        IFS_save="$IFS"
34374        IFS=:
34375        for p in $PATH; do
34376          if test -f "$p/$path" && test -x "$p/$path"; then
34377            new_path="$p/$path"
34378            break
34379          fi
34380        done
34381        IFS="$IFS_save"
34382      else
34383        # This is an absolute path, we can use it without further modifications.
34384        new_path="$path"
34385      fi
34386
34387      if test "x$new_path" = x; then
34388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34389$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34390        has_space=`$ECHO "$complete" | $GREP " "`
34391        if test "x$has_space" != x; then
34392          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34393$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34394        fi
34395        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34396      fi
34397    fi
34398
34399    # Now join together the path and the arguments once again
34400    if test "x$arguments" != xEOL; then
34401      new_complete="$new_path ${arguments% *}"
34402    else
34403      new_complete="$new_path"
34404    fi
34405
34406    if test "x$complete" != "x$new_complete"; then
34407      MT="$new_complete"
34408      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34409$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34410    fi
34411  fi
34412
34413    # Setup the resource compiler (RC)
34414    # Extract the first word of "rc", so it can be a program name with args.
34415set dummy rc; ac_word=$2
34416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34417$as_echo_n "checking for $ac_word... " >&6; }
34418if ${ac_cv_prog_RC+:} false; then :
34419  $as_echo_n "(cached) " >&6
34420else
34421  if test -n "$RC"; then
34422  ac_cv_prog_RC="$RC" # Let the user override the test.
34423else
34424  ac_prog_rejected=no
34425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34426for as_dir in $PATH
34427do
34428  IFS=$as_save_IFS
34429  test -z "$as_dir" && as_dir=.
34430    for ac_exec_ext in '' $ac_executable_extensions; do
34431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34432    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34433       ac_prog_rejected=yes
34434       continue
34435     fi
34436    ac_cv_prog_RC="rc"
34437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34438    break 2
34439  fi
34440done
34441  done
34442IFS=$as_save_IFS
34443
34444if test $ac_prog_rejected = yes; then
34445  # We found a bogon in the path, so make sure we never use it.
34446  set dummy $ac_cv_prog_RC
34447  shift
34448  if test $# != 0; then
34449    # We chose a different compiler from the bogus one.
34450    # However, it has the same basename, so the bogon will be chosen
34451    # first if we set RC to just the basename; use the full file name.
34452    shift
34453    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34454  fi
34455fi
34456fi
34457fi
34458RC=$ac_cv_prog_RC
34459if test -n "$RC"; then
34460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34461$as_echo "$RC" >&6; }
34462else
34463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34464$as_echo "no" >&6; }
34465fi
34466
34467
34468
34469  # Only process if variable expands to non-empty
34470
34471  if test "x$RC" != x; then
34472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34473
34474  # First separate the path from the arguments. This will split at the first
34475  # space.
34476  complete="$RC"
34477  path="${complete%% *}"
34478  tmp="$complete EOL"
34479  arguments="${tmp#* }"
34480
34481  # Input might be given as Windows format, start by converting to
34482  # unix format.
34483  new_path=`$CYGPATH -u "$path"`
34484
34485  # Now try to locate executable using which
34486  new_path=`$WHICH "$new_path" 2> /dev/null`
34487  # bat and cmd files are not always considered executable in cygwin causing which
34488  # to not find them
34489  if test "x$new_path" = x \
34490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34492    new_path=`$CYGPATH -u "$path"`
34493  fi
34494  if test "x$new_path" = x; then
34495    # Oops. Which didn't find the executable.
34496    # The splitting of arguments from the executable at a space might have been incorrect,
34497    # since paths with space are more likely in Windows. Give it another try with the whole
34498    # argument.
34499    path="$complete"
34500    arguments="EOL"
34501    new_path=`$CYGPATH -u "$path"`
34502    new_path=`$WHICH "$new_path" 2> /dev/null`
34503    # bat and cmd files are not always considered executable in cygwin causing which
34504    # to not find them
34505    if test "x$new_path" = x \
34506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34508      new_path=`$CYGPATH -u "$path"`
34509    fi
34510    if test "x$new_path" = x; then
34511      # It's still not found. Now this is an unrecoverable error.
34512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34513$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34514      has_space=`$ECHO "$complete" | $GREP " "`
34515      if test "x$has_space" != x; then
34516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34518      fi
34519      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34520    fi
34521  fi
34522
34523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34526  # "foo.exe" is OK but "foo" is an error.
34527  #
34528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34529  # It is also a way to make sure we got the proper file name for the real test later on.
34530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34531  if test "x$test_shortpath" = x; then
34532    # Short path failed, file does not exist as specified.
34533    # Try adding .exe or .cmd
34534    if test -f "${new_path}.exe"; then
34535      input_to_shortpath="${new_path}.exe"
34536    elif test -f "${new_path}.cmd"; then
34537      input_to_shortpath="${new_path}.cmd"
34538    else
34539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34540$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34543      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34544    fi
34545  else
34546    input_to_shortpath="$new_path"
34547  fi
34548
34549  # Call helper function which possibly converts this using DOS-style short mode.
34550  # If so, the updated path is stored in $new_path.
34551  new_path="$input_to_shortpath"
34552
34553  input_path="$input_to_shortpath"
34554  # Check if we need to convert this using DOS-style short mode. If the path
34555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34556  # take no chances and rewrite it.
34557  # Note: m4 eats our [], so we need to use [ and ] instead.
34558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34559  if test "x$has_forbidden_chars" != x; then
34560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34564      # Going to short mode and back again did indeed matter. Since short mode is
34565      # case insensitive, let's make it lowercase to improve readability.
34566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34567      # Now convert it back to Unix-style (cygpath)
34568      input_path=`$CYGPATH -u "$shortmode_path"`
34569      new_path="$input_path"
34570    fi
34571  fi
34572
34573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34574  if test "x$test_cygdrive_prefix" = x; then
34575    # As a simple fix, exclude /usr/bin since it's not a real path.
34576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34578      # a path prefixed by /cygdrive for fixpath to work.
34579      new_path="$CYGWIN_ROOT_PATH$input_path"
34580    fi
34581  fi
34582
34583  # remove trailing .exe if any
34584  new_path="${new_path/%.exe/}"
34585
34586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34587
34588  # First separate the path from the arguments. This will split at the first
34589  # space.
34590  complete="$RC"
34591  path="${complete%% *}"
34592  tmp="$complete EOL"
34593  arguments="${tmp#* }"
34594
34595  # Input might be given as Windows format, start by converting to
34596  # unix format.
34597  new_path="$path"
34598
34599  windows_path="$new_path"
34600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34601    unix_path=`$CYGPATH -u "$windows_path"`
34602    new_path="$unix_path"
34603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34605    new_path="$unix_path"
34606  fi
34607
34608
34609  # Now try to locate executable using which
34610  new_path=`$WHICH "$new_path" 2> /dev/null`
34611
34612  if test "x$new_path" = x; then
34613    # Oops. Which didn't find the executable.
34614    # The splitting of arguments from the executable at a space might have been incorrect,
34615    # since paths with space are more likely in Windows. Give it another try with the whole
34616    # argument.
34617    path="$complete"
34618    arguments="EOL"
34619    new_path="$path"
34620
34621  windows_path="$new_path"
34622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34623    unix_path=`$CYGPATH -u "$windows_path"`
34624    new_path="$unix_path"
34625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34627    new_path="$unix_path"
34628  fi
34629
34630
34631    new_path=`$WHICH "$new_path" 2> /dev/null`
34632    # bat and cmd files are not always considered executable in MSYS causing which
34633    # to not find them
34634    if test "x$new_path" = x \
34635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34637      new_path="$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    fi
34649
34650    if test "x$new_path" = x; then
34651      # It's still not found. Now this is an unrecoverable error.
34652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34653$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34654      has_space=`$ECHO "$complete" | $GREP " "`
34655      if test "x$has_space" != x; then
34656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34658      fi
34659      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34660    fi
34661  fi
34662
34663  # Now new_path has a complete unix path to the binary
34664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34665    # Keep paths in /bin as-is, but remove trailing .exe if any
34666    new_path="${new_path/%.exe/}"
34667    # Do not save /bin paths to all_fixpath_prefixes!
34668  else
34669    # Not in mixed or Windows style, start by that.
34670    new_path=`cmd //c echo $new_path`
34671
34672  input_path="$new_path"
34673  # Check if we need to convert this using DOS-style short mode. If the path
34674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34675  # take no chances and rewrite it.
34676  # Note: m4 eats our [], so we need to use [ and ] instead.
34677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34678  if test "x$has_forbidden_chars" != x; then
34679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34681  fi
34682
34683    # Output is in $new_path
34684
34685  windows_path="$new_path"
34686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34687    unix_path=`$CYGPATH -u "$windows_path"`
34688    new_path="$unix_path"
34689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34691    new_path="$unix_path"
34692  fi
34693
34694    # remove trailing .exe if any
34695    new_path="${new_path/%.exe/}"
34696
34697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34699  fi
34700
34701    else
34702      # We're on a unix platform. Hooray! :)
34703      # First separate the path from the arguments. This will split at the first
34704      # space.
34705      complete="$RC"
34706      path="${complete%% *}"
34707      tmp="$complete EOL"
34708      arguments="${tmp#* }"
34709
34710      # Cannot rely on the command "which" here since it doesn't always work.
34711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34712      if test -z "$is_absolute_path"; then
34713        # Path to executable is not absolute. Find it.
34714        IFS_save="$IFS"
34715        IFS=:
34716        for p in $PATH; do
34717          if test -f "$p/$path" && test -x "$p/$path"; then
34718            new_path="$p/$path"
34719            break
34720          fi
34721        done
34722        IFS="$IFS_save"
34723      else
34724        # This is an absolute path, we can use it without further modifications.
34725        new_path="$path"
34726      fi
34727
34728      if test "x$new_path" = x; then
34729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34730$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34731        has_space=`$ECHO "$complete" | $GREP " "`
34732        if test "x$has_space" != x; then
34733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34735        fi
34736        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34737      fi
34738    fi
34739
34740    # Now join together the path and the arguments once again
34741    if test "x$arguments" != xEOL; then
34742      new_complete="$new_path ${arguments% *}"
34743    else
34744      new_complete="$new_path"
34745    fi
34746
34747    if test "x$complete" != "x$new_complete"; then
34748      RC="$new_complete"
34749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34750$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34751    fi
34752  fi
34753
34754    # Extract the first word of "dumpbin", so it can be a program name with args.
34755set dummy dumpbin; ac_word=$2
34756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34757$as_echo_n "checking for $ac_word... " >&6; }
34758if ${ac_cv_prog_DUMPBIN+:} false; then :
34759  $as_echo_n "(cached) " >&6
34760else
34761  if test -n "$DUMPBIN"; then
34762  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34763else
34764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34765for as_dir in $PATH
34766do
34767  IFS=$as_save_IFS
34768  test -z "$as_dir" && as_dir=.
34769    for ac_exec_ext in '' $ac_executable_extensions; do
34770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34771    ac_cv_prog_DUMPBIN="dumpbin"
34772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34773    break 2
34774  fi
34775done
34776  done
34777IFS=$as_save_IFS
34778
34779fi
34780fi
34781DUMPBIN=$ac_cv_prog_DUMPBIN
34782if test -n "$DUMPBIN"; then
34783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34784$as_echo "$DUMPBIN" >&6; }
34785else
34786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34787$as_echo "no" >&6; }
34788fi
34789
34790
34791
34792  # Only process if variable expands to non-empty
34793
34794  if test "x$DUMPBIN" != x; then
34795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34796
34797  # First separate the path from the arguments. This will split at the first
34798  # space.
34799  complete="$DUMPBIN"
34800  path="${complete%% *}"
34801  tmp="$complete EOL"
34802  arguments="${tmp#* }"
34803
34804  # Input might be given as Windows format, start by converting to
34805  # unix format.
34806  new_path=`$CYGPATH -u "$path"`
34807
34808  # Now try to locate executable using which
34809  new_path=`$WHICH "$new_path" 2> /dev/null`
34810  # bat and cmd files are not always considered executable in cygwin causing which
34811  # to not find them
34812  if test "x$new_path" = x \
34813      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34814      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34815    new_path=`$CYGPATH -u "$path"`
34816  fi
34817  if test "x$new_path" = x; then
34818    # Oops. Which didn't find the executable.
34819    # The splitting of arguments from the executable at a space might have been incorrect,
34820    # since paths with space are more likely in Windows. Give it another try with the whole
34821    # argument.
34822    path="$complete"
34823    arguments="EOL"
34824    new_path=`$CYGPATH -u "$path"`
34825    new_path=`$WHICH "$new_path" 2> /dev/null`
34826    # bat and cmd files are not always considered executable in cygwin causing which
34827    # to not find them
34828    if test "x$new_path" = x \
34829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34831      new_path=`$CYGPATH -u "$path"`
34832    fi
34833    if test "x$new_path" = x; then
34834      # It's still not found. Now this is an unrecoverable error.
34835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34836$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34837      has_space=`$ECHO "$complete" | $GREP " "`
34838      if test "x$has_space" != x; then
34839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34841      fi
34842      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34843    fi
34844  fi
34845
34846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34849  # "foo.exe" is OK but "foo" is an error.
34850  #
34851  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34852  # It is also a way to make sure we got the proper file name for the real test later on.
34853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34854  if test "x$test_shortpath" = x; then
34855    # Short path failed, file does not exist as specified.
34856    # Try adding .exe or .cmd
34857    if test -f "${new_path}.exe"; then
34858      input_to_shortpath="${new_path}.exe"
34859    elif test -f "${new_path}.cmd"; then
34860      input_to_shortpath="${new_path}.cmd"
34861    else
34862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34863$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34864      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34865$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34866      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34867    fi
34868  else
34869    input_to_shortpath="$new_path"
34870  fi
34871
34872  # Call helper function which possibly converts this using DOS-style short mode.
34873  # If so, the updated path is stored in $new_path.
34874  new_path="$input_to_shortpath"
34875
34876  input_path="$input_to_shortpath"
34877  # Check if we need to convert this using DOS-style short mode. If the path
34878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34879  # take no chances and rewrite it.
34880  # Note: m4 eats our [], so we need to use [ and ] instead.
34881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34882  if test "x$has_forbidden_chars" != x; then
34883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34887      # Going to short mode and back again did indeed matter. Since short mode is
34888      # case insensitive, let's make it lowercase to improve readability.
34889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34890      # Now convert it back to Unix-style (cygpath)
34891      input_path=`$CYGPATH -u "$shortmode_path"`
34892      new_path="$input_path"
34893    fi
34894  fi
34895
34896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34897  if test "x$test_cygdrive_prefix" = x; then
34898    # As a simple fix, exclude /usr/bin since it's not a real path.
34899    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34901      # a path prefixed by /cygdrive for fixpath to work.
34902      new_path="$CYGWIN_ROOT_PATH$input_path"
34903    fi
34904  fi
34905
34906  # remove trailing .exe if any
34907  new_path="${new_path/%.exe/}"
34908
34909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34910
34911  # First separate the path from the arguments. This will split at the first
34912  # space.
34913  complete="$DUMPBIN"
34914  path="${complete%% *}"
34915  tmp="$complete EOL"
34916  arguments="${tmp#* }"
34917
34918  # Input might be given as Windows format, start by converting to
34919  # unix format.
34920  new_path="$path"
34921
34922  windows_path="$new_path"
34923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34924    unix_path=`$CYGPATH -u "$windows_path"`
34925    new_path="$unix_path"
34926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34928    new_path="$unix_path"
34929  fi
34930
34931
34932  # Now try to locate executable using which
34933  new_path=`$WHICH "$new_path" 2> /dev/null`
34934
34935  if test "x$new_path" = x; then
34936    # Oops. Which didn't find the executable.
34937    # The splitting of arguments from the executable at a space might have been incorrect,
34938    # since paths with space are more likely in Windows. Give it another try with the whole
34939    # argument.
34940    path="$complete"
34941    arguments="EOL"
34942    new_path="$path"
34943
34944  windows_path="$new_path"
34945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34946    unix_path=`$CYGPATH -u "$windows_path"`
34947    new_path="$unix_path"
34948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34950    new_path="$unix_path"
34951  fi
34952
34953
34954    new_path=`$WHICH "$new_path" 2> /dev/null`
34955    # bat and cmd files are not always considered executable in MSYS causing which
34956    # to not find them
34957    if test "x$new_path" = x \
34958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34960      new_path="$path"
34961
34962  windows_path="$new_path"
34963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34964    unix_path=`$CYGPATH -u "$windows_path"`
34965    new_path="$unix_path"
34966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34968    new_path="$unix_path"
34969  fi
34970
34971    fi
34972
34973    if test "x$new_path" = x; then
34974      # It's still not found. Now this is an unrecoverable error.
34975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34976$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34977      has_space=`$ECHO "$complete" | $GREP " "`
34978      if test "x$has_space" != x; then
34979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34981      fi
34982      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34983    fi
34984  fi
34985
34986  # Now new_path has a complete unix path to the binary
34987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34988    # Keep paths in /bin as-is, but remove trailing .exe if any
34989    new_path="${new_path/%.exe/}"
34990    # Do not save /bin paths to all_fixpath_prefixes!
34991  else
34992    # Not in mixed or Windows style, start by that.
34993    new_path=`cmd //c echo $new_path`
34994
34995  input_path="$new_path"
34996  # Check if we need to convert this using DOS-style short mode. If the path
34997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34998  # take no chances and rewrite it.
34999  # Note: m4 eats our [], so we need to use [ and ] instead.
35000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35001  if test "x$has_forbidden_chars" != x; then
35002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35004  fi
35005
35006    # Output is in $new_path
35007
35008  windows_path="$new_path"
35009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35010    unix_path=`$CYGPATH -u "$windows_path"`
35011    new_path="$unix_path"
35012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35014    new_path="$unix_path"
35015  fi
35016
35017    # remove trailing .exe if any
35018    new_path="${new_path/%.exe/}"
35019
35020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35022  fi
35023
35024    else
35025      # We're on a unix platform. Hooray! :)
35026      # First separate the path from the arguments. This will split at the first
35027      # space.
35028      complete="$DUMPBIN"
35029      path="${complete%% *}"
35030      tmp="$complete EOL"
35031      arguments="${tmp#* }"
35032
35033      # Cannot rely on the command "which" here since it doesn't always work.
35034      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35035      if test -z "$is_absolute_path"; then
35036        # Path to executable is not absolute. Find it.
35037        IFS_save="$IFS"
35038        IFS=:
35039        for p in $PATH; do
35040          if test -f "$p/$path" && test -x "$p/$path"; then
35041            new_path="$p/$path"
35042            break
35043          fi
35044        done
35045        IFS="$IFS_save"
35046      else
35047        # This is an absolute path, we can use it without further modifications.
35048        new_path="$path"
35049      fi
35050
35051      if test "x$new_path" = x; then
35052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35053$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35054        has_space=`$ECHO "$complete" | $GREP " "`
35055        if test "x$has_space" != x; then
35056          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35058        fi
35059        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35060      fi
35061    fi
35062
35063    # Now join together the path and the arguments once again
35064    if test "x$arguments" != xEOL; then
35065      new_complete="$new_path ${arguments% *}"
35066    else
35067      new_complete="$new_path"
35068    fi
35069
35070    if test "x$complete" != "x$new_complete"; then
35071      DUMPBIN="$new_complete"
35072      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35073$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35074    fi
35075  fi
35076
35077    # We need to check for 'msbuild.exe' because at the place where we expect to
35078    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35079    # won't find the 'msbuild.exe' executable in that case (and the
35080    # 'ac_executable_extensions' is unusable due to performance reasons).
35081    # Notice that we intentionally don't fix up the path to MSBUILD because we
35082    # will call it in a DOS shell during freetype detection on Windows (see
35083    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35084    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35085set dummy msbuild.exe; ac_word=$2
35086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35087$as_echo_n "checking for $ac_word... " >&6; }
35088if ${ac_cv_prog_MSBUILD+:} false; then :
35089  $as_echo_n "(cached) " >&6
35090else
35091  if test -n "$MSBUILD"; then
35092  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35093else
35094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35095for as_dir in $PATH
35096do
35097  IFS=$as_save_IFS
35098  test -z "$as_dir" && as_dir=.
35099    for ac_exec_ext in '' $ac_executable_extensions; do
35100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35101    ac_cv_prog_MSBUILD="msbuild.exe"
35102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35103    break 2
35104  fi
35105done
35106  done
35107IFS=$as_save_IFS
35108
35109fi
35110fi
35111MSBUILD=$ac_cv_prog_MSBUILD
35112if test -n "$MSBUILD"; then
35113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35114$as_echo "$MSBUILD" >&6; }
35115else
35116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35117$as_echo "no" >&6; }
35118fi
35119
35120
35121  fi
35122
35123  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35124
35125
35126  # Publish this variable in the help.
35127
35128
35129  if test "x$STRIP" = x; then
35130    # The variable is not set by user, try to locate tool using the code snippet
35131    for ac_prog in strip
35132do
35133  # Extract the first word of "$ac_prog", so it can be a program name with args.
35134set dummy $ac_prog; ac_word=$2
35135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35136$as_echo_n "checking for $ac_word... " >&6; }
35137if ${ac_cv_path_STRIP+:} false; then :
35138  $as_echo_n "(cached) " >&6
35139else
35140  case $STRIP in
35141  [\\/]* | ?:[\\/]*)
35142  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35143  ;;
35144  *)
35145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35146for as_dir in $PATH
35147do
35148  IFS=$as_save_IFS
35149  test -z "$as_dir" && as_dir=.
35150    for ac_exec_ext in '' $ac_executable_extensions; do
35151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35152    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35154    break 2
35155  fi
35156done
35157  done
35158IFS=$as_save_IFS
35159
35160  ;;
35161esac
35162fi
35163STRIP=$ac_cv_path_STRIP
35164if test -n "$STRIP"; then
35165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35166$as_echo "$STRIP" >&6; }
35167else
35168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35169$as_echo "no" >&6; }
35170fi
35171
35172
35173  test -n "$STRIP" && break
35174done
35175
35176  else
35177    # The variable is set, but is it from the command line or the environment?
35178
35179    # Try to remove the string !STRIP! from our list.
35180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35182      # If it failed, the variable was not from the command line. Ignore it,
35183      # but warn the user (except for BASH, which is always set by the calling BASH).
35184      if test "xSTRIP" != xBASH; then
35185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35186$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35187      fi
35188      # Try to locate tool using the code snippet
35189      for ac_prog in strip
35190do
35191  # Extract the first word of "$ac_prog", so it can be a program name with args.
35192set dummy $ac_prog; ac_word=$2
35193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35194$as_echo_n "checking for $ac_word... " >&6; }
35195if ${ac_cv_path_STRIP+:} false; then :
35196  $as_echo_n "(cached) " >&6
35197else
35198  case $STRIP in
35199  [\\/]* | ?:[\\/]*)
35200  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35201  ;;
35202  *)
35203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35204for as_dir in $PATH
35205do
35206  IFS=$as_save_IFS
35207  test -z "$as_dir" && as_dir=.
35208    for ac_exec_ext in '' $ac_executable_extensions; do
35209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35210    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35212    break 2
35213  fi
35214done
35215  done
35216IFS=$as_save_IFS
35217
35218  ;;
35219esac
35220fi
35221STRIP=$ac_cv_path_STRIP
35222if test -n "$STRIP"; then
35223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35224$as_echo "$STRIP" >&6; }
35225else
35226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35227$as_echo "no" >&6; }
35228fi
35229
35230
35231  test -n "$STRIP" && break
35232done
35233
35234    else
35235      # If it succeeded, then it was overridden by the user. We will use it
35236      # for the tool.
35237
35238      # First remove it from the list of overridden variables, so we can test
35239      # for unknown variables in the end.
35240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35241
35242      # Check if the provided tool contains a complete path.
35243      tool_specified="$STRIP"
35244      tool_basename="${tool_specified##*/}"
35245      if test "x$tool_basename" = "x$tool_specified"; then
35246        # A command without a complete path is provided, search $PATH.
35247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35248$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35249        # Extract the first word of "$tool_basename", so it can be a program name with args.
35250set dummy $tool_basename; ac_word=$2
35251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35252$as_echo_n "checking for $ac_word... " >&6; }
35253if ${ac_cv_path_STRIP+:} false; then :
35254  $as_echo_n "(cached) " >&6
35255else
35256  case $STRIP in
35257  [\\/]* | ?:[\\/]*)
35258  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35259  ;;
35260  *)
35261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35262for as_dir in $PATH
35263do
35264  IFS=$as_save_IFS
35265  test -z "$as_dir" && as_dir=.
35266    for ac_exec_ext in '' $ac_executable_extensions; do
35267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35268    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35270    break 2
35271  fi
35272done
35273  done
35274IFS=$as_save_IFS
35275
35276  ;;
35277esac
35278fi
35279STRIP=$ac_cv_path_STRIP
35280if test -n "$STRIP"; then
35281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35282$as_echo "$STRIP" >&6; }
35283else
35284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35285$as_echo "no" >&6; }
35286fi
35287
35288
35289        if test "x$STRIP" = x; then
35290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35291        fi
35292      else
35293        # Otherwise we believe it is a complete path. Use it as it is.
35294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35295$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35297$as_echo_n "checking for STRIP... " >&6; }
35298        if test ! -x "$tool_specified"; then
35299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35300$as_echo "not found" >&6; }
35301          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35302        fi
35303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35304$as_echo "$tool_specified" >&6; }
35305      fi
35306    fi
35307  fi
35308
35309
35310
35311  # Only process if variable expands to non-empty
35312
35313  if test "x$STRIP" != x; then
35314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35315
35316  # First separate the path from the arguments. This will split at the first
35317  # space.
35318  complete="$STRIP"
35319  path="${complete%% *}"
35320  tmp="$complete EOL"
35321  arguments="${tmp#* }"
35322
35323  # Input might be given as Windows format, start by converting to
35324  # unix format.
35325  new_path=`$CYGPATH -u "$path"`
35326
35327  # Now try to locate executable using which
35328  new_path=`$WHICH "$new_path" 2> /dev/null`
35329  # bat and cmd files are not always considered executable in cygwin causing which
35330  # to not find them
35331  if test "x$new_path" = x \
35332      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35333      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35334    new_path=`$CYGPATH -u "$path"`
35335  fi
35336  if test "x$new_path" = x; then
35337    # Oops. Which didn't find the executable.
35338    # The splitting of arguments from the executable at a space might have been incorrect,
35339    # since paths with space are more likely in Windows. Give it another try with the whole
35340    # argument.
35341    path="$complete"
35342    arguments="EOL"
35343    new_path=`$CYGPATH -u "$path"`
35344    new_path=`$WHICH "$new_path" 2> /dev/null`
35345    # bat and cmd files are not always considered executable in cygwin causing which
35346    # to not find them
35347    if test "x$new_path" = x \
35348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35350      new_path=`$CYGPATH -u "$path"`
35351    fi
35352    if test "x$new_path" = x; then
35353      # It's still not found. Now this is an unrecoverable error.
35354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35355$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35356      has_space=`$ECHO "$complete" | $GREP " "`
35357      if test "x$has_space" != x; then
35358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35360      fi
35361      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35362    fi
35363  fi
35364
35365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35368  # "foo.exe" is OK but "foo" is an error.
35369  #
35370  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35371  # It is also a way to make sure we got the proper file name for the real test later on.
35372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35373  if test "x$test_shortpath" = x; then
35374    # Short path failed, file does not exist as specified.
35375    # Try adding .exe or .cmd
35376    if test -f "${new_path}.exe"; then
35377      input_to_shortpath="${new_path}.exe"
35378    elif test -f "${new_path}.cmd"; then
35379      input_to_shortpath="${new_path}.cmd"
35380    else
35381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35382$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35383      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35385      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35386    fi
35387  else
35388    input_to_shortpath="$new_path"
35389  fi
35390
35391  # Call helper function which possibly converts this using DOS-style short mode.
35392  # If so, the updated path is stored in $new_path.
35393  new_path="$input_to_shortpath"
35394
35395  input_path="$input_to_shortpath"
35396  # Check if we need to convert this using DOS-style short mode. If the path
35397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35398  # take no chances and rewrite it.
35399  # Note: m4 eats our [], so we need to use [ and ] instead.
35400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35401  if test "x$has_forbidden_chars" != x; then
35402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35406      # Going to short mode and back again did indeed matter. Since short mode is
35407      # case insensitive, let's make it lowercase to improve readability.
35408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35409      # Now convert it back to Unix-style (cygpath)
35410      input_path=`$CYGPATH -u "$shortmode_path"`
35411      new_path="$input_path"
35412    fi
35413  fi
35414
35415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35416  if test "x$test_cygdrive_prefix" = x; then
35417    # As a simple fix, exclude /usr/bin since it's not a real path.
35418    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35420      # a path prefixed by /cygdrive for fixpath to work.
35421      new_path="$CYGWIN_ROOT_PATH$input_path"
35422    fi
35423  fi
35424
35425  # remove trailing .exe if any
35426  new_path="${new_path/%.exe/}"
35427
35428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35429
35430  # First separate the path from the arguments. This will split at the first
35431  # space.
35432  complete="$STRIP"
35433  path="${complete%% *}"
35434  tmp="$complete EOL"
35435  arguments="${tmp#* }"
35436
35437  # Input might be given as Windows format, start by converting to
35438  # unix format.
35439  new_path="$path"
35440
35441  windows_path="$new_path"
35442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35443    unix_path=`$CYGPATH -u "$windows_path"`
35444    new_path="$unix_path"
35445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35447    new_path="$unix_path"
35448  fi
35449
35450
35451  # Now try to locate executable using which
35452  new_path=`$WHICH "$new_path" 2> /dev/null`
35453
35454  if test "x$new_path" = x; then
35455    # Oops. Which didn't find the executable.
35456    # The splitting of arguments from the executable at a space might have been incorrect,
35457    # since paths with space are more likely in Windows. Give it another try with the whole
35458    # argument.
35459    path="$complete"
35460    arguments="EOL"
35461    new_path="$path"
35462
35463  windows_path="$new_path"
35464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35465    unix_path=`$CYGPATH -u "$windows_path"`
35466    new_path="$unix_path"
35467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35469    new_path="$unix_path"
35470  fi
35471
35472
35473    new_path=`$WHICH "$new_path" 2> /dev/null`
35474    # bat and cmd files are not always considered executable in MSYS causing which
35475    # to not find them
35476    if test "x$new_path" = x \
35477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35479      new_path="$path"
35480
35481  windows_path="$new_path"
35482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35483    unix_path=`$CYGPATH -u "$windows_path"`
35484    new_path="$unix_path"
35485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35487    new_path="$unix_path"
35488  fi
35489
35490    fi
35491
35492    if test "x$new_path" = x; then
35493      # It's still not found. Now this is an unrecoverable error.
35494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35495$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35496      has_space=`$ECHO "$complete" | $GREP " "`
35497      if test "x$has_space" != x; then
35498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35500      fi
35501      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35502    fi
35503  fi
35504
35505  # Now new_path has a complete unix path to the binary
35506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35507    # Keep paths in /bin as-is, but remove trailing .exe if any
35508    new_path="${new_path/%.exe/}"
35509    # Do not save /bin paths to all_fixpath_prefixes!
35510  else
35511    # Not in mixed or Windows style, start by that.
35512    new_path=`cmd //c echo $new_path`
35513
35514  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35523  fi
35524
35525    # Output is in $new_path
35526
35527  windows_path="$new_path"
35528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35529    unix_path=`$CYGPATH -u "$windows_path"`
35530    new_path="$unix_path"
35531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35533    new_path="$unix_path"
35534  fi
35535
35536    # remove trailing .exe if any
35537    new_path="${new_path/%.exe/}"
35538
35539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35541  fi
35542
35543    else
35544      # We're on a unix platform. Hooray! :)
35545      # First separate the path from the arguments. This will split at the first
35546      # space.
35547      complete="$STRIP"
35548      path="${complete%% *}"
35549      tmp="$complete EOL"
35550      arguments="${tmp#* }"
35551
35552      # Cannot rely on the command "which" here since it doesn't always work.
35553      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35554      if test -z "$is_absolute_path"; then
35555        # Path to executable is not absolute. Find it.
35556        IFS_save="$IFS"
35557        IFS=:
35558        for p in $PATH; do
35559          if test -f "$p/$path" && test -x "$p/$path"; then
35560            new_path="$p/$path"
35561            break
35562          fi
35563        done
35564        IFS="$IFS_save"
35565      else
35566        # This is an absolute path, we can use it without further modifications.
35567        new_path="$path"
35568      fi
35569
35570      if test "x$new_path" = x; then
35571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35572$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35573        has_space=`$ECHO "$complete" | $GREP " "`
35574        if test "x$has_space" != x; then
35575          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35576$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35577        fi
35578        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35579      fi
35580    fi
35581
35582    # Now join together the path and the arguments once again
35583    if test "x$arguments" != xEOL; then
35584      new_complete="$new_path ${arguments% *}"
35585    else
35586      new_complete="$new_path"
35587    fi
35588
35589    if test "x$complete" != "x$new_complete"; then
35590      STRIP="$new_complete"
35591      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35592$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35593    fi
35594  fi
35595
35596
35597
35598  # Publish this variable in the help.
35599
35600
35601  if test "x$NM" = x; then
35602    # The variable is not set by user, try to locate tool using the code snippet
35603    for ac_prog in nm
35604do
35605  # Extract the first word of "$ac_prog", so it can be a program name with args.
35606set dummy $ac_prog; ac_word=$2
35607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35608$as_echo_n "checking for $ac_word... " >&6; }
35609if ${ac_cv_path_NM+:} false; then :
35610  $as_echo_n "(cached) " >&6
35611else
35612  case $NM in
35613  [\\/]* | ?:[\\/]*)
35614  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35615  ;;
35616  *)
35617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35618for as_dir in $PATH
35619do
35620  IFS=$as_save_IFS
35621  test -z "$as_dir" && as_dir=.
35622    for ac_exec_ext in '' $ac_executable_extensions; do
35623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35624    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35626    break 2
35627  fi
35628done
35629  done
35630IFS=$as_save_IFS
35631
35632  ;;
35633esac
35634fi
35635NM=$ac_cv_path_NM
35636if test -n "$NM"; then
35637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35638$as_echo "$NM" >&6; }
35639else
35640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35641$as_echo "no" >&6; }
35642fi
35643
35644
35645  test -n "$NM" && break
35646done
35647
35648  else
35649    # The variable is set, but is it from the command line or the environment?
35650
35651    # Try to remove the string !NM! from our list.
35652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35654      # If it failed, the variable was not from the command line. Ignore it,
35655      # but warn the user (except for BASH, which is always set by the calling BASH).
35656      if test "xNM" != xBASH; then
35657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35658$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35659      fi
35660      # Try to locate tool using the code snippet
35661      for ac_prog in nm
35662do
35663  # Extract the first word of "$ac_prog", so it can be a program name with args.
35664set dummy $ac_prog; ac_word=$2
35665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35666$as_echo_n "checking for $ac_word... " >&6; }
35667if ${ac_cv_path_NM+:} false; then :
35668  $as_echo_n "(cached) " >&6
35669else
35670  case $NM in
35671  [\\/]* | ?:[\\/]*)
35672  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35673  ;;
35674  *)
35675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35676for as_dir in $PATH
35677do
35678  IFS=$as_save_IFS
35679  test -z "$as_dir" && as_dir=.
35680    for ac_exec_ext in '' $ac_executable_extensions; do
35681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35682    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35684    break 2
35685  fi
35686done
35687  done
35688IFS=$as_save_IFS
35689
35690  ;;
35691esac
35692fi
35693NM=$ac_cv_path_NM
35694if test -n "$NM"; then
35695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35696$as_echo "$NM" >&6; }
35697else
35698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35699$as_echo "no" >&6; }
35700fi
35701
35702
35703  test -n "$NM" && break
35704done
35705
35706    else
35707      # If it succeeded, then it was overridden by the user. We will use it
35708      # for the tool.
35709
35710      # First remove it from the list of overridden variables, so we can test
35711      # for unknown variables in the end.
35712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35713
35714      # Check if the provided tool contains a complete path.
35715      tool_specified="$NM"
35716      tool_basename="${tool_specified##*/}"
35717      if test "x$tool_basename" = "x$tool_specified"; then
35718        # A command without a complete path is provided, search $PATH.
35719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35720$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35721        # Extract the first word of "$tool_basename", so it can be a program name with args.
35722set dummy $tool_basename; ac_word=$2
35723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35724$as_echo_n "checking for $ac_word... " >&6; }
35725if ${ac_cv_path_NM+:} false; then :
35726  $as_echo_n "(cached) " >&6
35727else
35728  case $NM in
35729  [\\/]* | ?:[\\/]*)
35730  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35731  ;;
35732  *)
35733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35734for as_dir in $PATH
35735do
35736  IFS=$as_save_IFS
35737  test -z "$as_dir" && as_dir=.
35738    for ac_exec_ext in '' $ac_executable_extensions; do
35739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35740    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35742    break 2
35743  fi
35744done
35745  done
35746IFS=$as_save_IFS
35747
35748  ;;
35749esac
35750fi
35751NM=$ac_cv_path_NM
35752if test -n "$NM"; then
35753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35754$as_echo "$NM" >&6; }
35755else
35756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35757$as_echo "no" >&6; }
35758fi
35759
35760
35761        if test "x$NM" = x; then
35762          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35763        fi
35764      else
35765        # Otherwise we believe it is a complete path. Use it as it is.
35766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35767$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35769$as_echo_n "checking for NM... " >&6; }
35770        if test ! -x "$tool_specified"; then
35771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35772$as_echo "not found" >&6; }
35773          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35774        fi
35775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35776$as_echo "$tool_specified" >&6; }
35777      fi
35778    fi
35779  fi
35780
35781
35782
35783  # Only process if variable expands to non-empty
35784
35785  if test "x$NM" != x; then
35786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35787
35788  # First separate the path from the arguments. This will split at the first
35789  # space.
35790  complete="$NM"
35791  path="${complete%% *}"
35792  tmp="$complete EOL"
35793  arguments="${tmp#* }"
35794
35795  # Input might be given as Windows format, start by converting to
35796  # unix format.
35797  new_path=`$CYGPATH -u "$path"`
35798
35799  # Now try to locate executable using which
35800  new_path=`$WHICH "$new_path" 2> /dev/null`
35801  # bat and cmd files are not always considered executable in cygwin causing which
35802  # to not find them
35803  if test "x$new_path" = x \
35804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35806    new_path=`$CYGPATH -u "$path"`
35807  fi
35808  if test "x$new_path" = x; then
35809    # Oops. Which didn't find the executable.
35810    # The splitting of arguments from the executable at a space might have been incorrect,
35811    # since paths with space are more likely in Windows. Give it another try with the whole
35812    # argument.
35813    path="$complete"
35814    arguments="EOL"
35815    new_path=`$CYGPATH -u "$path"`
35816    new_path=`$WHICH "$new_path" 2> /dev/null`
35817    # bat and cmd files are not always considered executable in cygwin causing which
35818    # to not find them
35819    if test "x$new_path" = x \
35820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35822      new_path=`$CYGPATH -u "$path"`
35823    fi
35824    if test "x$new_path" = x; then
35825      # It's still not found. Now this is an unrecoverable error.
35826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35827$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35828      has_space=`$ECHO "$complete" | $GREP " "`
35829      if test "x$has_space" != x; then
35830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35832      fi
35833      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35834    fi
35835  fi
35836
35837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35840  # "foo.exe" is OK but "foo" is an error.
35841  #
35842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35843  # It is also a way to make sure we got the proper file name for the real test later on.
35844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35845  if test "x$test_shortpath" = x; then
35846    # Short path failed, file does not exist as specified.
35847    # Try adding .exe or .cmd
35848    if test -f "${new_path}.exe"; then
35849      input_to_shortpath="${new_path}.exe"
35850    elif test -f "${new_path}.cmd"; then
35851      input_to_shortpath="${new_path}.cmd"
35852    else
35853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35854$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35857      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35858    fi
35859  else
35860    input_to_shortpath="$new_path"
35861  fi
35862
35863  # Call helper function which possibly converts this using DOS-style short mode.
35864  # If so, the updated path is stored in $new_path.
35865  new_path="$input_to_shortpath"
35866
35867  input_path="$input_to_shortpath"
35868  # Check if we need to convert this using DOS-style short mode. If the path
35869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35870  # take no chances and rewrite it.
35871  # Note: m4 eats our [], so we need to use [ and ] instead.
35872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35873  if test "x$has_forbidden_chars" != x; then
35874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35878      # Going to short mode and back again did indeed matter. Since short mode is
35879      # case insensitive, let's make it lowercase to improve readability.
35880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35881      # Now convert it back to Unix-style (cygpath)
35882      input_path=`$CYGPATH -u "$shortmode_path"`
35883      new_path="$input_path"
35884    fi
35885  fi
35886
35887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35888  if test "x$test_cygdrive_prefix" = x; then
35889    # As a simple fix, exclude /usr/bin since it's not a real path.
35890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35892      # a path prefixed by /cygdrive for fixpath to work.
35893      new_path="$CYGWIN_ROOT_PATH$input_path"
35894    fi
35895  fi
35896
35897  # remove trailing .exe if any
35898  new_path="${new_path/%.exe/}"
35899
35900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35901
35902  # First separate the path from the arguments. This will split at the first
35903  # space.
35904  complete="$NM"
35905  path="${complete%% *}"
35906  tmp="$complete EOL"
35907  arguments="${tmp#* }"
35908
35909  # Input might be given as Windows format, start by converting to
35910  # unix format.
35911  new_path="$path"
35912
35913  windows_path="$new_path"
35914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35915    unix_path=`$CYGPATH -u "$windows_path"`
35916    new_path="$unix_path"
35917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35919    new_path="$unix_path"
35920  fi
35921
35922
35923  # Now try to locate executable using which
35924  new_path=`$WHICH "$new_path" 2> /dev/null`
35925
35926  if test "x$new_path" = x; then
35927    # Oops. Which didn't find the executable.
35928    # The splitting of arguments from the executable at a space might have been incorrect,
35929    # since paths with space are more likely in Windows. Give it another try with the whole
35930    # argument.
35931    path="$complete"
35932    arguments="EOL"
35933    new_path="$path"
35934
35935  windows_path="$new_path"
35936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35937    unix_path=`$CYGPATH -u "$windows_path"`
35938    new_path="$unix_path"
35939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35941    new_path="$unix_path"
35942  fi
35943
35944
35945    new_path=`$WHICH "$new_path" 2> /dev/null`
35946    # bat and cmd files are not always considered executable in MSYS causing which
35947    # to not find them
35948    if test "x$new_path" = x \
35949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35951      new_path="$path"
35952
35953  windows_path="$new_path"
35954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35955    unix_path=`$CYGPATH -u "$windows_path"`
35956    new_path="$unix_path"
35957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35959    new_path="$unix_path"
35960  fi
35961
35962    fi
35963
35964    if test "x$new_path" = x; then
35965      # It's still not found. Now this is an unrecoverable error.
35966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35967$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35968      has_space=`$ECHO "$complete" | $GREP " "`
35969      if test "x$has_space" != x; then
35970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35972      fi
35973      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35974    fi
35975  fi
35976
35977  # Now new_path has a complete unix path to the binary
35978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35979    # Keep paths in /bin as-is, but remove trailing .exe if any
35980    new_path="${new_path/%.exe/}"
35981    # Do not save /bin paths to all_fixpath_prefixes!
35982  else
35983    # Not in mixed or Windows style, start by that.
35984    new_path=`cmd //c echo $new_path`
35985
35986  input_path="$new_path"
35987  # Check if we need to convert this using DOS-style short mode. If the path
35988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35989  # take no chances and rewrite it.
35990  # Note: m4 eats our [], so we need to use [ and ] instead.
35991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35992  if test "x$has_forbidden_chars" != x; then
35993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35995  fi
35996
35997    # Output is in $new_path
35998
35999  windows_path="$new_path"
36000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36001    unix_path=`$CYGPATH -u "$windows_path"`
36002    new_path="$unix_path"
36003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36005    new_path="$unix_path"
36006  fi
36007
36008    # remove trailing .exe if any
36009    new_path="${new_path/%.exe/}"
36010
36011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36013  fi
36014
36015    else
36016      # We're on a unix platform. Hooray! :)
36017      # First separate the path from the arguments. This will split at the first
36018      # space.
36019      complete="$NM"
36020      path="${complete%% *}"
36021      tmp="$complete EOL"
36022      arguments="${tmp#* }"
36023
36024      # Cannot rely on the command "which" here since it doesn't always work.
36025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36026      if test -z "$is_absolute_path"; then
36027        # Path to executable is not absolute. Find it.
36028        IFS_save="$IFS"
36029        IFS=:
36030        for p in $PATH; do
36031          if test -f "$p/$path" && test -x "$p/$path"; then
36032            new_path="$p/$path"
36033            break
36034          fi
36035        done
36036        IFS="$IFS_save"
36037      else
36038        # This is an absolute path, we can use it without further modifications.
36039        new_path="$path"
36040      fi
36041
36042      if test "x$new_path" = x; then
36043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36045        has_space=`$ECHO "$complete" | $GREP " "`
36046        if test "x$has_space" != x; then
36047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36049        fi
36050        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36051      fi
36052    fi
36053
36054    # Now join together the path and the arguments once again
36055    if test "x$arguments" != xEOL; then
36056      new_complete="$new_path ${arguments% *}"
36057    else
36058      new_complete="$new_path"
36059    fi
36060
36061    if test "x$complete" != "x$new_complete"; then
36062      NM="$new_complete"
36063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36064$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36065    fi
36066  fi
36067
36068
36069
36070  # Publish this variable in the help.
36071
36072
36073  if test "x$GNM" = x; then
36074    # The variable is not set by user, try to locate tool using the code snippet
36075    for ac_prog in gnm
36076do
36077  # Extract the first word of "$ac_prog", so it can be a program name with args.
36078set dummy $ac_prog; ac_word=$2
36079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36080$as_echo_n "checking for $ac_word... " >&6; }
36081if ${ac_cv_path_GNM+:} false; then :
36082  $as_echo_n "(cached) " >&6
36083else
36084  case $GNM in
36085  [\\/]* | ?:[\\/]*)
36086  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36087  ;;
36088  *)
36089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36090for as_dir in $PATH
36091do
36092  IFS=$as_save_IFS
36093  test -z "$as_dir" && as_dir=.
36094    for ac_exec_ext in '' $ac_executable_extensions; do
36095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36096    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36098    break 2
36099  fi
36100done
36101  done
36102IFS=$as_save_IFS
36103
36104  ;;
36105esac
36106fi
36107GNM=$ac_cv_path_GNM
36108if test -n "$GNM"; then
36109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36110$as_echo "$GNM" >&6; }
36111else
36112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36113$as_echo "no" >&6; }
36114fi
36115
36116
36117  test -n "$GNM" && break
36118done
36119
36120  else
36121    # The variable is set, but is it from the command line or the environment?
36122
36123    # Try to remove the string !GNM! from our list.
36124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36126      # If it failed, the variable was not from the command line. Ignore it,
36127      # but warn the user (except for BASH, which is always set by the calling BASH).
36128      if test "xGNM" != xBASH; then
36129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36130$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36131      fi
36132      # Try to locate tool using the code snippet
36133      for ac_prog in gnm
36134do
36135  # Extract the first word of "$ac_prog", so it can be a program name with args.
36136set dummy $ac_prog; ac_word=$2
36137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36138$as_echo_n "checking for $ac_word... " >&6; }
36139if ${ac_cv_path_GNM+:} false; then :
36140  $as_echo_n "(cached) " >&6
36141else
36142  case $GNM in
36143  [\\/]* | ?:[\\/]*)
36144  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36145  ;;
36146  *)
36147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36148for as_dir in $PATH
36149do
36150  IFS=$as_save_IFS
36151  test -z "$as_dir" && as_dir=.
36152    for ac_exec_ext in '' $ac_executable_extensions; do
36153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36154    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36156    break 2
36157  fi
36158done
36159  done
36160IFS=$as_save_IFS
36161
36162  ;;
36163esac
36164fi
36165GNM=$ac_cv_path_GNM
36166if test -n "$GNM"; then
36167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36168$as_echo "$GNM" >&6; }
36169else
36170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36171$as_echo "no" >&6; }
36172fi
36173
36174
36175  test -n "$GNM" && break
36176done
36177
36178    else
36179      # If it succeeded, then it was overridden by the user. We will use it
36180      # for the tool.
36181
36182      # First remove it from the list of overridden variables, so we can test
36183      # for unknown variables in the end.
36184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36185
36186      # Check if the provided tool contains a complete path.
36187      tool_specified="$GNM"
36188      tool_basename="${tool_specified##*/}"
36189      if test "x$tool_basename" = "x$tool_specified"; then
36190        # A command without a complete path is provided, search $PATH.
36191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36192$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36193        # Extract the first word of "$tool_basename", so it can be a program name with args.
36194set dummy $tool_basename; ac_word=$2
36195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36196$as_echo_n "checking for $ac_word... " >&6; }
36197if ${ac_cv_path_GNM+:} false; then :
36198  $as_echo_n "(cached) " >&6
36199else
36200  case $GNM in
36201  [\\/]* | ?:[\\/]*)
36202  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36203  ;;
36204  *)
36205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36206for as_dir in $PATH
36207do
36208  IFS=$as_save_IFS
36209  test -z "$as_dir" && as_dir=.
36210    for ac_exec_ext in '' $ac_executable_extensions; do
36211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36212    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36214    break 2
36215  fi
36216done
36217  done
36218IFS=$as_save_IFS
36219
36220  ;;
36221esac
36222fi
36223GNM=$ac_cv_path_GNM
36224if test -n "$GNM"; then
36225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36226$as_echo "$GNM" >&6; }
36227else
36228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36229$as_echo "no" >&6; }
36230fi
36231
36232
36233        if test "x$GNM" = x; then
36234          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36235        fi
36236      else
36237        # Otherwise we believe it is a complete path. Use it as it is.
36238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36239$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36241$as_echo_n "checking for GNM... " >&6; }
36242        if test ! -x "$tool_specified"; then
36243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36244$as_echo "not found" >&6; }
36245          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36246        fi
36247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36248$as_echo "$tool_specified" >&6; }
36249      fi
36250    fi
36251  fi
36252
36253
36254
36255  # Only process if variable expands to non-empty
36256
36257  if test "x$GNM" != x; then
36258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36259
36260  # First separate the path from the arguments. This will split at the first
36261  # space.
36262  complete="$GNM"
36263  path="${complete%% *}"
36264  tmp="$complete EOL"
36265  arguments="${tmp#* }"
36266
36267  # Input might be given as Windows format, start by converting to
36268  # unix format.
36269  new_path=`$CYGPATH -u "$path"`
36270
36271  # Now try to locate executable using which
36272  new_path=`$WHICH "$new_path" 2> /dev/null`
36273  # bat and cmd files are not always considered executable in cygwin causing which
36274  # to not find them
36275  if test "x$new_path" = x \
36276      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36277      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36278    new_path=`$CYGPATH -u "$path"`
36279  fi
36280  if test "x$new_path" = x; then
36281    # Oops. Which didn't find the executable.
36282    # The splitting of arguments from the executable at a space might have been incorrect,
36283    # since paths with space are more likely in Windows. Give it another try with the whole
36284    # argument.
36285    path="$complete"
36286    arguments="EOL"
36287    new_path=`$CYGPATH -u "$path"`
36288    new_path=`$WHICH "$new_path" 2> /dev/null`
36289    # bat and cmd files are not always considered executable in cygwin causing which
36290    # to not find them
36291    if test "x$new_path" = x \
36292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36294      new_path=`$CYGPATH -u "$path"`
36295    fi
36296    if test "x$new_path" = x; then
36297      # It's still not found. Now this is an unrecoverable error.
36298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36299$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36300      has_space=`$ECHO "$complete" | $GREP " "`
36301      if test "x$has_space" != x; then
36302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36304      fi
36305      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36306    fi
36307  fi
36308
36309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36312  # "foo.exe" is OK but "foo" is an error.
36313  #
36314  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36315  # It is also a way to make sure we got the proper file name for the real test later on.
36316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36317  if test "x$test_shortpath" = x; then
36318    # Short path failed, file does not exist as specified.
36319    # Try adding .exe or .cmd
36320    if test -f "${new_path}.exe"; then
36321      input_to_shortpath="${new_path}.exe"
36322    elif test -f "${new_path}.cmd"; then
36323      input_to_shortpath="${new_path}.cmd"
36324    else
36325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36326$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36327      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36328$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36329      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36330    fi
36331  else
36332    input_to_shortpath="$new_path"
36333  fi
36334
36335  # Call helper function which possibly converts this using DOS-style short mode.
36336  # If so, the updated path is stored in $new_path.
36337  new_path="$input_to_shortpath"
36338
36339  input_path="$input_to_shortpath"
36340  # Check if we need to convert this using DOS-style short mode. If the path
36341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36342  # take no chances and rewrite it.
36343  # Note: m4 eats our [], so we need to use [ and ] instead.
36344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36345  if test "x$has_forbidden_chars" != x; then
36346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36350      # Going to short mode and back again did indeed matter. Since short mode is
36351      # case insensitive, let's make it lowercase to improve readability.
36352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36353      # Now convert it back to Unix-style (cygpath)
36354      input_path=`$CYGPATH -u "$shortmode_path"`
36355      new_path="$input_path"
36356    fi
36357  fi
36358
36359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36360  if test "x$test_cygdrive_prefix" = x; then
36361    # As a simple fix, exclude /usr/bin since it's not a real path.
36362    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36364      # a path prefixed by /cygdrive for fixpath to work.
36365      new_path="$CYGWIN_ROOT_PATH$input_path"
36366    fi
36367  fi
36368
36369  # remove trailing .exe if any
36370  new_path="${new_path/%.exe/}"
36371
36372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36373
36374  # First separate the path from the arguments. This will split at the first
36375  # space.
36376  complete="$GNM"
36377  path="${complete%% *}"
36378  tmp="$complete EOL"
36379  arguments="${tmp#* }"
36380
36381  # Input might be given as Windows format, start by converting to
36382  # unix format.
36383  new_path="$path"
36384
36385  windows_path="$new_path"
36386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36387    unix_path=`$CYGPATH -u "$windows_path"`
36388    new_path="$unix_path"
36389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36391    new_path="$unix_path"
36392  fi
36393
36394
36395  # Now try to locate executable using which
36396  new_path=`$WHICH "$new_path" 2> /dev/null`
36397
36398  if test "x$new_path" = x; then
36399    # Oops. Which didn't find the executable.
36400    # The splitting of arguments from the executable at a space might have been incorrect,
36401    # since paths with space are more likely in Windows. Give it another try with the whole
36402    # argument.
36403    path="$complete"
36404    arguments="EOL"
36405    new_path="$path"
36406
36407  windows_path="$new_path"
36408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36409    unix_path=`$CYGPATH -u "$windows_path"`
36410    new_path="$unix_path"
36411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36413    new_path="$unix_path"
36414  fi
36415
36416
36417    new_path=`$WHICH "$new_path" 2> /dev/null`
36418    # bat and cmd files are not always considered executable in MSYS causing which
36419    # to not find them
36420    if test "x$new_path" = x \
36421        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36422        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36423      new_path="$path"
36424
36425  windows_path="$new_path"
36426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36427    unix_path=`$CYGPATH -u "$windows_path"`
36428    new_path="$unix_path"
36429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36431    new_path="$unix_path"
36432  fi
36433
36434    fi
36435
36436    if test "x$new_path" = x; then
36437      # It's still not found. Now this is an unrecoverable error.
36438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36439$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36440      has_space=`$ECHO "$complete" | $GREP " "`
36441      if test "x$has_space" != x; then
36442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36444      fi
36445      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36446    fi
36447  fi
36448
36449  # Now new_path has a complete unix path to the binary
36450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36451    # Keep paths in /bin as-is, but remove trailing .exe if any
36452    new_path="${new_path/%.exe/}"
36453    # Do not save /bin paths to all_fixpath_prefixes!
36454  else
36455    # Not in mixed or Windows style, start by that.
36456    new_path=`cmd //c echo $new_path`
36457
36458  input_path="$new_path"
36459  # Check if we need to convert this using DOS-style short mode. If the path
36460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36461  # take no chances and rewrite it.
36462  # Note: m4 eats our [], so we need to use [ and ] instead.
36463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36464  if test "x$has_forbidden_chars" != x; then
36465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36467  fi
36468
36469    # Output is in $new_path
36470
36471  windows_path="$new_path"
36472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36473    unix_path=`$CYGPATH -u "$windows_path"`
36474    new_path="$unix_path"
36475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36477    new_path="$unix_path"
36478  fi
36479
36480    # remove trailing .exe if any
36481    new_path="${new_path/%.exe/}"
36482
36483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36485  fi
36486
36487    else
36488      # We're on a unix platform. Hooray! :)
36489      # First separate the path from the arguments. This will split at the first
36490      # space.
36491      complete="$GNM"
36492      path="${complete%% *}"
36493      tmp="$complete EOL"
36494      arguments="${tmp#* }"
36495
36496      # Cannot rely on the command "which" here since it doesn't always work.
36497      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36498      if test -z "$is_absolute_path"; then
36499        # Path to executable is not absolute. Find it.
36500        IFS_save="$IFS"
36501        IFS=:
36502        for p in $PATH; do
36503          if test -f "$p/$path" && test -x "$p/$path"; then
36504            new_path="$p/$path"
36505            break
36506          fi
36507        done
36508        IFS="$IFS_save"
36509      else
36510        # This is an absolute path, we can use it without further modifications.
36511        new_path="$path"
36512      fi
36513
36514      if test "x$new_path" = x; then
36515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36516$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36517        has_space=`$ECHO "$complete" | $GREP " "`
36518        if test "x$has_space" != x; then
36519          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36521        fi
36522        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36523      fi
36524    fi
36525
36526    # Now join together the path and the arguments once again
36527    if test "x$arguments" != xEOL; then
36528      new_complete="$new_path ${arguments% *}"
36529    else
36530      new_complete="$new_path"
36531    fi
36532
36533    if test "x$complete" != "x$new_complete"; then
36534      GNM="$new_complete"
36535      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36536$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36537    fi
36538  fi
36539
36540  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36541    # FIXME: we should unify this with the solaris case above.
36542
36543
36544  # Publish this variable in the help.
36545
36546
36547  if test "x$STRIP" = x; then
36548    # The variable is not set by user, try to locate tool using the code snippet
36549    if test -n "$ac_tool_prefix"; then
36550  for ac_prog in strip
36551  do
36552    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36553set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36555$as_echo_n "checking for $ac_word... " >&6; }
36556if ${ac_cv_prog_STRIP+:} false; then :
36557  $as_echo_n "(cached) " >&6
36558else
36559  if test -n "$STRIP"; then
36560  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36561else
36562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36563for as_dir in $PATH
36564do
36565  IFS=$as_save_IFS
36566  test -z "$as_dir" && as_dir=.
36567    for ac_exec_ext in '' $ac_executable_extensions; do
36568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36569    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36571    break 2
36572  fi
36573done
36574  done
36575IFS=$as_save_IFS
36576
36577fi
36578fi
36579STRIP=$ac_cv_prog_STRIP
36580if test -n "$STRIP"; then
36581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36582$as_echo "$STRIP" >&6; }
36583else
36584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36585$as_echo "no" >&6; }
36586fi
36587
36588
36589    test -n "$STRIP" && break
36590  done
36591fi
36592if test -z "$STRIP"; then
36593  ac_ct_STRIP=$STRIP
36594  for ac_prog in strip
36595do
36596  # Extract the first word of "$ac_prog", so it can be a program name with args.
36597set dummy $ac_prog; ac_word=$2
36598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36599$as_echo_n "checking for $ac_word... " >&6; }
36600if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36601  $as_echo_n "(cached) " >&6
36602else
36603  if test -n "$ac_ct_STRIP"; then
36604  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36605else
36606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36607for as_dir in $PATH
36608do
36609  IFS=$as_save_IFS
36610  test -z "$as_dir" && as_dir=.
36611    for ac_exec_ext in '' $ac_executable_extensions; do
36612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36613    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36615    break 2
36616  fi
36617done
36618  done
36619IFS=$as_save_IFS
36620
36621fi
36622fi
36623ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36624if test -n "$ac_ct_STRIP"; then
36625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36626$as_echo "$ac_ct_STRIP" >&6; }
36627else
36628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36629$as_echo "no" >&6; }
36630fi
36631
36632
36633  test -n "$ac_ct_STRIP" && break
36634done
36635
36636  if test "x$ac_ct_STRIP" = x; then
36637    STRIP=""
36638  else
36639    case $cross_compiling:$ac_tool_warned in
36640yes:)
36641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36643ac_tool_warned=yes ;;
36644esac
36645    STRIP=$ac_ct_STRIP
36646  fi
36647fi
36648
36649  else
36650    # The variable is set, but is it from the command line or the environment?
36651
36652    # Try to remove the string !STRIP! from our list.
36653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36655      # If it failed, the variable was not from the command line. Ignore it,
36656      # but warn the user (except for BASH, which is always set by the calling BASH).
36657      if test "xSTRIP" != xBASH; then
36658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36659$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36660      fi
36661      # Try to locate tool using the code snippet
36662      if test -n "$ac_tool_prefix"; then
36663  for ac_prog in strip
36664  do
36665    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36666set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36668$as_echo_n "checking for $ac_word... " >&6; }
36669if ${ac_cv_prog_STRIP+:} false; then :
36670  $as_echo_n "(cached) " >&6
36671else
36672  if test -n "$STRIP"; then
36673  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36674else
36675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36676for as_dir in $PATH
36677do
36678  IFS=$as_save_IFS
36679  test -z "$as_dir" && as_dir=.
36680    for ac_exec_ext in '' $ac_executable_extensions; do
36681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36682    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36684    break 2
36685  fi
36686done
36687  done
36688IFS=$as_save_IFS
36689
36690fi
36691fi
36692STRIP=$ac_cv_prog_STRIP
36693if test -n "$STRIP"; then
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36695$as_echo "$STRIP" >&6; }
36696else
36697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36698$as_echo "no" >&6; }
36699fi
36700
36701
36702    test -n "$STRIP" && break
36703  done
36704fi
36705if test -z "$STRIP"; then
36706  ac_ct_STRIP=$STRIP
36707  for ac_prog in strip
36708do
36709  # Extract the first word of "$ac_prog", so it can be a program name with args.
36710set dummy $ac_prog; ac_word=$2
36711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36712$as_echo_n "checking for $ac_word... " >&6; }
36713if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36714  $as_echo_n "(cached) " >&6
36715else
36716  if test -n "$ac_ct_STRIP"; then
36717  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36718else
36719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36720for as_dir in $PATH
36721do
36722  IFS=$as_save_IFS
36723  test -z "$as_dir" && as_dir=.
36724    for ac_exec_ext in '' $ac_executable_extensions; do
36725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36726    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36728    break 2
36729  fi
36730done
36731  done
36732IFS=$as_save_IFS
36733
36734fi
36735fi
36736ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36737if test -n "$ac_ct_STRIP"; then
36738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36739$as_echo "$ac_ct_STRIP" >&6; }
36740else
36741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36742$as_echo "no" >&6; }
36743fi
36744
36745
36746  test -n "$ac_ct_STRIP" && break
36747done
36748
36749  if test "x$ac_ct_STRIP" = x; then
36750    STRIP=""
36751  else
36752    case $cross_compiling:$ac_tool_warned in
36753yes:)
36754{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36755$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36756ac_tool_warned=yes ;;
36757esac
36758    STRIP=$ac_ct_STRIP
36759  fi
36760fi
36761
36762    else
36763      # If it succeeded, then it was overridden by the user. We will use it
36764      # for the tool.
36765
36766      # First remove it from the list of overridden variables, so we can test
36767      # for unknown variables in the end.
36768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36769
36770      # Check if the provided tool contains a complete path.
36771      tool_specified="$STRIP"
36772      tool_basename="${tool_specified##*/}"
36773      if test "x$tool_basename" = "x$tool_specified"; then
36774        # A command without a complete path is provided, search $PATH.
36775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36776$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36777        # Extract the first word of "$tool_basename", so it can be a program name with args.
36778set dummy $tool_basename; ac_word=$2
36779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36780$as_echo_n "checking for $ac_word... " >&6; }
36781if ${ac_cv_path_STRIP+:} false; then :
36782  $as_echo_n "(cached) " >&6
36783else
36784  case $STRIP in
36785  [\\/]* | ?:[\\/]*)
36786  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36787  ;;
36788  *)
36789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36790for as_dir in $PATH
36791do
36792  IFS=$as_save_IFS
36793  test -z "$as_dir" && as_dir=.
36794    for ac_exec_ext in '' $ac_executable_extensions; do
36795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36796    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36798    break 2
36799  fi
36800done
36801  done
36802IFS=$as_save_IFS
36803
36804  ;;
36805esac
36806fi
36807STRIP=$ac_cv_path_STRIP
36808if test -n "$STRIP"; then
36809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36810$as_echo "$STRIP" >&6; }
36811else
36812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36813$as_echo "no" >&6; }
36814fi
36815
36816
36817        if test "x$STRIP" = x; then
36818          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36819        fi
36820      else
36821        # Otherwise we believe it is a complete path. Use it as it is.
36822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36823$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36825$as_echo_n "checking for STRIP... " >&6; }
36826        if test ! -x "$tool_specified"; then
36827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36828$as_echo "not found" >&6; }
36829          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36830        fi
36831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36832$as_echo "$tool_specified" >&6; }
36833      fi
36834    fi
36835  fi
36836
36837
36838
36839  # Only process if variable expands to non-empty
36840
36841  if test "x$STRIP" != x; then
36842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36843
36844  # First separate the path from the arguments. This will split at the first
36845  # space.
36846  complete="$STRIP"
36847  path="${complete%% *}"
36848  tmp="$complete EOL"
36849  arguments="${tmp#* }"
36850
36851  # Input might be given as Windows format, start by converting to
36852  # unix format.
36853  new_path=`$CYGPATH -u "$path"`
36854
36855  # Now try to locate executable using which
36856  new_path=`$WHICH "$new_path" 2> /dev/null`
36857  # bat and cmd files are not always considered executable in cygwin causing which
36858  # to not find them
36859  if test "x$new_path" = x \
36860      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36861      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36862    new_path=`$CYGPATH -u "$path"`
36863  fi
36864  if test "x$new_path" = x; then
36865    # Oops. Which didn't find the executable.
36866    # The splitting of arguments from the executable at a space might have been incorrect,
36867    # since paths with space are more likely in Windows. Give it another try with the whole
36868    # argument.
36869    path="$complete"
36870    arguments="EOL"
36871    new_path=`$CYGPATH -u "$path"`
36872    new_path=`$WHICH "$new_path" 2> /dev/null`
36873    # bat and cmd files are not always considered executable in cygwin causing which
36874    # to not find them
36875    if test "x$new_path" = x \
36876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36878      new_path=`$CYGPATH -u "$path"`
36879    fi
36880    if test "x$new_path" = x; then
36881      # It's still not found. Now this is an unrecoverable error.
36882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36883$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36884      has_space=`$ECHO "$complete" | $GREP " "`
36885      if test "x$has_space" != x; then
36886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36888      fi
36889      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36890    fi
36891  fi
36892
36893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36896  # "foo.exe" is OK but "foo" is an error.
36897  #
36898  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36899  # It is also a way to make sure we got the proper file name for the real test later on.
36900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36901  if test "x$test_shortpath" = x; then
36902    # Short path failed, file does not exist as specified.
36903    # Try adding .exe or .cmd
36904    if test -f "${new_path}.exe"; then
36905      input_to_shortpath="${new_path}.exe"
36906    elif test -f "${new_path}.cmd"; then
36907      input_to_shortpath="${new_path}.cmd"
36908    else
36909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36910$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36911      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36912$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36913      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36914    fi
36915  else
36916    input_to_shortpath="$new_path"
36917  fi
36918
36919  # Call helper function which possibly converts this using DOS-style short mode.
36920  # If so, the updated path is stored in $new_path.
36921  new_path="$input_to_shortpath"
36922
36923  input_path="$input_to_shortpath"
36924  # Check if we need to convert this using DOS-style short mode. If the path
36925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36926  # take no chances and rewrite it.
36927  # Note: m4 eats our [], so we need to use [ and ] instead.
36928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36929  if test "x$has_forbidden_chars" != x; then
36930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36934      # Going to short mode and back again did indeed matter. Since short mode is
36935      # case insensitive, let's make it lowercase to improve readability.
36936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36937      # Now convert it back to Unix-style (cygpath)
36938      input_path=`$CYGPATH -u "$shortmode_path"`
36939      new_path="$input_path"
36940    fi
36941  fi
36942
36943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36944  if test "x$test_cygdrive_prefix" = x; then
36945    # As a simple fix, exclude /usr/bin since it's not a real path.
36946    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36948      # a path prefixed by /cygdrive for fixpath to work.
36949      new_path="$CYGWIN_ROOT_PATH$input_path"
36950    fi
36951  fi
36952
36953  # remove trailing .exe if any
36954  new_path="${new_path/%.exe/}"
36955
36956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36957
36958  # First separate the path from the arguments. This will split at the first
36959  # space.
36960  complete="$STRIP"
36961  path="${complete%% *}"
36962  tmp="$complete EOL"
36963  arguments="${tmp#* }"
36964
36965  # Input might be given as Windows format, start by converting to
36966  # unix format.
36967  new_path="$path"
36968
36969  windows_path="$new_path"
36970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36971    unix_path=`$CYGPATH -u "$windows_path"`
36972    new_path="$unix_path"
36973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36975    new_path="$unix_path"
36976  fi
36977
36978
36979  # Now try to locate executable using which
36980  new_path=`$WHICH "$new_path" 2> /dev/null`
36981
36982  if test "x$new_path" = x; then
36983    # Oops. Which didn't find the executable.
36984    # The splitting of arguments from the executable at a space might have been incorrect,
36985    # since paths with space are more likely in Windows. Give it another try with the whole
36986    # argument.
36987    path="$complete"
36988    arguments="EOL"
36989    new_path="$path"
36990
36991  windows_path="$new_path"
36992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36993    unix_path=`$CYGPATH -u "$windows_path"`
36994    new_path="$unix_path"
36995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36997    new_path="$unix_path"
36998  fi
36999
37000
37001    new_path=`$WHICH "$new_path" 2> /dev/null`
37002    # bat and cmd files are not always considered executable in MSYS causing which
37003    # to not find them
37004    if test "x$new_path" = x \
37005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37007      new_path="$path"
37008
37009  windows_path="$new_path"
37010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37011    unix_path=`$CYGPATH -u "$windows_path"`
37012    new_path="$unix_path"
37013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37015    new_path="$unix_path"
37016  fi
37017
37018    fi
37019
37020    if test "x$new_path" = x; then
37021      # It's still not found. Now this is an unrecoverable error.
37022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37023$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37024      has_space=`$ECHO "$complete" | $GREP " "`
37025      if test "x$has_space" != x; then
37026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37028      fi
37029      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37030    fi
37031  fi
37032
37033  # Now new_path has a complete unix path to the binary
37034  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37035    # Keep paths in /bin as-is, but remove trailing .exe if any
37036    new_path="${new_path/%.exe/}"
37037    # Do not save /bin paths to all_fixpath_prefixes!
37038  else
37039    # Not in mixed or Windows style, start by that.
37040    new_path=`cmd //c echo $new_path`
37041
37042  input_path="$new_path"
37043  # Check if we need to convert this using DOS-style short mode. If the path
37044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37045  # take no chances and rewrite it.
37046  # Note: m4 eats our [], so we need to use [ and ] instead.
37047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37048  if test "x$has_forbidden_chars" != x; then
37049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37051  fi
37052
37053    # Output is in $new_path
37054
37055  windows_path="$new_path"
37056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37057    unix_path=`$CYGPATH -u "$windows_path"`
37058    new_path="$unix_path"
37059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37061    new_path="$unix_path"
37062  fi
37063
37064    # remove trailing .exe if any
37065    new_path="${new_path/%.exe/}"
37066
37067    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37068    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37069  fi
37070
37071    else
37072      # We're on a unix platform. Hooray! :)
37073      # First separate the path from the arguments. This will split at the first
37074      # space.
37075      complete="$STRIP"
37076      path="${complete%% *}"
37077      tmp="$complete EOL"
37078      arguments="${tmp#* }"
37079
37080      # Cannot rely on the command "which" here since it doesn't always work.
37081      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37082      if test -z "$is_absolute_path"; then
37083        # Path to executable is not absolute. Find it.
37084        IFS_save="$IFS"
37085        IFS=:
37086        for p in $PATH; do
37087          if test -f "$p/$path" && test -x "$p/$path"; then
37088            new_path="$p/$path"
37089            break
37090          fi
37091        done
37092        IFS="$IFS_save"
37093      else
37094        # This is an absolute path, we can use it without further modifications.
37095        new_path="$path"
37096      fi
37097
37098      if test "x$new_path" = x; then
37099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37100$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37101        has_space=`$ECHO "$complete" | $GREP " "`
37102        if test "x$has_space" != x; then
37103          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37104$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37105        fi
37106        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37107      fi
37108    fi
37109
37110    # Now join together the path and the arguments once again
37111    if test "x$arguments" != xEOL; then
37112      new_complete="$new_path ${arguments% *}"
37113    else
37114      new_complete="$new_path"
37115    fi
37116
37117    if test "x$complete" != "x$new_complete"; then
37118      STRIP="$new_complete"
37119      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37120$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37121    fi
37122  fi
37123
37124
37125
37126  # Publish this variable in the help.
37127
37128
37129  if test "x$NM" = x; then
37130    # The variable is not set by user, try to locate tool using the code snippet
37131    if test -n "$ac_tool_prefix"; then
37132  for ac_prog in nm
37133  do
37134    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37135set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37137$as_echo_n "checking for $ac_word... " >&6; }
37138if ${ac_cv_prog_NM+:} false; then :
37139  $as_echo_n "(cached) " >&6
37140else
37141  if test -n "$NM"; then
37142  ac_cv_prog_NM="$NM" # Let the user override the test.
37143else
37144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37145for as_dir in $PATH
37146do
37147  IFS=$as_save_IFS
37148  test -z "$as_dir" && as_dir=.
37149    for ac_exec_ext in '' $ac_executable_extensions; do
37150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37151    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37153    break 2
37154  fi
37155done
37156  done
37157IFS=$as_save_IFS
37158
37159fi
37160fi
37161NM=$ac_cv_prog_NM
37162if test -n "$NM"; then
37163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37164$as_echo "$NM" >&6; }
37165else
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37167$as_echo "no" >&6; }
37168fi
37169
37170
37171    test -n "$NM" && break
37172  done
37173fi
37174if test -z "$NM"; then
37175  ac_ct_NM=$NM
37176  for ac_prog in nm
37177do
37178  # Extract the first word of "$ac_prog", so it can be a program name with args.
37179set dummy $ac_prog; ac_word=$2
37180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37181$as_echo_n "checking for $ac_word... " >&6; }
37182if ${ac_cv_prog_ac_ct_NM+:} false; then :
37183  $as_echo_n "(cached) " >&6
37184else
37185  if test -n "$ac_ct_NM"; then
37186  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37187else
37188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37189for as_dir in $PATH
37190do
37191  IFS=$as_save_IFS
37192  test -z "$as_dir" && as_dir=.
37193    for ac_exec_ext in '' $ac_executable_extensions; do
37194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37195    ac_cv_prog_ac_ct_NM="$ac_prog"
37196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37197    break 2
37198  fi
37199done
37200  done
37201IFS=$as_save_IFS
37202
37203fi
37204fi
37205ac_ct_NM=$ac_cv_prog_ac_ct_NM
37206if test -n "$ac_ct_NM"; then
37207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37208$as_echo "$ac_ct_NM" >&6; }
37209else
37210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37211$as_echo "no" >&6; }
37212fi
37213
37214
37215  test -n "$ac_ct_NM" && break
37216done
37217
37218  if test "x$ac_ct_NM" = x; then
37219    NM=""
37220  else
37221    case $cross_compiling:$ac_tool_warned in
37222yes:)
37223{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37224$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37225ac_tool_warned=yes ;;
37226esac
37227    NM=$ac_ct_NM
37228  fi
37229fi
37230
37231  else
37232    # The variable is set, but is it from the command line or the environment?
37233
37234    # Try to remove the string !NM! from our list.
37235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37237      # If it failed, the variable was not from the command line. Ignore it,
37238      # but warn the user (except for BASH, which is always set by the calling BASH).
37239      if test "xNM" != xBASH; then
37240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37241$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37242      fi
37243      # Try to locate tool using the code snippet
37244      if test -n "$ac_tool_prefix"; then
37245  for ac_prog in nm
37246  do
37247    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37248set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37250$as_echo_n "checking for $ac_word... " >&6; }
37251if ${ac_cv_prog_NM+:} false; then :
37252  $as_echo_n "(cached) " >&6
37253else
37254  if test -n "$NM"; then
37255  ac_cv_prog_NM="$NM" # Let the user override the test.
37256else
37257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37258for as_dir in $PATH
37259do
37260  IFS=$as_save_IFS
37261  test -z "$as_dir" && as_dir=.
37262    for ac_exec_ext in '' $ac_executable_extensions; do
37263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37264    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37266    break 2
37267  fi
37268done
37269  done
37270IFS=$as_save_IFS
37271
37272fi
37273fi
37274NM=$ac_cv_prog_NM
37275if test -n "$NM"; then
37276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37277$as_echo "$NM" >&6; }
37278else
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37280$as_echo "no" >&6; }
37281fi
37282
37283
37284    test -n "$NM" && break
37285  done
37286fi
37287if test -z "$NM"; then
37288  ac_ct_NM=$NM
37289  for ac_prog in nm
37290do
37291  # Extract the first word of "$ac_prog", so it can be a program name with args.
37292set dummy $ac_prog; ac_word=$2
37293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37294$as_echo_n "checking for $ac_word... " >&6; }
37295if ${ac_cv_prog_ac_ct_NM+:} false; then :
37296  $as_echo_n "(cached) " >&6
37297else
37298  if test -n "$ac_ct_NM"; then
37299  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37300else
37301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37302for as_dir in $PATH
37303do
37304  IFS=$as_save_IFS
37305  test -z "$as_dir" && as_dir=.
37306    for ac_exec_ext in '' $ac_executable_extensions; do
37307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37308    ac_cv_prog_ac_ct_NM="$ac_prog"
37309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37310    break 2
37311  fi
37312done
37313  done
37314IFS=$as_save_IFS
37315
37316fi
37317fi
37318ac_ct_NM=$ac_cv_prog_ac_ct_NM
37319if test -n "$ac_ct_NM"; then
37320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37321$as_echo "$ac_ct_NM" >&6; }
37322else
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37324$as_echo "no" >&6; }
37325fi
37326
37327
37328  test -n "$ac_ct_NM" && break
37329done
37330
37331  if test "x$ac_ct_NM" = x; then
37332    NM=""
37333  else
37334    case $cross_compiling:$ac_tool_warned in
37335yes:)
37336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37338ac_tool_warned=yes ;;
37339esac
37340    NM=$ac_ct_NM
37341  fi
37342fi
37343
37344    else
37345      # If it succeeded, then it was overridden by the user. We will use it
37346      # for the tool.
37347
37348      # First remove it from the list of overridden variables, so we can test
37349      # for unknown variables in the end.
37350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37351
37352      # Check if the provided tool contains a complete path.
37353      tool_specified="$NM"
37354      tool_basename="${tool_specified##*/}"
37355      if test "x$tool_basename" = "x$tool_specified"; then
37356        # A command without a complete path is provided, search $PATH.
37357        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37358$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37359        # Extract the first word of "$tool_basename", so it can be a program name with args.
37360set dummy $tool_basename; ac_word=$2
37361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37362$as_echo_n "checking for $ac_word... " >&6; }
37363if ${ac_cv_path_NM+:} false; then :
37364  $as_echo_n "(cached) " >&6
37365else
37366  case $NM in
37367  [\\/]* | ?:[\\/]*)
37368  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37369  ;;
37370  *)
37371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37372for as_dir in $PATH
37373do
37374  IFS=$as_save_IFS
37375  test -z "$as_dir" && as_dir=.
37376    for ac_exec_ext in '' $ac_executable_extensions; do
37377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37378    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37380    break 2
37381  fi
37382done
37383  done
37384IFS=$as_save_IFS
37385
37386  ;;
37387esac
37388fi
37389NM=$ac_cv_path_NM
37390if test -n "$NM"; then
37391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37392$as_echo "$NM" >&6; }
37393else
37394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37395$as_echo "no" >&6; }
37396fi
37397
37398
37399        if test "x$NM" = x; then
37400          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37401        fi
37402      else
37403        # Otherwise we believe it is a complete path. Use it as it is.
37404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37405$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37407$as_echo_n "checking for NM... " >&6; }
37408        if test ! -x "$tool_specified"; then
37409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37410$as_echo "not found" >&6; }
37411          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37412        fi
37413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37414$as_echo "$tool_specified" >&6; }
37415      fi
37416    fi
37417  fi
37418
37419
37420
37421  # Only process if variable expands to non-empty
37422
37423  if test "x$NM" != x; then
37424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37425
37426  # First separate the path from the arguments. This will split at the first
37427  # space.
37428  complete="$NM"
37429  path="${complete%% *}"
37430  tmp="$complete EOL"
37431  arguments="${tmp#* }"
37432
37433  # Input might be given as Windows format, start by converting to
37434  # unix format.
37435  new_path=`$CYGPATH -u "$path"`
37436
37437  # Now try to locate executable using which
37438  new_path=`$WHICH "$new_path" 2> /dev/null`
37439  # bat and cmd files are not always considered executable in cygwin causing which
37440  # to not find them
37441  if test "x$new_path" = x \
37442      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37443      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37444    new_path=`$CYGPATH -u "$path"`
37445  fi
37446  if test "x$new_path" = x; then
37447    # Oops. Which didn't find the executable.
37448    # The splitting of arguments from the executable at a space might have been incorrect,
37449    # since paths with space are more likely in Windows. Give it another try with the whole
37450    # argument.
37451    path="$complete"
37452    arguments="EOL"
37453    new_path=`$CYGPATH -u "$path"`
37454    new_path=`$WHICH "$new_path" 2> /dev/null`
37455    # bat and cmd files are not always considered executable in cygwin causing which
37456    # to not find them
37457    if test "x$new_path" = x \
37458        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37459        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37460      new_path=`$CYGPATH -u "$path"`
37461    fi
37462    if test "x$new_path" = x; then
37463      # It's still not found. Now this is an unrecoverable error.
37464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37465$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37466      has_space=`$ECHO "$complete" | $GREP " "`
37467      if test "x$has_space" != x; then
37468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37470      fi
37471      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37472    fi
37473  fi
37474
37475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37478  # "foo.exe" is OK but "foo" is an error.
37479  #
37480  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37481  # It is also a way to make sure we got the proper file name for the real test later on.
37482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37483  if test "x$test_shortpath" = x; then
37484    # Short path failed, file does not exist as specified.
37485    # Try adding .exe or .cmd
37486    if test -f "${new_path}.exe"; then
37487      input_to_shortpath="${new_path}.exe"
37488    elif test -f "${new_path}.cmd"; then
37489      input_to_shortpath="${new_path}.cmd"
37490    else
37491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37492$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37493      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37494$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37495      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37496    fi
37497  else
37498    input_to_shortpath="$new_path"
37499  fi
37500
37501  # Call helper function which possibly converts this using DOS-style short mode.
37502  # If so, the updated path is stored in $new_path.
37503  new_path="$input_to_shortpath"
37504
37505  input_path="$input_to_shortpath"
37506  # Check if we need to convert this using DOS-style short mode. If the path
37507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37508  # take no chances and rewrite it.
37509  # Note: m4 eats our [], so we need to use [ and ] instead.
37510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37511  if test "x$has_forbidden_chars" != x; then
37512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37516      # Going to short mode and back again did indeed matter. Since short mode is
37517      # case insensitive, let's make it lowercase to improve readability.
37518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37519      # Now convert it back to Unix-style (cygpath)
37520      input_path=`$CYGPATH -u "$shortmode_path"`
37521      new_path="$input_path"
37522    fi
37523  fi
37524
37525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37526  if test "x$test_cygdrive_prefix" = x; then
37527    # As a simple fix, exclude /usr/bin since it's not a real path.
37528    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37530      # a path prefixed by /cygdrive for fixpath to work.
37531      new_path="$CYGWIN_ROOT_PATH$input_path"
37532    fi
37533  fi
37534
37535  # remove trailing .exe if any
37536  new_path="${new_path/%.exe/}"
37537
37538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37539
37540  # First separate the path from the arguments. This will split at the first
37541  # space.
37542  complete="$NM"
37543  path="${complete%% *}"
37544  tmp="$complete EOL"
37545  arguments="${tmp#* }"
37546
37547  # Input might be given as Windows format, start by converting to
37548  # unix format.
37549  new_path="$path"
37550
37551  windows_path="$new_path"
37552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37553    unix_path=`$CYGPATH -u "$windows_path"`
37554    new_path="$unix_path"
37555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37557    new_path="$unix_path"
37558  fi
37559
37560
37561  # Now try to locate executable using which
37562  new_path=`$WHICH "$new_path" 2> /dev/null`
37563
37564  if test "x$new_path" = x; then
37565    # Oops. Which didn't find the executable.
37566    # The splitting of arguments from the executable at a space might have been incorrect,
37567    # since paths with space are more likely in Windows. Give it another try with the whole
37568    # argument.
37569    path="$complete"
37570    arguments="EOL"
37571    new_path="$path"
37572
37573  windows_path="$new_path"
37574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37575    unix_path=`$CYGPATH -u "$windows_path"`
37576    new_path="$unix_path"
37577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37579    new_path="$unix_path"
37580  fi
37581
37582
37583    new_path=`$WHICH "$new_path" 2> /dev/null`
37584    # bat and cmd files are not always considered executable in MSYS causing which
37585    # to not find them
37586    if test "x$new_path" = x \
37587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37589      new_path="$path"
37590
37591  windows_path="$new_path"
37592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37593    unix_path=`$CYGPATH -u "$windows_path"`
37594    new_path="$unix_path"
37595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37597    new_path="$unix_path"
37598  fi
37599
37600    fi
37601
37602    if test "x$new_path" = x; then
37603      # It's still not found. Now this is an unrecoverable error.
37604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37605$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37606      has_space=`$ECHO "$complete" | $GREP " "`
37607      if test "x$has_space" != x; then
37608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37610      fi
37611      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37612    fi
37613  fi
37614
37615  # Now new_path has a complete unix path to the binary
37616  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37617    # Keep paths in /bin as-is, but remove trailing .exe if any
37618    new_path="${new_path/%.exe/}"
37619    # Do not save /bin paths to all_fixpath_prefixes!
37620  else
37621    # Not in mixed or Windows style, start by that.
37622    new_path=`cmd //c echo $new_path`
37623
37624  input_path="$new_path"
37625  # Check if we need to convert this using DOS-style short mode. If the path
37626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37627  # take no chances and rewrite it.
37628  # Note: m4 eats our [], so we need to use [ and ] instead.
37629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37630  if test "x$has_forbidden_chars" != x; then
37631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37633  fi
37634
37635    # Output is in $new_path
37636
37637  windows_path="$new_path"
37638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37639    unix_path=`$CYGPATH -u "$windows_path"`
37640    new_path="$unix_path"
37641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37643    new_path="$unix_path"
37644  fi
37645
37646    # remove trailing .exe if any
37647    new_path="${new_path/%.exe/}"
37648
37649    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37650    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37651  fi
37652
37653    else
37654      # We're on a unix platform. Hooray! :)
37655      # First separate the path from the arguments. This will split at the first
37656      # space.
37657      complete="$NM"
37658      path="${complete%% *}"
37659      tmp="$complete EOL"
37660      arguments="${tmp#* }"
37661
37662      # Cannot rely on the command "which" here since it doesn't always work.
37663      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37664      if test -z "$is_absolute_path"; then
37665        # Path to executable is not absolute. Find it.
37666        IFS_save="$IFS"
37667        IFS=:
37668        for p in $PATH; do
37669          if test -f "$p/$path" && test -x "$p/$path"; then
37670            new_path="$p/$path"
37671            break
37672          fi
37673        done
37674        IFS="$IFS_save"
37675      else
37676        # This is an absolute path, we can use it without further modifications.
37677        new_path="$path"
37678      fi
37679
37680      if test "x$new_path" = x; then
37681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37682$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37683        has_space=`$ECHO "$complete" | $GREP " "`
37684        if test "x$has_space" != x; then
37685          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37686$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37687        fi
37688        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37689      fi
37690    fi
37691
37692    # Now join together the path and the arguments once again
37693    if test "x$arguments" != xEOL; then
37694      new_complete="$new_path ${arguments% *}"
37695    else
37696      new_complete="$new_path"
37697    fi
37698
37699    if test "x$complete" != "x$new_complete"; then
37700      NM="$new_complete"
37701      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37702$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37703    fi
37704  fi
37705
37706    GNM="$NM"
37707
37708  fi
37709
37710  # objcopy is used for moving debug symbols to separate files when
37711  # full debug symbols are enabled.
37712  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37713
37714
37715  # Publish this variable in the help.
37716
37717
37718  if test "x$OBJCOPY" = x; then
37719    # The variable is not set by user, try to locate tool using the code snippet
37720    if test -n "$ac_tool_prefix"; then
37721  for ac_prog in gobjcopy objcopy
37722  do
37723    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37724set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37726$as_echo_n "checking for $ac_word... " >&6; }
37727if ${ac_cv_prog_OBJCOPY+:} false; then :
37728  $as_echo_n "(cached) " >&6
37729else
37730  if test -n "$OBJCOPY"; then
37731  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37732else
37733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37734for as_dir in $PATH
37735do
37736  IFS=$as_save_IFS
37737  test -z "$as_dir" && as_dir=.
37738    for ac_exec_ext in '' $ac_executable_extensions; do
37739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37740    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37742    break 2
37743  fi
37744done
37745  done
37746IFS=$as_save_IFS
37747
37748fi
37749fi
37750OBJCOPY=$ac_cv_prog_OBJCOPY
37751if test -n "$OBJCOPY"; then
37752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37753$as_echo "$OBJCOPY" >&6; }
37754else
37755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37756$as_echo "no" >&6; }
37757fi
37758
37759
37760    test -n "$OBJCOPY" && break
37761  done
37762fi
37763if test -z "$OBJCOPY"; then
37764  ac_ct_OBJCOPY=$OBJCOPY
37765  for ac_prog in gobjcopy objcopy
37766do
37767  # Extract the first word of "$ac_prog", so it can be a program name with args.
37768set dummy $ac_prog; ac_word=$2
37769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37770$as_echo_n "checking for $ac_word... " >&6; }
37771if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37772  $as_echo_n "(cached) " >&6
37773else
37774  if test -n "$ac_ct_OBJCOPY"; then
37775  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37776else
37777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37778for as_dir in $PATH
37779do
37780  IFS=$as_save_IFS
37781  test -z "$as_dir" && as_dir=.
37782    for ac_exec_ext in '' $ac_executable_extensions; do
37783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37784    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37786    break 2
37787  fi
37788done
37789  done
37790IFS=$as_save_IFS
37791
37792fi
37793fi
37794ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37795if test -n "$ac_ct_OBJCOPY"; then
37796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37797$as_echo "$ac_ct_OBJCOPY" >&6; }
37798else
37799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37800$as_echo "no" >&6; }
37801fi
37802
37803
37804  test -n "$ac_ct_OBJCOPY" && break
37805done
37806
37807  if test "x$ac_ct_OBJCOPY" = x; then
37808    OBJCOPY=""
37809  else
37810    case $cross_compiling:$ac_tool_warned in
37811yes:)
37812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37814ac_tool_warned=yes ;;
37815esac
37816    OBJCOPY=$ac_ct_OBJCOPY
37817  fi
37818fi
37819
37820  else
37821    # The variable is set, but is it from the command line or the environment?
37822
37823    # Try to remove the string !OBJCOPY! from our list.
37824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37826      # If it failed, the variable was not from the command line. Ignore it,
37827      # but warn the user (except for BASH, which is always set by the calling BASH).
37828      if test "xOBJCOPY" != xBASH; then
37829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37830$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37831      fi
37832      # Try to locate tool using the code snippet
37833      if test -n "$ac_tool_prefix"; then
37834  for ac_prog in gobjcopy objcopy
37835  do
37836    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37837set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37839$as_echo_n "checking for $ac_word... " >&6; }
37840if ${ac_cv_prog_OBJCOPY+:} false; then :
37841  $as_echo_n "(cached) " >&6
37842else
37843  if test -n "$OBJCOPY"; then
37844  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37845else
37846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37847for as_dir in $PATH
37848do
37849  IFS=$as_save_IFS
37850  test -z "$as_dir" && as_dir=.
37851    for ac_exec_ext in '' $ac_executable_extensions; do
37852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37853    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37855    break 2
37856  fi
37857done
37858  done
37859IFS=$as_save_IFS
37860
37861fi
37862fi
37863OBJCOPY=$ac_cv_prog_OBJCOPY
37864if test -n "$OBJCOPY"; then
37865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37866$as_echo "$OBJCOPY" >&6; }
37867else
37868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37869$as_echo "no" >&6; }
37870fi
37871
37872
37873    test -n "$OBJCOPY" && break
37874  done
37875fi
37876if test -z "$OBJCOPY"; then
37877  ac_ct_OBJCOPY=$OBJCOPY
37878  for ac_prog in gobjcopy objcopy
37879do
37880  # Extract the first word of "$ac_prog", so it can be a program name with args.
37881set dummy $ac_prog; ac_word=$2
37882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37883$as_echo_n "checking for $ac_word... " >&6; }
37884if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37885  $as_echo_n "(cached) " >&6
37886else
37887  if test -n "$ac_ct_OBJCOPY"; then
37888  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37889else
37890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37891for as_dir in $PATH
37892do
37893  IFS=$as_save_IFS
37894  test -z "$as_dir" && as_dir=.
37895    for ac_exec_ext in '' $ac_executable_extensions; do
37896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37897    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37899    break 2
37900  fi
37901done
37902  done
37903IFS=$as_save_IFS
37904
37905fi
37906fi
37907ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37908if test -n "$ac_ct_OBJCOPY"; then
37909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37910$as_echo "$ac_ct_OBJCOPY" >&6; }
37911else
37912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37913$as_echo "no" >&6; }
37914fi
37915
37916
37917  test -n "$ac_ct_OBJCOPY" && break
37918done
37919
37920  if test "x$ac_ct_OBJCOPY" = x; then
37921    OBJCOPY=""
37922  else
37923    case $cross_compiling:$ac_tool_warned in
37924yes:)
37925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37927ac_tool_warned=yes ;;
37928esac
37929    OBJCOPY=$ac_ct_OBJCOPY
37930  fi
37931fi
37932
37933    else
37934      # If it succeeded, then it was overridden by the user. We will use it
37935      # for the tool.
37936
37937      # First remove it from the list of overridden variables, so we can test
37938      # for unknown variables in the end.
37939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37940
37941      # Check if the provided tool contains a complete path.
37942      tool_specified="$OBJCOPY"
37943      tool_basename="${tool_specified##*/}"
37944      if test "x$tool_basename" = "x$tool_specified"; then
37945        # A command without a complete path is provided, search $PATH.
37946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37947$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37948        # Extract the first word of "$tool_basename", so it can be a program name with args.
37949set dummy $tool_basename; ac_word=$2
37950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37951$as_echo_n "checking for $ac_word... " >&6; }
37952if ${ac_cv_path_OBJCOPY+:} false; then :
37953  $as_echo_n "(cached) " >&6
37954else
37955  case $OBJCOPY in
37956  [\\/]* | ?:[\\/]*)
37957  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37958  ;;
37959  *)
37960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37961for as_dir in $PATH
37962do
37963  IFS=$as_save_IFS
37964  test -z "$as_dir" && as_dir=.
37965    for ac_exec_ext in '' $ac_executable_extensions; do
37966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37967    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37969    break 2
37970  fi
37971done
37972  done
37973IFS=$as_save_IFS
37974
37975  ;;
37976esac
37977fi
37978OBJCOPY=$ac_cv_path_OBJCOPY
37979if test -n "$OBJCOPY"; then
37980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37981$as_echo "$OBJCOPY" >&6; }
37982else
37983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37984$as_echo "no" >&6; }
37985fi
37986
37987
37988        if test "x$OBJCOPY" = x; then
37989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37990        fi
37991      else
37992        # Otherwise we believe it is a complete path. Use it as it is.
37993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37994$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37996$as_echo_n "checking for OBJCOPY... " >&6; }
37997        if test ! -x "$tool_specified"; then
37998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37999$as_echo "not found" >&6; }
38000          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38001        fi
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38003$as_echo "$tool_specified" >&6; }
38004      fi
38005    fi
38006  fi
38007
38008
38009    # Only call fixup if objcopy was found.
38010    if test -n "$OBJCOPY"; then
38011
38012  # Only process if variable expands to non-empty
38013
38014  if test "x$OBJCOPY" != x; then
38015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38016
38017  # First separate the path from the arguments. This will split at the first
38018  # space.
38019  complete="$OBJCOPY"
38020  path="${complete%% *}"
38021  tmp="$complete EOL"
38022  arguments="${tmp#* }"
38023
38024  # Input might be given as Windows format, start by converting to
38025  # unix format.
38026  new_path=`$CYGPATH -u "$path"`
38027
38028  # Now try to locate executable using which
38029  new_path=`$WHICH "$new_path" 2> /dev/null`
38030  # bat and cmd files are not always considered executable in cygwin causing which
38031  # to not find them
38032  if test "x$new_path" = x \
38033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38035    new_path=`$CYGPATH -u "$path"`
38036  fi
38037  if test "x$new_path" = x; then
38038    # Oops. Which didn't find the executable.
38039    # The splitting of arguments from the executable at a space might have been incorrect,
38040    # since paths with space are more likely in Windows. Give it another try with the whole
38041    # argument.
38042    path="$complete"
38043    arguments="EOL"
38044    new_path=`$CYGPATH -u "$path"`
38045    new_path=`$WHICH "$new_path" 2> /dev/null`
38046    # bat and cmd files are not always considered executable in cygwin causing which
38047    # to not find them
38048    if test "x$new_path" = x \
38049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38051      new_path=`$CYGPATH -u "$path"`
38052    fi
38053    if test "x$new_path" = x; then
38054      # It's still not found. Now this is an unrecoverable error.
38055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38056$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38057      has_space=`$ECHO "$complete" | $GREP " "`
38058      if test "x$has_space" != x; then
38059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38061      fi
38062      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38063    fi
38064  fi
38065
38066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38069  # "foo.exe" is OK but "foo" is an error.
38070  #
38071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38072  # It is also a way to make sure we got the proper file name for the real test later on.
38073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38074  if test "x$test_shortpath" = x; then
38075    # Short path failed, file does not exist as specified.
38076    # Try adding .exe or .cmd
38077    if test -f "${new_path}.exe"; then
38078      input_to_shortpath="${new_path}.exe"
38079    elif test -f "${new_path}.cmd"; then
38080      input_to_shortpath="${new_path}.cmd"
38081    else
38082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38083$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38086      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38087    fi
38088  else
38089    input_to_shortpath="$new_path"
38090  fi
38091
38092  # Call helper function which possibly converts this using DOS-style short mode.
38093  # If so, the updated path is stored in $new_path.
38094  new_path="$input_to_shortpath"
38095
38096  input_path="$input_to_shortpath"
38097  # Check if we need to convert this using DOS-style short mode. If the path
38098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38099  # take no chances and rewrite it.
38100  # Note: m4 eats our [], so we need to use [ and ] instead.
38101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38102  if test "x$has_forbidden_chars" != x; then
38103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38107      # Going to short mode and back again did indeed matter. Since short mode is
38108      # case insensitive, let's make it lowercase to improve readability.
38109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38110      # Now convert it back to Unix-style (cygpath)
38111      input_path=`$CYGPATH -u "$shortmode_path"`
38112      new_path="$input_path"
38113    fi
38114  fi
38115
38116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38117  if test "x$test_cygdrive_prefix" = x; then
38118    # As a simple fix, exclude /usr/bin since it's not a real path.
38119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38121      # a path prefixed by /cygdrive for fixpath to work.
38122      new_path="$CYGWIN_ROOT_PATH$input_path"
38123    fi
38124  fi
38125
38126  # remove trailing .exe if any
38127  new_path="${new_path/%.exe/}"
38128
38129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130
38131  # First separate the path from the arguments. This will split at the first
38132  # space.
38133  complete="$OBJCOPY"
38134  path="${complete%% *}"
38135  tmp="$complete EOL"
38136  arguments="${tmp#* }"
38137
38138  # Input might be given as Windows format, start by converting to
38139  # unix format.
38140  new_path="$path"
38141
38142  windows_path="$new_path"
38143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38144    unix_path=`$CYGPATH -u "$windows_path"`
38145    new_path="$unix_path"
38146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38148    new_path="$unix_path"
38149  fi
38150
38151
38152  # Now try to locate executable using which
38153  new_path=`$WHICH "$new_path" 2> /dev/null`
38154
38155  if test "x$new_path" = x; then
38156    # Oops. Which didn't find the executable.
38157    # The splitting of arguments from the executable at a space might have been incorrect,
38158    # since paths with space are more likely in Windows. Give it another try with the whole
38159    # argument.
38160    path="$complete"
38161    arguments="EOL"
38162    new_path="$path"
38163
38164  windows_path="$new_path"
38165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38166    unix_path=`$CYGPATH -u "$windows_path"`
38167    new_path="$unix_path"
38168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38170    new_path="$unix_path"
38171  fi
38172
38173
38174    new_path=`$WHICH "$new_path" 2> /dev/null`
38175    # bat and cmd files are not always considered executable in MSYS causing which
38176    # to not find them
38177    if test "x$new_path" = x \
38178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38180      new_path="$path"
38181
38182  windows_path="$new_path"
38183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38184    unix_path=`$CYGPATH -u "$windows_path"`
38185    new_path="$unix_path"
38186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38188    new_path="$unix_path"
38189  fi
38190
38191    fi
38192
38193    if test "x$new_path" = x; then
38194      # It's still not found. Now this is an unrecoverable error.
38195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38196$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38197      has_space=`$ECHO "$complete" | $GREP " "`
38198      if test "x$has_space" != x; then
38199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38201      fi
38202      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38203    fi
38204  fi
38205
38206  # Now new_path has a complete unix path to the binary
38207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38208    # Keep paths in /bin as-is, but remove trailing .exe if any
38209    new_path="${new_path/%.exe/}"
38210    # Do not save /bin paths to all_fixpath_prefixes!
38211  else
38212    # Not in mixed or Windows style, start by that.
38213    new_path=`cmd //c echo $new_path`
38214
38215  input_path="$new_path"
38216  # Check if we need to convert this using DOS-style short mode. If the path
38217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38218  # take no chances and rewrite it.
38219  # Note: m4 eats our [], so we need to use [ and ] instead.
38220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38221  if test "x$has_forbidden_chars" != x; then
38222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38224  fi
38225
38226    # Output is in $new_path
38227
38228  windows_path="$new_path"
38229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38230    unix_path=`$CYGPATH -u "$windows_path"`
38231    new_path="$unix_path"
38232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38234    new_path="$unix_path"
38235  fi
38236
38237    # remove trailing .exe if any
38238    new_path="${new_path/%.exe/}"
38239
38240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38242  fi
38243
38244    else
38245      # We're on a unix platform. Hooray! :)
38246      # First separate the path from the arguments. This will split at the first
38247      # space.
38248      complete="$OBJCOPY"
38249      path="${complete%% *}"
38250      tmp="$complete EOL"
38251      arguments="${tmp#* }"
38252
38253      # Cannot rely on the command "which" here since it doesn't always work.
38254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38255      if test -z "$is_absolute_path"; then
38256        # Path to executable is not absolute. Find it.
38257        IFS_save="$IFS"
38258        IFS=:
38259        for p in $PATH; do
38260          if test -f "$p/$path" && test -x "$p/$path"; then
38261            new_path="$p/$path"
38262            break
38263          fi
38264        done
38265        IFS="$IFS_save"
38266      else
38267        # This is an absolute path, we can use it without further modifications.
38268        new_path="$path"
38269      fi
38270
38271      if test "x$new_path" = x; then
38272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38273$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38274        has_space=`$ECHO "$complete" | $GREP " "`
38275        if test "x$has_space" != x; then
38276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38278        fi
38279        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38280      fi
38281    fi
38282
38283    # Now join together the path and the arguments once again
38284    if test "x$arguments" != xEOL; then
38285      new_complete="$new_path ${arguments% *}"
38286    else
38287      new_complete="$new_path"
38288    fi
38289
38290    if test "x$complete" != "x$new_complete"; then
38291      OBJCOPY="$new_complete"
38292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38293$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38294    fi
38295  fi
38296
38297    fi
38298  fi
38299
38300
38301
38302  # Publish this variable in the help.
38303
38304
38305  if test "x$OBJDUMP" = x; then
38306    # The variable is not set by user, try to locate tool using the code snippet
38307    if test -n "$ac_tool_prefix"; then
38308  for ac_prog in gobjdump objdump
38309  do
38310    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38311set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38313$as_echo_n "checking for $ac_word... " >&6; }
38314if ${ac_cv_prog_OBJDUMP+:} false; then :
38315  $as_echo_n "(cached) " >&6
38316else
38317  if test -n "$OBJDUMP"; then
38318  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38319else
38320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38321for as_dir in $PATH
38322do
38323  IFS=$as_save_IFS
38324  test -z "$as_dir" && as_dir=.
38325    for ac_exec_ext in '' $ac_executable_extensions; do
38326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38327    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38329    break 2
38330  fi
38331done
38332  done
38333IFS=$as_save_IFS
38334
38335fi
38336fi
38337OBJDUMP=$ac_cv_prog_OBJDUMP
38338if test -n "$OBJDUMP"; then
38339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38340$as_echo "$OBJDUMP" >&6; }
38341else
38342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38343$as_echo "no" >&6; }
38344fi
38345
38346
38347    test -n "$OBJDUMP" && break
38348  done
38349fi
38350if test -z "$OBJDUMP"; then
38351  ac_ct_OBJDUMP=$OBJDUMP
38352  for ac_prog in gobjdump objdump
38353do
38354  # Extract the first word of "$ac_prog", so it can be a program name with args.
38355set dummy $ac_prog; ac_word=$2
38356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38357$as_echo_n "checking for $ac_word... " >&6; }
38358if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38359  $as_echo_n "(cached) " >&6
38360else
38361  if test -n "$ac_ct_OBJDUMP"; then
38362  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38363else
38364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38365for as_dir in $PATH
38366do
38367  IFS=$as_save_IFS
38368  test -z "$as_dir" && as_dir=.
38369    for ac_exec_ext in '' $ac_executable_extensions; do
38370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38371    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38373    break 2
38374  fi
38375done
38376  done
38377IFS=$as_save_IFS
38378
38379fi
38380fi
38381ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38382if test -n "$ac_ct_OBJDUMP"; then
38383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38384$as_echo "$ac_ct_OBJDUMP" >&6; }
38385else
38386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38387$as_echo "no" >&6; }
38388fi
38389
38390
38391  test -n "$ac_ct_OBJDUMP" && break
38392done
38393
38394  if test "x$ac_ct_OBJDUMP" = x; then
38395    OBJDUMP=""
38396  else
38397    case $cross_compiling:$ac_tool_warned in
38398yes:)
38399{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38400$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38401ac_tool_warned=yes ;;
38402esac
38403    OBJDUMP=$ac_ct_OBJDUMP
38404  fi
38405fi
38406
38407  else
38408    # The variable is set, but is it from the command line or the environment?
38409
38410    # Try to remove the string !OBJDUMP! from our list.
38411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38413      # If it failed, the variable was not from the command line. Ignore it,
38414      # but warn the user (except for BASH, which is always set by the calling BASH).
38415      if test "xOBJDUMP" != xBASH; then
38416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38417$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38418      fi
38419      # Try to locate tool using the code snippet
38420      if test -n "$ac_tool_prefix"; then
38421  for ac_prog in gobjdump objdump
38422  do
38423    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38424set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38426$as_echo_n "checking for $ac_word... " >&6; }
38427if ${ac_cv_prog_OBJDUMP+:} false; then :
38428  $as_echo_n "(cached) " >&6
38429else
38430  if test -n "$OBJDUMP"; then
38431  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38432else
38433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38434for as_dir in $PATH
38435do
38436  IFS=$as_save_IFS
38437  test -z "$as_dir" && as_dir=.
38438    for ac_exec_ext in '' $ac_executable_extensions; do
38439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38440    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38442    break 2
38443  fi
38444done
38445  done
38446IFS=$as_save_IFS
38447
38448fi
38449fi
38450OBJDUMP=$ac_cv_prog_OBJDUMP
38451if test -n "$OBJDUMP"; then
38452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38453$as_echo "$OBJDUMP" >&6; }
38454else
38455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38456$as_echo "no" >&6; }
38457fi
38458
38459
38460    test -n "$OBJDUMP" && break
38461  done
38462fi
38463if test -z "$OBJDUMP"; then
38464  ac_ct_OBJDUMP=$OBJDUMP
38465  for ac_prog in gobjdump objdump
38466do
38467  # Extract the first word of "$ac_prog", so it can be a program name with args.
38468set dummy $ac_prog; ac_word=$2
38469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38470$as_echo_n "checking for $ac_word... " >&6; }
38471if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38472  $as_echo_n "(cached) " >&6
38473else
38474  if test -n "$ac_ct_OBJDUMP"; then
38475  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38476else
38477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38478for as_dir in $PATH
38479do
38480  IFS=$as_save_IFS
38481  test -z "$as_dir" && as_dir=.
38482    for ac_exec_ext in '' $ac_executable_extensions; do
38483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38484    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38486    break 2
38487  fi
38488done
38489  done
38490IFS=$as_save_IFS
38491
38492fi
38493fi
38494ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38495if test -n "$ac_ct_OBJDUMP"; then
38496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38497$as_echo "$ac_ct_OBJDUMP" >&6; }
38498else
38499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38500$as_echo "no" >&6; }
38501fi
38502
38503
38504  test -n "$ac_ct_OBJDUMP" && break
38505done
38506
38507  if test "x$ac_ct_OBJDUMP" = x; then
38508    OBJDUMP=""
38509  else
38510    case $cross_compiling:$ac_tool_warned in
38511yes:)
38512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38514ac_tool_warned=yes ;;
38515esac
38516    OBJDUMP=$ac_ct_OBJDUMP
38517  fi
38518fi
38519
38520    else
38521      # If it succeeded, then it was overridden by the user. We will use it
38522      # for the tool.
38523
38524      # First remove it from the list of overridden variables, so we can test
38525      # for unknown variables in the end.
38526      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38527
38528      # Check if the provided tool contains a complete path.
38529      tool_specified="$OBJDUMP"
38530      tool_basename="${tool_specified##*/}"
38531      if test "x$tool_basename" = "x$tool_specified"; then
38532        # A command without a complete path is provided, search $PATH.
38533        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38534$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38535        # Extract the first word of "$tool_basename", so it can be a program name with args.
38536set dummy $tool_basename; ac_word=$2
38537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38538$as_echo_n "checking for $ac_word... " >&6; }
38539if ${ac_cv_path_OBJDUMP+:} false; then :
38540  $as_echo_n "(cached) " >&6
38541else
38542  case $OBJDUMP in
38543  [\\/]* | ?:[\\/]*)
38544  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38545  ;;
38546  *)
38547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38548for as_dir in $PATH
38549do
38550  IFS=$as_save_IFS
38551  test -z "$as_dir" && as_dir=.
38552    for ac_exec_ext in '' $ac_executable_extensions; do
38553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38554    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38556    break 2
38557  fi
38558done
38559  done
38560IFS=$as_save_IFS
38561
38562  ;;
38563esac
38564fi
38565OBJDUMP=$ac_cv_path_OBJDUMP
38566if test -n "$OBJDUMP"; then
38567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38568$as_echo "$OBJDUMP" >&6; }
38569else
38570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38571$as_echo "no" >&6; }
38572fi
38573
38574
38575        if test "x$OBJDUMP" = x; then
38576          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38577        fi
38578      else
38579        # Otherwise we believe it is a complete path. Use it as it is.
38580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38581$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38583$as_echo_n "checking for OBJDUMP... " >&6; }
38584        if test ! -x "$tool_specified"; then
38585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38586$as_echo "not found" >&6; }
38587          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38588        fi
38589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38590$as_echo "$tool_specified" >&6; }
38591      fi
38592    fi
38593  fi
38594
38595
38596  if test "x$OBJDUMP" != x; then
38597    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38598    # bails if argument is missing.
38599
38600  # Only process if variable expands to non-empty
38601
38602  if test "x$OBJDUMP" != x; then
38603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38604
38605  # First separate the path from the arguments. This will split at the first
38606  # space.
38607  complete="$OBJDUMP"
38608  path="${complete%% *}"
38609  tmp="$complete EOL"
38610  arguments="${tmp#* }"
38611
38612  # Input might be given as Windows format, start by converting to
38613  # unix format.
38614  new_path=`$CYGPATH -u "$path"`
38615
38616  # Now try to locate executable using which
38617  new_path=`$WHICH "$new_path" 2> /dev/null`
38618  # bat and cmd files are not always considered executable in cygwin causing which
38619  # to not find them
38620  if test "x$new_path" = x \
38621      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38622      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38623    new_path=`$CYGPATH -u "$path"`
38624  fi
38625  if test "x$new_path" = x; then
38626    # Oops. Which didn't find the executable.
38627    # The splitting of arguments from the executable at a space might have been incorrect,
38628    # since paths with space are more likely in Windows. Give it another try with the whole
38629    # argument.
38630    path="$complete"
38631    arguments="EOL"
38632    new_path=`$CYGPATH -u "$path"`
38633    new_path=`$WHICH "$new_path" 2> /dev/null`
38634    # bat and cmd files are not always considered executable in cygwin causing which
38635    # to not find them
38636    if test "x$new_path" = x \
38637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38639      new_path=`$CYGPATH -u "$path"`
38640    fi
38641    if test "x$new_path" = x; then
38642      # It's still not found. Now this is an unrecoverable error.
38643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38644$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38645      has_space=`$ECHO "$complete" | $GREP " "`
38646      if test "x$has_space" != x; then
38647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38649      fi
38650      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38651    fi
38652  fi
38653
38654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38657  # "foo.exe" is OK but "foo" is an error.
38658  #
38659  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38660  # It is also a way to make sure we got the proper file name for the real test later on.
38661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38662  if test "x$test_shortpath" = x; then
38663    # Short path failed, file does not exist as specified.
38664    # Try adding .exe or .cmd
38665    if test -f "${new_path}.exe"; then
38666      input_to_shortpath="${new_path}.exe"
38667    elif test -f "${new_path}.cmd"; then
38668      input_to_shortpath="${new_path}.cmd"
38669    else
38670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38671$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38674      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38675    fi
38676  else
38677    input_to_shortpath="$new_path"
38678  fi
38679
38680  # Call helper function which possibly converts this using DOS-style short mode.
38681  # If so, the updated path is stored in $new_path.
38682  new_path="$input_to_shortpath"
38683
38684  input_path="$input_to_shortpath"
38685  # Check if we need to convert this using DOS-style short mode. If the path
38686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38687  # take no chances and rewrite it.
38688  # Note: m4 eats our [], so we need to use [ and ] instead.
38689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38690  if test "x$has_forbidden_chars" != x; then
38691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38695      # Going to short mode and back again did indeed matter. Since short mode is
38696      # case insensitive, let's make it lowercase to improve readability.
38697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38698      # Now convert it back to Unix-style (cygpath)
38699      input_path=`$CYGPATH -u "$shortmode_path"`
38700      new_path="$input_path"
38701    fi
38702  fi
38703
38704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38705  if test "x$test_cygdrive_prefix" = x; then
38706    # As a simple fix, exclude /usr/bin since it's not a real path.
38707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38709      # a path prefixed by /cygdrive for fixpath to work.
38710      new_path="$CYGWIN_ROOT_PATH$input_path"
38711    fi
38712  fi
38713
38714  # remove trailing .exe if any
38715  new_path="${new_path/%.exe/}"
38716
38717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38718
38719  # First separate the path from the arguments. This will split at the first
38720  # space.
38721  complete="$OBJDUMP"
38722  path="${complete%% *}"
38723  tmp="$complete EOL"
38724  arguments="${tmp#* }"
38725
38726  # Input might be given as Windows format, start by converting to
38727  # unix format.
38728  new_path="$path"
38729
38730  windows_path="$new_path"
38731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38732    unix_path=`$CYGPATH -u "$windows_path"`
38733    new_path="$unix_path"
38734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38736    new_path="$unix_path"
38737  fi
38738
38739
38740  # Now try to locate executable using which
38741  new_path=`$WHICH "$new_path" 2> /dev/null`
38742
38743  if test "x$new_path" = x; then
38744    # Oops. Which didn't find the executable.
38745    # The splitting of arguments from the executable at a space might have been incorrect,
38746    # since paths with space are more likely in Windows. Give it another try with the whole
38747    # argument.
38748    path="$complete"
38749    arguments="EOL"
38750    new_path="$path"
38751
38752  windows_path="$new_path"
38753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38754    unix_path=`$CYGPATH -u "$windows_path"`
38755    new_path="$unix_path"
38756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38758    new_path="$unix_path"
38759  fi
38760
38761
38762    new_path=`$WHICH "$new_path" 2> /dev/null`
38763    # bat and cmd files are not always considered executable in MSYS causing which
38764    # to not find them
38765    if test "x$new_path" = x \
38766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38768      new_path="$path"
38769
38770  windows_path="$new_path"
38771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38772    unix_path=`$CYGPATH -u "$windows_path"`
38773    new_path="$unix_path"
38774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38776    new_path="$unix_path"
38777  fi
38778
38779    fi
38780
38781    if test "x$new_path" = x; then
38782      # It's still not found. Now this is an unrecoverable error.
38783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38784$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38785      has_space=`$ECHO "$complete" | $GREP " "`
38786      if test "x$has_space" != x; then
38787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38789      fi
38790      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38791    fi
38792  fi
38793
38794  # Now new_path has a complete unix path to the binary
38795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38796    # Keep paths in /bin as-is, but remove trailing .exe if any
38797    new_path="${new_path/%.exe/}"
38798    # Do not save /bin paths to all_fixpath_prefixes!
38799  else
38800    # Not in mixed or Windows style, start by that.
38801    new_path=`cmd //c echo $new_path`
38802
38803  input_path="$new_path"
38804  # Check if we need to convert this using DOS-style short mode. If the path
38805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38806  # take no chances and rewrite it.
38807  # Note: m4 eats our [], so we need to use [ and ] instead.
38808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38809  if test "x$has_forbidden_chars" != x; then
38810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38812  fi
38813
38814    # Output is in $new_path
38815
38816  windows_path="$new_path"
38817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38818    unix_path=`$CYGPATH -u "$windows_path"`
38819    new_path="$unix_path"
38820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38822    new_path="$unix_path"
38823  fi
38824
38825    # remove trailing .exe if any
38826    new_path="${new_path/%.exe/}"
38827
38828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38830  fi
38831
38832    else
38833      # We're on a unix platform. Hooray! :)
38834      # First separate the path from the arguments. This will split at the first
38835      # space.
38836      complete="$OBJDUMP"
38837      path="${complete%% *}"
38838      tmp="$complete EOL"
38839      arguments="${tmp#* }"
38840
38841      # Cannot rely on the command "which" here since it doesn't always work.
38842      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38843      if test -z "$is_absolute_path"; then
38844        # Path to executable is not absolute. Find it.
38845        IFS_save="$IFS"
38846        IFS=:
38847        for p in $PATH; do
38848          if test -f "$p/$path" && test -x "$p/$path"; then
38849            new_path="$p/$path"
38850            break
38851          fi
38852        done
38853        IFS="$IFS_save"
38854      else
38855        # This is an absolute path, we can use it without further modifications.
38856        new_path="$path"
38857      fi
38858
38859      if test "x$new_path" = x; then
38860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38861$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38862        has_space=`$ECHO "$complete" | $GREP " "`
38863        if test "x$has_space" != x; then
38864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38866        fi
38867        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38868      fi
38869    fi
38870
38871    # Now join together the path and the arguments once again
38872    if test "x$arguments" != xEOL; then
38873      new_complete="$new_path ${arguments% *}"
38874    else
38875      new_complete="$new_path"
38876    fi
38877
38878    if test "x$complete" != "x$new_complete"; then
38879      OBJDUMP="$new_complete"
38880      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38881$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38882    fi
38883  fi
38884
38885  fi
38886
38887
38888  # Restore old path.
38889  PATH="$OLD_PATH"
38890
38891  # Restore the flags to the user specified values.
38892  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38893  CFLAGS="$ORG_CFLAGS"
38894  CXXFLAGS="$ORG_CXXFLAGS"
38895
38896
38897# Finally do some processing after the detection phase
38898
38899  if test "x$COMPILE_TYPE" = "xcross"; then
38900    # Now we need to find a C/C++ compiler that can build executables for the
38901    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38902    # used once. Also, we need to do this without adding a tools dir to the
38903    # path, otherwise we might pick up cross-compilers which don't use standard
38904    # naming.
38905
38906    # FIXME: we should list the discovered compilers as an exclude pattern!
38907    # If we do that, we can do this detection before POST_DETECTION, and still
38908    # find the build compilers in the tools dir, if needed.
38909
38910
38911  # Publish this variable in the help.
38912
38913
38914  if test "x$BUILD_CC" = x; then
38915    # The variable is not set by user, try to locate tool using the code snippet
38916    for ac_prog in cl cc gcc
38917do
38918  # Extract the first word of "$ac_prog", so it can be a program name with args.
38919set dummy $ac_prog; ac_word=$2
38920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38921$as_echo_n "checking for $ac_word... " >&6; }
38922if ${ac_cv_path_BUILD_CC+:} false; then :
38923  $as_echo_n "(cached) " >&6
38924else
38925  case $BUILD_CC in
38926  [\\/]* | ?:[\\/]*)
38927  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38928  ;;
38929  *)
38930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38931for as_dir in $PATH
38932do
38933  IFS=$as_save_IFS
38934  test -z "$as_dir" && as_dir=.
38935    for ac_exec_ext in '' $ac_executable_extensions; do
38936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38937    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38939    break 2
38940  fi
38941done
38942  done
38943IFS=$as_save_IFS
38944
38945  ;;
38946esac
38947fi
38948BUILD_CC=$ac_cv_path_BUILD_CC
38949if test -n "$BUILD_CC"; then
38950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38951$as_echo "$BUILD_CC" >&6; }
38952else
38953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38954$as_echo "no" >&6; }
38955fi
38956
38957
38958  test -n "$BUILD_CC" && break
38959done
38960
38961  else
38962    # The variable is set, but is it from the command line or the environment?
38963
38964    # Try to remove the string !BUILD_CC! from our list.
38965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38967      # If it failed, the variable was not from the command line. Ignore it,
38968      # but warn the user (except for BASH, which is always set by the calling BASH).
38969      if test "xBUILD_CC" != xBASH; then
38970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38971$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38972      fi
38973      # Try to locate tool using the code snippet
38974      for ac_prog in cl cc gcc
38975do
38976  # Extract the first word of "$ac_prog", so it can be a program name with args.
38977set dummy $ac_prog; ac_word=$2
38978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38979$as_echo_n "checking for $ac_word... " >&6; }
38980if ${ac_cv_path_BUILD_CC+:} false; then :
38981  $as_echo_n "(cached) " >&6
38982else
38983  case $BUILD_CC in
38984  [\\/]* | ?:[\\/]*)
38985  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38986  ;;
38987  *)
38988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38989for as_dir in $PATH
38990do
38991  IFS=$as_save_IFS
38992  test -z "$as_dir" && as_dir=.
38993    for ac_exec_ext in '' $ac_executable_extensions; do
38994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38995    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38997    break 2
38998  fi
38999done
39000  done
39001IFS=$as_save_IFS
39002
39003  ;;
39004esac
39005fi
39006BUILD_CC=$ac_cv_path_BUILD_CC
39007if test -n "$BUILD_CC"; then
39008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39009$as_echo "$BUILD_CC" >&6; }
39010else
39011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39012$as_echo "no" >&6; }
39013fi
39014
39015
39016  test -n "$BUILD_CC" && break
39017done
39018
39019    else
39020      # If it succeeded, then it was overridden by the user. We will use it
39021      # for the tool.
39022
39023      # First remove it from the list of overridden variables, so we can test
39024      # for unknown variables in the end.
39025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39026
39027      # Check if the provided tool contains a complete path.
39028      tool_specified="$BUILD_CC"
39029      tool_basename="${tool_specified##*/}"
39030      if test "x$tool_basename" = "x$tool_specified"; then
39031        # A command without a complete path is provided, search $PATH.
39032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39033$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39034        # Extract the first word of "$tool_basename", so it can be a program name with args.
39035set dummy $tool_basename; 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_path_BUILD_CC+:} false; then :
39039  $as_echo_n "(cached) " >&6
39040else
39041  case $BUILD_CC in
39042  [\\/]* | ?:[\\/]*)
39043  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39044  ;;
39045  *)
39046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39047for as_dir in $PATH
39048do
39049  IFS=$as_save_IFS
39050  test -z "$as_dir" && as_dir=.
39051    for ac_exec_ext in '' $ac_executable_extensions; do
39052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39053    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39055    break 2
39056  fi
39057done
39058  done
39059IFS=$as_save_IFS
39060
39061  ;;
39062esac
39063fi
39064BUILD_CC=$ac_cv_path_BUILD_CC
39065if test -n "$BUILD_CC"; then
39066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39067$as_echo "$BUILD_CC" >&6; }
39068else
39069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39070$as_echo "no" >&6; }
39071fi
39072
39073
39074        if test "x$BUILD_CC" = x; then
39075          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39076        fi
39077      else
39078        # Otherwise we believe it is a complete path. Use it as it is.
39079        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39080$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39082$as_echo_n "checking for BUILD_CC... " >&6; }
39083        if test ! -x "$tool_specified"; then
39084          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39085$as_echo "not found" >&6; }
39086          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39087        fi
39088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39089$as_echo "$tool_specified" >&6; }
39090      fi
39091    fi
39092  fi
39093
39094
39095
39096  # Only process if variable expands to non-empty
39097
39098  if test "x$BUILD_CC" != x; then
39099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39100
39101  # First separate the path from the arguments. This will split at the first
39102  # space.
39103  complete="$BUILD_CC"
39104  path="${complete%% *}"
39105  tmp="$complete EOL"
39106  arguments="${tmp#* }"
39107
39108  # Input might be given as Windows format, start by converting to
39109  # unix format.
39110  new_path=`$CYGPATH -u "$path"`
39111
39112  # Now try to locate executable using which
39113  new_path=`$WHICH "$new_path" 2> /dev/null`
39114  # bat and cmd files are not always considered executable in cygwin causing which
39115  # to not find them
39116  if test "x$new_path" = x \
39117      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39118      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39119    new_path=`$CYGPATH -u "$path"`
39120  fi
39121  if test "x$new_path" = x; then
39122    # Oops. Which didn't find the executable.
39123    # The splitting of arguments from the executable at a space might have been incorrect,
39124    # since paths with space are more likely in Windows. Give it another try with the whole
39125    # argument.
39126    path="$complete"
39127    arguments="EOL"
39128    new_path=`$CYGPATH -u "$path"`
39129    new_path=`$WHICH "$new_path" 2> /dev/null`
39130    # bat and cmd files are not always considered executable in cygwin causing which
39131    # to not find them
39132    if test "x$new_path" = x \
39133        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39134        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39135      new_path=`$CYGPATH -u "$path"`
39136    fi
39137    if test "x$new_path" = x; then
39138      # It's still not found. Now this is an unrecoverable error.
39139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39140$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39141      has_space=`$ECHO "$complete" | $GREP " "`
39142      if test "x$has_space" != x; then
39143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39145      fi
39146      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39147    fi
39148  fi
39149
39150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39153  # "foo.exe" is OK but "foo" is an error.
39154  #
39155  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39156  # It is also a way to make sure we got the proper file name for the real test later on.
39157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39158  if test "x$test_shortpath" = x; then
39159    # Short path failed, file does not exist as specified.
39160    # Try adding .exe or .cmd
39161    if test -f "${new_path}.exe"; then
39162      input_to_shortpath="${new_path}.exe"
39163    elif test -f "${new_path}.cmd"; then
39164      input_to_shortpath="${new_path}.cmd"
39165    else
39166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39167$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39170      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39171    fi
39172  else
39173    input_to_shortpath="$new_path"
39174  fi
39175
39176  # Call helper function which possibly converts this using DOS-style short mode.
39177  # If so, the updated path is stored in $new_path.
39178  new_path="$input_to_shortpath"
39179
39180  input_path="$input_to_shortpath"
39181  # Check if we need to convert this using DOS-style short mode. If the path
39182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39183  # take no chances and rewrite it.
39184  # Note: m4 eats our [], so we need to use [ and ] instead.
39185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39186  if test "x$has_forbidden_chars" != x; then
39187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39191      # Going to short mode and back again did indeed matter. Since short mode is
39192      # case insensitive, let's make it lowercase to improve readability.
39193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39194      # Now convert it back to Unix-style (cygpath)
39195      input_path=`$CYGPATH -u "$shortmode_path"`
39196      new_path="$input_path"
39197    fi
39198  fi
39199
39200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39201  if test "x$test_cygdrive_prefix" = x; then
39202    # As a simple fix, exclude /usr/bin since it's not a real path.
39203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39205      # a path prefixed by /cygdrive for fixpath to work.
39206      new_path="$CYGWIN_ROOT_PATH$input_path"
39207    fi
39208  fi
39209
39210  # remove trailing .exe if any
39211  new_path="${new_path/%.exe/}"
39212
39213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39214
39215  # First separate the path from the arguments. This will split at the first
39216  # space.
39217  complete="$BUILD_CC"
39218  path="${complete%% *}"
39219  tmp="$complete EOL"
39220  arguments="${tmp#* }"
39221
39222  # Input might be given as Windows format, start by converting to
39223  # unix format.
39224  new_path="$path"
39225
39226  windows_path="$new_path"
39227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39228    unix_path=`$CYGPATH -u "$windows_path"`
39229    new_path="$unix_path"
39230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39232    new_path="$unix_path"
39233  fi
39234
39235
39236  # Now try to locate executable using which
39237  new_path=`$WHICH "$new_path" 2> /dev/null`
39238
39239  if test "x$new_path" = x; then
39240    # Oops. Which didn't find the executable.
39241    # The splitting of arguments from the executable at a space might have been incorrect,
39242    # since paths with space are more likely in Windows. Give it another try with the whole
39243    # argument.
39244    path="$complete"
39245    arguments="EOL"
39246    new_path="$path"
39247
39248  windows_path="$new_path"
39249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39250    unix_path=`$CYGPATH -u "$windows_path"`
39251    new_path="$unix_path"
39252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39254    new_path="$unix_path"
39255  fi
39256
39257
39258    new_path=`$WHICH "$new_path" 2> /dev/null`
39259    # bat and cmd files are not always considered executable in MSYS causing which
39260    # to not find them
39261    if test "x$new_path" = x \
39262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39264      new_path="$path"
39265
39266  windows_path="$new_path"
39267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39268    unix_path=`$CYGPATH -u "$windows_path"`
39269    new_path="$unix_path"
39270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39272    new_path="$unix_path"
39273  fi
39274
39275    fi
39276
39277    if test "x$new_path" = x; then
39278      # It's still not found. Now this is an unrecoverable error.
39279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39280$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39281      has_space=`$ECHO "$complete" | $GREP " "`
39282      if test "x$has_space" != x; then
39283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39285      fi
39286      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39287    fi
39288  fi
39289
39290  # Now new_path has a complete unix path to the binary
39291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39292    # Keep paths in /bin as-is, but remove trailing .exe if any
39293    new_path="${new_path/%.exe/}"
39294    # Do not save /bin paths to all_fixpath_prefixes!
39295  else
39296    # Not in mixed or Windows style, start by that.
39297    new_path=`cmd //c echo $new_path`
39298
39299  input_path="$new_path"
39300  # Check if we need to convert this using DOS-style short mode. If the path
39301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39302  # take no chances and rewrite it.
39303  # Note: m4 eats our [], so we need to use [ and ] instead.
39304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39305  if test "x$has_forbidden_chars" != x; then
39306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39308  fi
39309
39310    # Output is in $new_path
39311
39312  windows_path="$new_path"
39313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39314    unix_path=`$CYGPATH -u "$windows_path"`
39315    new_path="$unix_path"
39316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39318    new_path="$unix_path"
39319  fi
39320
39321    # remove trailing .exe if any
39322    new_path="${new_path/%.exe/}"
39323
39324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39326  fi
39327
39328    else
39329      # We're on a unix platform. Hooray! :)
39330      # First separate the path from the arguments. This will split at the first
39331      # space.
39332      complete="$BUILD_CC"
39333      path="${complete%% *}"
39334      tmp="$complete EOL"
39335      arguments="${tmp#* }"
39336
39337      # Cannot rely on the command "which" here since it doesn't always work.
39338      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39339      if test -z "$is_absolute_path"; then
39340        # Path to executable is not absolute. Find it.
39341        IFS_save="$IFS"
39342        IFS=:
39343        for p in $PATH; do
39344          if test -f "$p/$path" && test -x "$p/$path"; then
39345            new_path="$p/$path"
39346            break
39347          fi
39348        done
39349        IFS="$IFS_save"
39350      else
39351        # This is an absolute path, we can use it without further modifications.
39352        new_path="$path"
39353      fi
39354
39355      if test "x$new_path" = x; then
39356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39357$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39358        has_space=`$ECHO "$complete" | $GREP " "`
39359        if test "x$has_space" != x; then
39360          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39361$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39362        fi
39363        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39364      fi
39365    fi
39366
39367    # Now join together the path and the arguments once again
39368    if test "x$arguments" != xEOL; then
39369      new_complete="$new_path ${arguments% *}"
39370    else
39371      new_complete="$new_path"
39372    fi
39373
39374    if test "x$complete" != "x$new_complete"; then
39375      BUILD_CC="$new_complete"
39376      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39377$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39378    fi
39379  fi
39380
39381
39382
39383  # Publish this variable in the help.
39384
39385
39386  if test "x$BUILD_CXX" = x; then
39387    # The variable is not set by user, try to locate tool using the code snippet
39388    for ac_prog in cl CC g++
39389do
39390  # Extract the first word of "$ac_prog", so it can be a program name with args.
39391set dummy $ac_prog; ac_word=$2
39392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39393$as_echo_n "checking for $ac_word... " >&6; }
39394if ${ac_cv_path_BUILD_CXX+:} false; then :
39395  $as_echo_n "(cached) " >&6
39396else
39397  case $BUILD_CXX in
39398  [\\/]* | ?:[\\/]*)
39399  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39400  ;;
39401  *)
39402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39403for as_dir in $PATH
39404do
39405  IFS=$as_save_IFS
39406  test -z "$as_dir" && as_dir=.
39407    for ac_exec_ext in '' $ac_executable_extensions; do
39408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39409    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39411    break 2
39412  fi
39413done
39414  done
39415IFS=$as_save_IFS
39416
39417  ;;
39418esac
39419fi
39420BUILD_CXX=$ac_cv_path_BUILD_CXX
39421if test -n "$BUILD_CXX"; then
39422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39423$as_echo "$BUILD_CXX" >&6; }
39424else
39425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39426$as_echo "no" >&6; }
39427fi
39428
39429
39430  test -n "$BUILD_CXX" && break
39431done
39432
39433  else
39434    # The variable is set, but is it from the command line or the environment?
39435
39436    # Try to remove the string !BUILD_CXX! from our list.
39437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39439      # If it failed, the variable was not from the command line. Ignore it,
39440      # but warn the user (except for BASH, which is always set by the calling BASH).
39441      if test "xBUILD_CXX" != xBASH; then
39442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39443$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39444      fi
39445      # Try to locate tool using the code snippet
39446      for ac_prog in cl CC g++
39447do
39448  # Extract the first word of "$ac_prog", so it can be a program name with args.
39449set dummy $ac_prog; ac_word=$2
39450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39451$as_echo_n "checking for $ac_word... " >&6; }
39452if ${ac_cv_path_BUILD_CXX+:} false; then :
39453  $as_echo_n "(cached) " >&6
39454else
39455  case $BUILD_CXX in
39456  [\\/]* | ?:[\\/]*)
39457  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39458  ;;
39459  *)
39460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39461for as_dir in $PATH
39462do
39463  IFS=$as_save_IFS
39464  test -z "$as_dir" && as_dir=.
39465    for ac_exec_ext in '' $ac_executable_extensions; do
39466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39467    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39469    break 2
39470  fi
39471done
39472  done
39473IFS=$as_save_IFS
39474
39475  ;;
39476esac
39477fi
39478BUILD_CXX=$ac_cv_path_BUILD_CXX
39479if test -n "$BUILD_CXX"; then
39480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39481$as_echo "$BUILD_CXX" >&6; }
39482else
39483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39484$as_echo "no" >&6; }
39485fi
39486
39487
39488  test -n "$BUILD_CXX" && break
39489done
39490
39491    else
39492      # If it succeeded, then it was overridden by the user. We will use it
39493      # for the tool.
39494
39495      # First remove it from the list of overridden variables, so we can test
39496      # for unknown variables in the end.
39497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39498
39499      # Check if the provided tool contains a complete path.
39500      tool_specified="$BUILD_CXX"
39501      tool_basename="${tool_specified##*/}"
39502      if test "x$tool_basename" = "x$tool_specified"; then
39503        # A command without a complete path is provided, search $PATH.
39504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39505$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39506        # Extract the first word of "$tool_basename", so it can be a program name with args.
39507set dummy $tool_basename; ac_word=$2
39508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39509$as_echo_n "checking for $ac_word... " >&6; }
39510if ${ac_cv_path_BUILD_CXX+:} false; then :
39511  $as_echo_n "(cached) " >&6
39512else
39513  case $BUILD_CXX in
39514  [\\/]* | ?:[\\/]*)
39515  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39516  ;;
39517  *)
39518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39519for as_dir in $PATH
39520do
39521  IFS=$as_save_IFS
39522  test -z "$as_dir" && as_dir=.
39523    for ac_exec_ext in '' $ac_executable_extensions; do
39524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39525    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39527    break 2
39528  fi
39529done
39530  done
39531IFS=$as_save_IFS
39532
39533  ;;
39534esac
39535fi
39536BUILD_CXX=$ac_cv_path_BUILD_CXX
39537if test -n "$BUILD_CXX"; then
39538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39539$as_echo "$BUILD_CXX" >&6; }
39540else
39541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39542$as_echo "no" >&6; }
39543fi
39544
39545
39546        if test "x$BUILD_CXX" = x; then
39547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39548        fi
39549      else
39550        # Otherwise we believe it is a complete path. Use it as it is.
39551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39552$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39554$as_echo_n "checking for BUILD_CXX... " >&6; }
39555        if test ! -x "$tool_specified"; then
39556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39557$as_echo "not found" >&6; }
39558          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39559        fi
39560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39561$as_echo "$tool_specified" >&6; }
39562      fi
39563    fi
39564  fi
39565
39566
39567
39568  # Only process if variable expands to non-empty
39569
39570  if test "x$BUILD_CXX" != x; then
39571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39572
39573  # First separate the path from the arguments. This will split at the first
39574  # space.
39575  complete="$BUILD_CXX"
39576  path="${complete%% *}"
39577  tmp="$complete EOL"
39578  arguments="${tmp#* }"
39579
39580  # Input might be given as Windows format, start by converting to
39581  # unix format.
39582  new_path=`$CYGPATH -u "$path"`
39583
39584  # Now try to locate executable using which
39585  new_path=`$WHICH "$new_path" 2> /dev/null`
39586  # bat and cmd files are not always considered executable in cygwin causing which
39587  # to not find them
39588  if test "x$new_path" = x \
39589      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39590      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39591    new_path=`$CYGPATH -u "$path"`
39592  fi
39593  if test "x$new_path" = x; then
39594    # Oops. Which didn't find the executable.
39595    # The splitting of arguments from the executable at a space might have been incorrect,
39596    # since paths with space are more likely in Windows. Give it another try with the whole
39597    # argument.
39598    path="$complete"
39599    arguments="EOL"
39600    new_path=`$CYGPATH -u "$path"`
39601    new_path=`$WHICH "$new_path" 2> /dev/null`
39602    # bat and cmd files are not always considered executable in cygwin causing which
39603    # to not find them
39604    if test "x$new_path" = x \
39605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39607      new_path=`$CYGPATH -u "$path"`
39608    fi
39609    if test "x$new_path" = x; then
39610      # It's still not found. Now this is an unrecoverable error.
39611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39612$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39613      has_space=`$ECHO "$complete" | $GREP " "`
39614      if test "x$has_space" != x; then
39615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39617      fi
39618      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39619    fi
39620  fi
39621
39622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39625  # "foo.exe" is OK but "foo" is an error.
39626  #
39627  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39628  # It is also a way to make sure we got the proper file name for the real test later on.
39629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39630  if test "x$test_shortpath" = x; then
39631    # Short path failed, file does not exist as specified.
39632    # Try adding .exe or .cmd
39633    if test -f "${new_path}.exe"; then
39634      input_to_shortpath="${new_path}.exe"
39635    elif test -f "${new_path}.cmd"; then
39636      input_to_shortpath="${new_path}.cmd"
39637    else
39638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39639$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39642      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39643    fi
39644  else
39645    input_to_shortpath="$new_path"
39646  fi
39647
39648  # Call helper function which possibly converts this using DOS-style short mode.
39649  # If so, the updated path is stored in $new_path.
39650  new_path="$input_to_shortpath"
39651
39652  input_path="$input_to_shortpath"
39653  # Check if we need to convert this using DOS-style short mode. If the path
39654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39655  # take no chances and rewrite it.
39656  # Note: m4 eats our [], so we need to use [ and ] instead.
39657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39658  if test "x$has_forbidden_chars" != x; then
39659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39663      # Going to short mode and back again did indeed matter. Since short mode is
39664      # case insensitive, let's make it lowercase to improve readability.
39665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39666      # Now convert it back to Unix-style (cygpath)
39667      input_path=`$CYGPATH -u "$shortmode_path"`
39668      new_path="$input_path"
39669    fi
39670  fi
39671
39672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39673  if test "x$test_cygdrive_prefix" = x; then
39674    # As a simple fix, exclude /usr/bin since it's not a real path.
39675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39677      # a path prefixed by /cygdrive for fixpath to work.
39678      new_path="$CYGWIN_ROOT_PATH$input_path"
39679    fi
39680  fi
39681
39682  # remove trailing .exe if any
39683  new_path="${new_path/%.exe/}"
39684
39685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39686
39687  # First separate the path from the arguments. This will split at the first
39688  # space.
39689  complete="$BUILD_CXX"
39690  path="${complete%% *}"
39691  tmp="$complete EOL"
39692  arguments="${tmp#* }"
39693
39694  # Input might be given as Windows format, start by converting to
39695  # unix format.
39696  new_path="$path"
39697
39698  windows_path="$new_path"
39699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39700    unix_path=`$CYGPATH -u "$windows_path"`
39701    new_path="$unix_path"
39702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39704    new_path="$unix_path"
39705  fi
39706
39707
39708  # Now try to locate executable using which
39709  new_path=`$WHICH "$new_path" 2> /dev/null`
39710
39711  if test "x$new_path" = x; then
39712    # Oops. Which didn't find the executable.
39713    # The splitting of arguments from the executable at a space might have been incorrect,
39714    # since paths with space are more likely in Windows. Give it another try with the whole
39715    # argument.
39716    path="$complete"
39717    arguments="EOL"
39718    new_path="$path"
39719
39720  windows_path="$new_path"
39721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39722    unix_path=`$CYGPATH -u "$windows_path"`
39723    new_path="$unix_path"
39724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39726    new_path="$unix_path"
39727  fi
39728
39729
39730    new_path=`$WHICH "$new_path" 2> /dev/null`
39731    # bat and cmd files are not always considered executable in MSYS causing which
39732    # to not find them
39733    if test "x$new_path" = x \
39734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39736      new_path="$path"
39737
39738  windows_path="$new_path"
39739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39740    unix_path=`$CYGPATH -u "$windows_path"`
39741    new_path="$unix_path"
39742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39744    new_path="$unix_path"
39745  fi
39746
39747    fi
39748
39749    if test "x$new_path" = x; then
39750      # It's still not found. Now this is an unrecoverable error.
39751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39752$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39753      has_space=`$ECHO "$complete" | $GREP " "`
39754      if test "x$has_space" != x; then
39755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39757      fi
39758      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39759    fi
39760  fi
39761
39762  # Now new_path has a complete unix path to the binary
39763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39764    # Keep paths in /bin as-is, but remove trailing .exe if any
39765    new_path="${new_path/%.exe/}"
39766    # Do not save /bin paths to all_fixpath_prefixes!
39767  else
39768    # Not in mixed or Windows style, start by that.
39769    new_path=`cmd //c echo $new_path`
39770
39771  input_path="$new_path"
39772  # Check if we need to convert this using DOS-style short mode. If the path
39773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39774  # take no chances and rewrite it.
39775  # Note: m4 eats our [], so we need to use [ and ] instead.
39776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39777  if test "x$has_forbidden_chars" != x; then
39778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39780  fi
39781
39782    # Output is in $new_path
39783
39784  windows_path="$new_path"
39785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39786    unix_path=`$CYGPATH -u "$windows_path"`
39787    new_path="$unix_path"
39788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39790    new_path="$unix_path"
39791  fi
39792
39793    # remove trailing .exe if any
39794    new_path="${new_path/%.exe/}"
39795
39796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39798  fi
39799
39800    else
39801      # We're on a unix platform. Hooray! :)
39802      # First separate the path from the arguments. This will split at the first
39803      # space.
39804      complete="$BUILD_CXX"
39805      path="${complete%% *}"
39806      tmp="$complete EOL"
39807      arguments="${tmp#* }"
39808
39809      # Cannot rely on the command "which" here since it doesn't always work.
39810      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39811      if test -z "$is_absolute_path"; then
39812        # Path to executable is not absolute. Find it.
39813        IFS_save="$IFS"
39814        IFS=:
39815        for p in $PATH; do
39816          if test -f "$p/$path" && test -x "$p/$path"; then
39817            new_path="$p/$path"
39818            break
39819          fi
39820        done
39821        IFS="$IFS_save"
39822      else
39823        # This is an absolute path, we can use it without further modifications.
39824        new_path="$path"
39825      fi
39826
39827      if test "x$new_path" = x; then
39828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39829$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39830        has_space=`$ECHO "$complete" | $GREP " "`
39831        if test "x$has_space" != x; then
39832          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39834        fi
39835        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39836      fi
39837    fi
39838
39839    # Now join together the path and the arguments once again
39840    if test "x$arguments" != xEOL; then
39841      new_complete="$new_path ${arguments% *}"
39842    else
39843      new_complete="$new_path"
39844    fi
39845
39846    if test "x$complete" != "x$new_complete"; then
39847      BUILD_CXX="$new_complete"
39848      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39849$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39850    fi
39851  fi
39852
39853
39854
39855  # Publish this variable in the help.
39856
39857
39858  if test "x$BUILD_LD" = x; then
39859    # The variable is not set by user, try to locate tool using the code snippet
39860    for ac_prog in ld
39861do
39862  # Extract the first word of "$ac_prog", so it can be a program name with args.
39863set dummy $ac_prog; ac_word=$2
39864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39865$as_echo_n "checking for $ac_word... " >&6; }
39866if ${ac_cv_path_BUILD_LD+:} false; then :
39867  $as_echo_n "(cached) " >&6
39868else
39869  case $BUILD_LD in
39870  [\\/]* | ?:[\\/]*)
39871  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39872  ;;
39873  *)
39874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39875for as_dir in $PATH
39876do
39877  IFS=$as_save_IFS
39878  test -z "$as_dir" && as_dir=.
39879    for ac_exec_ext in '' $ac_executable_extensions; do
39880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39881    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39883    break 2
39884  fi
39885done
39886  done
39887IFS=$as_save_IFS
39888
39889  ;;
39890esac
39891fi
39892BUILD_LD=$ac_cv_path_BUILD_LD
39893if test -n "$BUILD_LD"; then
39894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39895$as_echo "$BUILD_LD" >&6; }
39896else
39897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39898$as_echo "no" >&6; }
39899fi
39900
39901
39902  test -n "$BUILD_LD" && break
39903done
39904
39905  else
39906    # The variable is set, but is it from the command line or the environment?
39907
39908    # Try to remove the string !BUILD_LD! from our list.
39909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39911      # If it failed, the variable was not from the command line. Ignore it,
39912      # but warn the user (except for BASH, which is always set by the calling BASH).
39913      if test "xBUILD_LD" != xBASH; then
39914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39915$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39916      fi
39917      # Try to locate tool using the code snippet
39918      for ac_prog in ld
39919do
39920  # Extract the first word of "$ac_prog", so it can be a program name with args.
39921set dummy $ac_prog; ac_word=$2
39922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39923$as_echo_n "checking for $ac_word... " >&6; }
39924if ${ac_cv_path_BUILD_LD+:} false; then :
39925  $as_echo_n "(cached) " >&6
39926else
39927  case $BUILD_LD in
39928  [\\/]* | ?:[\\/]*)
39929  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39930  ;;
39931  *)
39932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39933for as_dir in $PATH
39934do
39935  IFS=$as_save_IFS
39936  test -z "$as_dir" && as_dir=.
39937    for ac_exec_ext in '' $ac_executable_extensions; do
39938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39939    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39941    break 2
39942  fi
39943done
39944  done
39945IFS=$as_save_IFS
39946
39947  ;;
39948esac
39949fi
39950BUILD_LD=$ac_cv_path_BUILD_LD
39951if test -n "$BUILD_LD"; then
39952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39953$as_echo "$BUILD_LD" >&6; }
39954else
39955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39956$as_echo "no" >&6; }
39957fi
39958
39959
39960  test -n "$BUILD_LD" && break
39961done
39962
39963    else
39964      # If it succeeded, then it was overridden by the user. We will use it
39965      # for the tool.
39966
39967      # First remove it from the list of overridden variables, so we can test
39968      # for unknown variables in the end.
39969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39970
39971      # Check if the provided tool contains a complete path.
39972      tool_specified="$BUILD_LD"
39973      tool_basename="${tool_specified##*/}"
39974      if test "x$tool_basename" = "x$tool_specified"; then
39975        # A command without a complete path is provided, search $PATH.
39976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39977$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39978        # Extract the first word of "$tool_basename", so it can be a program name with args.
39979set dummy $tool_basename; ac_word=$2
39980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39981$as_echo_n "checking for $ac_word... " >&6; }
39982if ${ac_cv_path_BUILD_LD+:} false; then :
39983  $as_echo_n "(cached) " >&6
39984else
39985  case $BUILD_LD in
39986  [\\/]* | ?:[\\/]*)
39987  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39988  ;;
39989  *)
39990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39991for as_dir in $PATH
39992do
39993  IFS=$as_save_IFS
39994  test -z "$as_dir" && as_dir=.
39995    for ac_exec_ext in '' $ac_executable_extensions; do
39996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39997    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39999    break 2
40000  fi
40001done
40002  done
40003IFS=$as_save_IFS
40004
40005  ;;
40006esac
40007fi
40008BUILD_LD=$ac_cv_path_BUILD_LD
40009if test -n "$BUILD_LD"; then
40010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40011$as_echo "$BUILD_LD" >&6; }
40012else
40013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40014$as_echo "no" >&6; }
40015fi
40016
40017
40018        if test "x$BUILD_LD" = x; then
40019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40020        fi
40021      else
40022        # Otherwise we believe it is a complete path. Use it as it is.
40023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40024$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40026$as_echo_n "checking for BUILD_LD... " >&6; }
40027        if test ! -x "$tool_specified"; then
40028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40029$as_echo "not found" >&6; }
40030          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40031        fi
40032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40033$as_echo "$tool_specified" >&6; }
40034      fi
40035    fi
40036  fi
40037
40038
40039
40040  # Only process if variable expands to non-empty
40041
40042  if test "x$BUILD_LD" != x; then
40043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40044
40045  # First separate the path from the arguments. This will split at the first
40046  # space.
40047  complete="$BUILD_LD"
40048  path="${complete%% *}"
40049  tmp="$complete EOL"
40050  arguments="${tmp#* }"
40051
40052  # Input might be given as Windows format, start by converting to
40053  # unix format.
40054  new_path=`$CYGPATH -u "$path"`
40055
40056  # Now try to locate executable using which
40057  new_path=`$WHICH "$new_path" 2> /dev/null`
40058  # bat and cmd files are not always considered executable in cygwin causing which
40059  # to not find them
40060  if test "x$new_path" = x \
40061      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40062      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40063    new_path=`$CYGPATH -u "$path"`
40064  fi
40065  if test "x$new_path" = x; then
40066    # Oops. Which didn't find the executable.
40067    # The splitting of arguments from the executable at a space might have been incorrect,
40068    # since paths with space are more likely in Windows. Give it another try with the whole
40069    # argument.
40070    path="$complete"
40071    arguments="EOL"
40072    new_path=`$CYGPATH -u "$path"`
40073    new_path=`$WHICH "$new_path" 2> /dev/null`
40074    # bat and cmd files are not always considered executable in cygwin causing which
40075    # to not find them
40076    if test "x$new_path" = x \
40077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40079      new_path=`$CYGPATH -u "$path"`
40080    fi
40081    if test "x$new_path" = x; then
40082      # It's still not found. Now this is an unrecoverable error.
40083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40084$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40085      has_space=`$ECHO "$complete" | $GREP " "`
40086      if test "x$has_space" != x; then
40087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40089      fi
40090      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40091    fi
40092  fi
40093
40094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40097  # "foo.exe" is OK but "foo" is an error.
40098  #
40099  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40100  # It is also a way to make sure we got the proper file name for the real test later on.
40101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40102  if test "x$test_shortpath" = x; then
40103    # Short path failed, file does not exist as specified.
40104    # Try adding .exe or .cmd
40105    if test -f "${new_path}.exe"; then
40106      input_to_shortpath="${new_path}.exe"
40107    elif test -f "${new_path}.cmd"; then
40108      input_to_shortpath="${new_path}.cmd"
40109    else
40110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40111$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40112      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40113$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40114      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40115    fi
40116  else
40117    input_to_shortpath="$new_path"
40118  fi
40119
40120  # Call helper function which possibly converts this using DOS-style short mode.
40121  # If so, the updated path is stored in $new_path.
40122  new_path="$input_to_shortpath"
40123
40124  input_path="$input_to_shortpath"
40125  # Check if we need to convert this using DOS-style short mode. If the path
40126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40127  # take no chances and rewrite it.
40128  # Note: m4 eats our [], so we need to use [ and ] instead.
40129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40130  if test "x$has_forbidden_chars" != x; then
40131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40135      # Going to short mode and back again did indeed matter. Since short mode is
40136      # case insensitive, let's make it lowercase to improve readability.
40137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40138      # Now convert it back to Unix-style (cygpath)
40139      input_path=`$CYGPATH -u "$shortmode_path"`
40140      new_path="$input_path"
40141    fi
40142  fi
40143
40144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40145  if test "x$test_cygdrive_prefix" = x; then
40146    # As a simple fix, exclude /usr/bin since it's not a real path.
40147    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40149      # a path prefixed by /cygdrive for fixpath to work.
40150      new_path="$CYGWIN_ROOT_PATH$input_path"
40151    fi
40152  fi
40153
40154  # remove trailing .exe if any
40155  new_path="${new_path/%.exe/}"
40156
40157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158
40159  # First separate the path from the arguments. This will split at the first
40160  # space.
40161  complete="$BUILD_LD"
40162  path="${complete%% *}"
40163  tmp="$complete EOL"
40164  arguments="${tmp#* }"
40165
40166  # Input might be given as Windows format, start by converting to
40167  # unix format.
40168  new_path="$path"
40169
40170  windows_path="$new_path"
40171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40172    unix_path=`$CYGPATH -u "$windows_path"`
40173    new_path="$unix_path"
40174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40176    new_path="$unix_path"
40177  fi
40178
40179
40180  # Now try to locate executable using which
40181  new_path=`$WHICH "$new_path" 2> /dev/null`
40182
40183  if test "x$new_path" = x; then
40184    # Oops. Which didn't find the executable.
40185    # The splitting of arguments from the executable at a space might have been incorrect,
40186    # since paths with space are more likely in Windows. Give it another try with the whole
40187    # argument.
40188    path="$complete"
40189    arguments="EOL"
40190    new_path="$path"
40191
40192  windows_path="$new_path"
40193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40194    unix_path=`$CYGPATH -u "$windows_path"`
40195    new_path="$unix_path"
40196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40198    new_path="$unix_path"
40199  fi
40200
40201
40202    new_path=`$WHICH "$new_path" 2> /dev/null`
40203    # bat and cmd files are not always considered executable in MSYS causing which
40204    # to not find them
40205    if test "x$new_path" = x \
40206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40208      new_path="$path"
40209
40210  windows_path="$new_path"
40211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40212    unix_path=`$CYGPATH -u "$windows_path"`
40213    new_path="$unix_path"
40214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40216    new_path="$unix_path"
40217  fi
40218
40219    fi
40220
40221    if test "x$new_path" = x; then
40222      # It's still not found. Now this is an unrecoverable error.
40223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40224$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40225      has_space=`$ECHO "$complete" | $GREP " "`
40226      if test "x$has_space" != x; then
40227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40229      fi
40230      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40231    fi
40232  fi
40233
40234  # Now new_path has a complete unix path to the binary
40235  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40236    # Keep paths in /bin as-is, but remove trailing .exe if any
40237    new_path="${new_path/%.exe/}"
40238    # Do not save /bin paths to all_fixpath_prefixes!
40239  else
40240    # Not in mixed or Windows style, start by that.
40241    new_path=`cmd //c echo $new_path`
40242
40243  input_path="$new_path"
40244  # Check if we need to convert this using DOS-style short mode. If the path
40245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40246  # take no chances and rewrite it.
40247  # Note: m4 eats our [], so we need to use [ and ] instead.
40248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40249  if test "x$has_forbidden_chars" != x; then
40250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40252  fi
40253
40254    # Output is in $new_path
40255
40256  windows_path="$new_path"
40257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40258    unix_path=`$CYGPATH -u "$windows_path"`
40259    new_path="$unix_path"
40260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40262    new_path="$unix_path"
40263  fi
40264
40265    # remove trailing .exe if any
40266    new_path="${new_path/%.exe/}"
40267
40268    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40269    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40270  fi
40271
40272    else
40273      # We're on a unix platform. Hooray! :)
40274      # First separate the path from the arguments. This will split at the first
40275      # space.
40276      complete="$BUILD_LD"
40277      path="${complete%% *}"
40278      tmp="$complete EOL"
40279      arguments="${tmp#* }"
40280
40281      # Cannot rely on the command "which" here since it doesn't always work.
40282      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40283      if test -z "$is_absolute_path"; then
40284        # Path to executable is not absolute. Find it.
40285        IFS_save="$IFS"
40286        IFS=:
40287        for p in $PATH; do
40288          if test -f "$p/$path" && test -x "$p/$path"; then
40289            new_path="$p/$path"
40290            break
40291          fi
40292        done
40293        IFS="$IFS_save"
40294      else
40295        # This is an absolute path, we can use it without further modifications.
40296        new_path="$path"
40297      fi
40298
40299      if test "x$new_path" = x; then
40300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40301$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40302        has_space=`$ECHO "$complete" | $GREP " "`
40303        if test "x$has_space" != x; then
40304          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40305$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40306        fi
40307        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40308      fi
40309    fi
40310
40311    # Now join together the path and the arguments once again
40312    if test "x$arguments" != xEOL; then
40313      new_complete="$new_path ${arguments% *}"
40314    else
40315      new_complete="$new_path"
40316    fi
40317
40318    if test "x$complete" != "x$new_complete"; then
40319      BUILD_LD="$new_complete"
40320      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40321$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40322    fi
40323  fi
40324
40325  else
40326    # If we are not cross compiling, use the normal target compilers for
40327    # building the build platform executables.
40328    BUILD_CC="$CC"
40329    BUILD_CXX="$CXX"
40330    BUILD_LD="$LD"
40331  fi
40332
40333
40334
40335
40336
40337
40338  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40339    # For hotspot, we need these in Windows mixed path,
40340    # so rewrite them all. Need added .exe suffix.
40341    HOTSPOT_CXX="$CXX.exe"
40342    HOTSPOT_LD="$LD.exe"
40343    HOTSPOT_MT="$MT.exe"
40344    HOTSPOT_RC="$RC.exe"
40345
40346  unix_path="$HOTSPOT_CXX"
40347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40348    windows_path=`$CYGPATH -m "$unix_path"`
40349    HOTSPOT_CXX="$windows_path"
40350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40351    windows_path=`cmd //c echo $unix_path`
40352    HOTSPOT_CXX="$windows_path"
40353  fi
40354
40355
40356  unix_path="$HOTSPOT_LD"
40357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40358    windows_path=`$CYGPATH -m "$unix_path"`
40359    HOTSPOT_LD="$windows_path"
40360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40361    windows_path=`cmd //c echo $unix_path`
40362    HOTSPOT_LD="$windows_path"
40363  fi
40364
40365
40366  unix_path="$HOTSPOT_MT"
40367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40368    windows_path=`$CYGPATH -m "$unix_path"`
40369    HOTSPOT_MT="$windows_path"
40370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40371    windows_path=`cmd //c echo $unix_path`
40372    HOTSPOT_MT="$windows_path"
40373  fi
40374
40375
40376  unix_path="$HOTSPOT_RC"
40377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40378    windows_path=`$CYGPATH -m "$unix_path"`
40379    HOTSPOT_RC="$windows_path"
40380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40381    windows_path=`cmd //c echo $unix_path`
40382    HOTSPOT_RC="$windows_path"
40383  fi
40384
40385
40386
40387  else
40388    HOTSPOT_CXX="$CXX"
40389    HOTSPOT_LD="$LD"
40390  fi
40391
40392
40393
40394  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40395    USE_CLANG=true
40396  fi
40397
40398
40399
40400
40401
40402  # The package path is used only on macosx?
40403  # FIXME: clean this up, and/or move it elsewhere.
40404  PACKAGE_PATH=/opt/local
40405
40406
40407  # Check for extra potential brokenness.
40408  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40409    # On Windows, double-check that we got the right compiler.
40410    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40411    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40412    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40413      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40414        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
40415      fi
40416    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40417      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40418        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40419      fi
40420    fi
40421  fi
40422
40423  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40424    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40425    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40426    # This is later checked when setting flags.
40427
40428    # "-Og" suppported for GCC 4.8 and later
40429    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40430
40431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40432$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40433  supports=yes
40434
40435  saved_cflags="$CFLAGS"
40436  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40437  ac_ext=c
40438ac_cpp='$CPP $CPPFLAGS'
40439ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40440ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40441ac_compiler_gnu=$ac_cv_c_compiler_gnu
40442
40443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40444/* end confdefs.h.  */
40445int i;
40446_ACEOF
40447if ac_fn_c_try_compile "$LINENO"; then :
40448
40449else
40450  supports=no
40451fi
40452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40453  ac_ext=cpp
40454ac_cpp='$CXXCPP $CPPFLAGS'
40455ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40456ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40457ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40458
40459  CFLAGS="$saved_cflags"
40460
40461  saved_cxxflags="$CXXFLAGS"
40462  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40463  ac_ext=cpp
40464ac_cpp='$CXXCPP $CPPFLAGS'
40465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40468
40469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40470/* end confdefs.h.  */
40471int i;
40472_ACEOF
40473if ac_fn_cxx_try_compile "$LINENO"; then :
40474
40475else
40476  supports=no
40477fi
40478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40479  ac_ext=cpp
40480ac_cpp='$CXXCPP $CPPFLAGS'
40481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40484
40485  CXXFLAGS="$saved_cxxflags"
40486
40487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40488$as_echo "$supports" >&6; }
40489  if test "x$supports" = "xyes" ; then
40490    HAS_CFLAG_OPTIMIZE_DEBUG=true
40491  else
40492    HAS_CFLAG_OPTIMIZE_DEBUG=false
40493  fi
40494
40495
40496    # "-z relro" supported in GNU binutils 2.17 and later
40497    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40498
40499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40500$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40501  supports=yes
40502
40503  saved_ldflags="$LDFLAGS"
40504  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40505  ac_ext=c
40506ac_cpp='$CPP $CPPFLAGS'
40507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40509ac_compiler_gnu=$ac_cv_c_compiler_gnu
40510
40511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40512/* end confdefs.h.  */
40513
40514int
40515main ()
40516{
40517
40518  ;
40519  return 0;
40520}
40521_ACEOF
40522if ac_fn_c_try_link "$LINENO"; then :
40523
40524else
40525  supports=no
40526fi
40527rm -f core conftest.err conftest.$ac_objext \
40528    conftest$ac_exeext conftest.$ac_ext
40529  ac_ext=cpp
40530ac_cpp='$CXXCPP $CPPFLAGS'
40531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40534
40535  LDFLAGS="$saved_ldflags"
40536
40537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40538$as_echo "$supports" >&6; }
40539  if test "x$supports" = "xyes" ; then
40540    HAS_LINKER_RELRO=true
40541  else
40542    HAS_LINKER_RELRO=false
40543  fi
40544
40545
40546    # "-z now" supported in GNU binutils 2.11 and later
40547    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40548
40549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40550$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40551  supports=yes
40552
40553  saved_ldflags="$LDFLAGS"
40554  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40555  ac_ext=c
40556ac_cpp='$CPP $CPPFLAGS'
40557ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40558ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40559ac_compiler_gnu=$ac_cv_c_compiler_gnu
40560
40561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40562/* end confdefs.h.  */
40563
40564int
40565main ()
40566{
40567
40568  ;
40569  return 0;
40570}
40571_ACEOF
40572if ac_fn_c_try_link "$LINENO"; then :
40573
40574else
40575  supports=no
40576fi
40577rm -f core conftest.err conftest.$ac_objext \
40578    conftest$ac_exeext conftest.$ac_ext
40579  ac_ext=cpp
40580ac_cpp='$CXXCPP $CPPFLAGS'
40581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40584
40585  LDFLAGS="$saved_ldflags"
40586
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40588$as_echo "$supports" >&6; }
40589  if test "x$supports" = "xyes" ; then
40590    HAS_LINKER_NOW=true
40591  else
40592    HAS_LINKER_NOW=false
40593  fi
40594
40595  fi
40596
40597  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40598  # in executable.'
40599  USING_BROKEN_SUSE_LD=no
40600  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40602$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40603    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40604    $ECHO "int main() { }" > main.c
40605    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40607$as_echo "no" >&6; }
40608      USING_BROKEN_SUSE_LD=no
40609    else
40610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40611$as_echo "yes" >&6; }
40612      USING_BROKEN_SUSE_LD=yes
40613    fi
40614    rm -rf version-script.map main.c a.out
40615  fi
40616
40617
40618
40619# Setup the JTReg Regression Test Harness.
40620
40621
40622# Check whether --with-jtreg was given.
40623if test "${with_jtreg+set}" = set; then :
40624  withval=$with_jtreg;
40625else
40626  with_jtreg=no
40627fi
40628
40629
40630  if test "x$with_jtreg" = xno; then
40631    # jtreg disabled
40632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40633$as_echo_n "checking for jtreg... " >&6; }
40634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40635$as_echo "no" >&6; }
40636  else
40637    if test "x$with_jtreg" != xyes; then
40638      # with path specified.
40639      JT_HOME="$with_jtreg"
40640    fi
40641
40642    if test "x$JT_HOME" != x; then
40643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40644$as_echo_n "checking for jtreg... " >&6; }
40645
40646      # use JT_HOME enviroment var.
40647
40648  # Only process if variable expands to non-empty
40649
40650  if test "x$JT_HOME" != x; then
40651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40652
40653  # Input might be given as Windows format, start by converting to
40654  # unix format.
40655  path="$JT_HOME"
40656  new_path=`$CYGPATH -u "$path"`
40657
40658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40661  # "foo.exe" is OK but "foo" is an error.
40662  #
40663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40664  # It is also a way to make sure we got the proper file name for the real test later on.
40665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40666  if test "x$test_shortpath" = x; then
40667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40668$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40669    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40670  fi
40671
40672  # Call helper function which possibly converts this using DOS-style short mode.
40673  # If so, the updated path is stored in $new_path.
40674
40675  input_path="$new_path"
40676  # Check if we need to convert this using DOS-style short mode. If the path
40677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40678  # take no chances and rewrite it.
40679  # Note: m4 eats our [], so we need to use [ and ] instead.
40680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40681  if test "x$has_forbidden_chars" != x; then
40682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40686      # Going to short mode and back again did indeed matter. Since short mode is
40687      # case insensitive, let's make it lowercase to improve readability.
40688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40689      # Now convert it back to Unix-style (cygpath)
40690      input_path=`$CYGPATH -u "$shortmode_path"`
40691      new_path="$input_path"
40692    fi
40693  fi
40694
40695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40696  if test "x$test_cygdrive_prefix" = x; then
40697    # As a simple fix, exclude /usr/bin since it's not a real path.
40698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40700      # a path prefixed by /cygdrive for fixpath to work.
40701      new_path="$CYGWIN_ROOT_PATH$input_path"
40702    fi
40703  fi
40704
40705
40706  if test "x$path" != "x$new_path"; then
40707    JT_HOME="$new_path"
40708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40709$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40710  fi
40711
40712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40713
40714  path="$JT_HOME"
40715  has_colon=`$ECHO $path | $GREP ^.:`
40716  new_path="$path"
40717  if test "x$has_colon" = x; then
40718    # Not in mixed or Windows style, start by that.
40719    new_path=`cmd //c echo $path`
40720  fi
40721
40722
40723  input_path="$new_path"
40724  # Check if we need to convert this using DOS-style short mode. If the path
40725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40726  # take no chances and rewrite it.
40727  # Note: m4 eats our [], so we need to use [ and ] instead.
40728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40729  if test "x$has_forbidden_chars" != x; then
40730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40732  fi
40733
40734
40735  windows_path="$new_path"
40736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40737    unix_path=`$CYGPATH -u "$windows_path"`
40738    new_path="$unix_path"
40739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40741    new_path="$unix_path"
40742  fi
40743
40744  if test "x$path" != "x$new_path"; then
40745    JT_HOME="$new_path"
40746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40747$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40748  fi
40749
40750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40752
40753    else
40754      # We're on a unix platform. Hooray! :)
40755      path="$JT_HOME"
40756      has_space=`$ECHO "$path" | $GREP " "`
40757      if test "x$has_space" != x; then
40758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40759$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40761      fi
40762
40763      # Use eval to expand a potential ~
40764      eval path="$path"
40765      if test ! -f "$path" && test ! -d "$path"; then
40766        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40767      fi
40768
40769      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40770    fi
40771  fi
40772
40773
40774      # jtreg win32 script works for everybody
40775      JTREGEXE="$JT_HOME/bin/jtreg"
40776
40777      if test ! -f "$JTREGEXE"; then
40778        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40779      fi
40780
40781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40782$as_echo "$JTREGEXE" >&6; }
40783    else
40784      # try to find jtreg on path
40785
40786
40787
40788  # Publish this variable in the help.
40789
40790
40791  if test "x$JTREGEXE" = x; then
40792    # The variable is not set by user, try to locate tool using the code snippet
40793    for ac_prog in jtreg
40794do
40795  # Extract the first word of "$ac_prog", so it can be a program name with args.
40796set dummy $ac_prog; ac_word=$2
40797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40798$as_echo_n "checking for $ac_word... " >&6; }
40799if ${ac_cv_path_JTREGEXE+:} false; then :
40800  $as_echo_n "(cached) " >&6
40801else
40802  case $JTREGEXE in
40803  [\\/]* | ?:[\\/]*)
40804  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40805  ;;
40806  *)
40807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40808for as_dir in $PATH
40809do
40810  IFS=$as_save_IFS
40811  test -z "$as_dir" && as_dir=.
40812    for ac_exec_ext in '' $ac_executable_extensions; do
40813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40814    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40816    break 2
40817  fi
40818done
40819  done
40820IFS=$as_save_IFS
40821
40822  ;;
40823esac
40824fi
40825JTREGEXE=$ac_cv_path_JTREGEXE
40826if test -n "$JTREGEXE"; then
40827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40828$as_echo "$JTREGEXE" >&6; }
40829else
40830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40831$as_echo "no" >&6; }
40832fi
40833
40834
40835  test -n "$JTREGEXE" && break
40836done
40837
40838  else
40839    # The variable is set, but is it from the command line or the environment?
40840
40841    # Try to remove the string !JTREGEXE! from our list.
40842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40844      # If it failed, the variable was not from the command line. Ignore it,
40845      # but warn the user (except for BASH, which is always set by the calling BASH).
40846      if test "xJTREGEXE" != xBASH; then
40847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40848$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40849      fi
40850      # Try to locate tool using the code snippet
40851      for ac_prog in jtreg
40852do
40853  # Extract the first word of "$ac_prog", so it can be a program name with args.
40854set dummy $ac_prog; ac_word=$2
40855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40856$as_echo_n "checking for $ac_word... " >&6; }
40857if ${ac_cv_path_JTREGEXE+:} false; then :
40858  $as_echo_n "(cached) " >&6
40859else
40860  case $JTREGEXE in
40861  [\\/]* | ?:[\\/]*)
40862  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40863  ;;
40864  *)
40865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40866for as_dir in $PATH
40867do
40868  IFS=$as_save_IFS
40869  test -z "$as_dir" && as_dir=.
40870    for ac_exec_ext in '' $ac_executable_extensions; do
40871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40872    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40874    break 2
40875  fi
40876done
40877  done
40878IFS=$as_save_IFS
40879
40880  ;;
40881esac
40882fi
40883JTREGEXE=$ac_cv_path_JTREGEXE
40884if test -n "$JTREGEXE"; then
40885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40886$as_echo "$JTREGEXE" >&6; }
40887else
40888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40889$as_echo "no" >&6; }
40890fi
40891
40892
40893  test -n "$JTREGEXE" && break
40894done
40895
40896    else
40897      # If it succeeded, then it was overridden by the user. We will use it
40898      # for the tool.
40899
40900      # First remove it from the list of overridden variables, so we can test
40901      # for unknown variables in the end.
40902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40903
40904      # Check if the provided tool contains a complete path.
40905      tool_specified="$JTREGEXE"
40906      tool_basename="${tool_specified##*/}"
40907      if test "x$tool_basename" = "x$tool_specified"; then
40908        # A command without a complete path is provided, search $PATH.
40909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40910$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40911        # Extract the first word of "$tool_basename", so it can be a program name with args.
40912set dummy $tool_basename; ac_word=$2
40913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40914$as_echo_n "checking for $ac_word... " >&6; }
40915if ${ac_cv_path_JTREGEXE+:} false; then :
40916  $as_echo_n "(cached) " >&6
40917else
40918  case $JTREGEXE in
40919  [\\/]* | ?:[\\/]*)
40920  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40921  ;;
40922  *)
40923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40924for as_dir in $PATH
40925do
40926  IFS=$as_save_IFS
40927  test -z "$as_dir" && as_dir=.
40928    for ac_exec_ext in '' $ac_executable_extensions; do
40929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40930    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40932    break 2
40933  fi
40934done
40935  done
40936IFS=$as_save_IFS
40937
40938  ;;
40939esac
40940fi
40941JTREGEXE=$ac_cv_path_JTREGEXE
40942if test -n "$JTREGEXE"; then
40943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40944$as_echo "$JTREGEXE" >&6; }
40945else
40946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40947$as_echo "no" >&6; }
40948fi
40949
40950
40951        if test "x$JTREGEXE" = x; then
40952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40953        fi
40954      else
40955        # Otherwise we believe it is a complete path. Use it as it is.
40956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40957$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40959$as_echo_n "checking for JTREGEXE... " >&6; }
40960        if test ! -x "$tool_specified"; then
40961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40962$as_echo "not found" >&6; }
40963          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40964        fi
40965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40966$as_echo "$tool_specified" >&6; }
40967      fi
40968    fi
40969  fi
40970
40971
40972
40973  if test "x$JTREGEXE" = x; then
40974    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40975  fi
40976
40977
40978      JT_HOME="`$DIRNAME $JTREGEXE`"
40979    fi
40980  fi
40981
40982
40983
40984
40985
40986
40987  # Option used to tell the compiler whether to create 32- or 64-bit executables
40988  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40989    COMPILER_TARGET_BITS_FLAG="-q"
40990  else
40991    COMPILER_TARGET_BITS_FLAG="-m"
40992  fi
40993
40994
40995  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40996  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40997    ARFLAGS="-r"
40998  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40999    ARFLAGS="-X64"
41000  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41001    # lib.exe is used as AR to create static libraries.
41002    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41003  else
41004    ARFLAGS=""
41005  fi
41006
41007
41008  ## Setup strip.
41009  # FIXME: should this really be per platform, or should it be per toolchain type?
41010  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41011  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41012  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41013    STRIPFLAGS="-g"
41014  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41015    STRIPFLAGS="-x"
41016  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41017    STRIPFLAGS="-S"
41018  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41019    STRIPFLAGS="-X32_64"
41020  fi
41021
41022  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41023    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41024  fi
41025
41026
41027  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41028    CC_OUT_OPTION=-Fo
41029    EXE_OUT_OPTION=-out:
41030    LD_OUT_OPTION=-out:
41031    AR_OUT_OPTION=-out:
41032  else
41033    # The option used to specify the target .o,.a or .so file.
41034    # When compiling, how to specify the to be created object file.
41035    CC_OUT_OPTION='-o$(SPACE)'
41036    # When linking, how to specify the to be created executable.
41037    EXE_OUT_OPTION='-o$(SPACE)'
41038    # When linking, how to specify the to be created dynamically linkable library.
41039    LD_OUT_OPTION='-o$(SPACE)'
41040    # When archiving, how to specify the to be create static archive for object files.
41041    AR_OUT_OPTION='rcs$(SPACE)'
41042  fi
41043
41044
41045
41046
41047
41048  # On Windows, we need to set RC flags.
41049  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41050    RC_FLAGS="-nologo -l0x409"
41051    if test "x$VARIANT" = xOPT; then
41052      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41053    fi
41054
41055    # The version variables used to create RC_FLAGS may be overridden
41056    # in a custom configure script, or possibly the command line.
41057    # Let those variables be expanded at make time in spec.gmk.
41058    # The \$ are escaped to the shell, and the $(...) variables
41059    # are evaluated by make.
41060    RC_FLAGS="$RC_FLAGS \
41061        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41062        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41063        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41064        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41065        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41066        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41067        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41068  fi
41069
41070
41071  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41072    # silence copyright notice and other headers.
41073    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41074  fi
41075
41076  if test "x$SYSROOT" != "x"; then
41077    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41078      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41079        # Solaris Studio does not have a concept of sysroot. Instead we must
41080        # make sure the default include and lib dirs are appended to each
41081        # compile and link command line.
41082        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41083        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41084            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41085            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41086      fi
41087    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41088      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41089      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41090      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41091    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41092      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41093      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41094    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41095      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41096      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41097    fi
41098    # Propagate the sysroot args to hotspot
41099    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41100    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41101    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41102  fi
41103
41104  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41105  # set this here so it doesn't have to be peppered throughout the forest
41106  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41107    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41108    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41109  fi
41110
41111
41112
41113
41114
41115# FIXME: Currently we must test this after toolchain but before flags. Fix!
41116
41117# Now we can test some aspects on the target using configure macros.
41118
41119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41120$as_echo_n "checking for ANSI C header files... " >&6; }
41121if ${ac_cv_header_stdc+:} false; then :
41122  $as_echo_n "(cached) " >&6
41123else
41124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41125/* end confdefs.h.  */
41126#include <stdlib.h>
41127#include <stdarg.h>
41128#include <string.h>
41129#include <float.h>
41130
41131int
41132main ()
41133{
41134
41135  ;
41136  return 0;
41137}
41138_ACEOF
41139if ac_fn_cxx_try_compile "$LINENO"; then :
41140  ac_cv_header_stdc=yes
41141else
41142  ac_cv_header_stdc=no
41143fi
41144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41145
41146if test $ac_cv_header_stdc = yes; then
41147  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41149/* end confdefs.h.  */
41150#include <string.h>
41151
41152_ACEOF
41153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41154  $EGREP "memchr" >/dev/null 2>&1; then :
41155
41156else
41157  ac_cv_header_stdc=no
41158fi
41159rm -f conftest*
41160
41161fi
41162
41163if test $ac_cv_header_stdc = yes; then
41164  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41166/* end confdefs.h.  */
41167#include <stdlib.h>
41168
41169_ACEOF
41170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41171  $EGREP "free" >/dev/null 2>&1; then :
41172
41173else
41174  ac_cv_header_stdc=no
41175fi
41176rm -f conftest*
41177
41178fi
41179
41180if test $ac_cv_header_stdc = yes; then
41181  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41182  if test "$cross_compiling" = yes; then :
41183  :
41184else
41185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41186/* end confdefs.h.  */
41187#include <ctype.h>
41188#include <stdlib.h>
41189#if ((' ' & 0x0FF) == 0x020)
41190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41192#else
41193# define ISLOWER(c) \
41194		   (('a' <= (c) && (c) <= 'i') \
41195		     || ('j' <= (c) && (c) <= 'r') \
41196		     || ('s' <= (c) && (c) <= 'z'))
41197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41198#endif
41199
41200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41201int
41202main ()
41203{
41204  int i;
41205  for (i = 0; i < 256; i++)
41206    if (XOR (islower (i), ISLOWER (i))
41207	|| toupper (i) != TOUPPER (i))
41208      return 2;
41209  return 0;
41210}
41211_ACEOF
41212if ac_fn_cxx_try_run "$LINENO"; then :
41213
41214else
41215  ac_cv_header_stdc=no
41216fi
41217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41218  conftest.$ac_objext conftest.beam conftest.$ac_ext
41219fi
41220
41221fi
41222fi
41223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41224$as_echo "$ac_cv_header_stdc" >&6; }
41225if test $ac_cv_header_stdc = yes; then
41226
41227$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41228
41229fi
41230
41231# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41232for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41233		  inttypes.h stdint.h unistd.h
41234do :
41235  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41236ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41237"
41238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41239  cat >>confdefs.h <<_ACEOF
41240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41241_ACEOF
41242
41243fi
41244
41245done
41246
41247
41248
41249  ###############################################################################
41250  #
41251  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41252  # (The JVM can use 32 or 64 bit Java pointers but that decision
41253  # is made at runtime.)
41254  #
41255
41256  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41257    # Always specify -m flag on Solaris
41258    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41259
41260  # When we add flags to the "official" CFLAGS etc, we need to
41261  # keep track of these additions in ADDED_CFLAGS etc. These
41262  # will later be checked to make sure only controlled additions
41263  # have been made to CFLAGS etc.
41264  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41265  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41266  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41267
41268  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41269  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41270  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41271
41272  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41273  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41274  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41275
41276  elif test "x$COMPILE_TYPE" = xreduced; then
41277    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41278      # Specify -m if running reduced on unix platforms
41279
41280  # When we add flags to the "official" CFLAGS etc, we need to
41281  # keep track of these additions in ADDED_CFLAGS etc. These
41282  # will later be checked to make sure only controlled additions
41283  # have been made to CFLAGS etc.
41284  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41285  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41286  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41287
41288  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41289  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41290  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41291
41292  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41293  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41294  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41295
41296    fi
41297  fi
41298
41299  # Make compilation sanity check
41300  for ac_header in stdio.h
41301do :
41302  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41303if test "x$ac_cv_header_stdio_h" = xyes; then :
41304  cat >>confdefs.h <<_ACEOF
41305#define HAVE_STDIO_H 1
41306_ACEOF
41307
41308else
41309
41310    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41311$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41312    if test "x$COMPILE_TYPE" = xreduced; then
41313      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41314$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41315    elif test "x$COMPILE_TYPE" = xcross; then
41316      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41317$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41318    fi
41319    as_fn_error $? "Cannot continue." "$LINENO" 5
41320
41321fi
41322
41323done
41324
41325
41326  # The cast to long int works around a bug in the HP C Compiler
41327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41329# This bug is HP SR number 8606223364.
41330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41331$as_echo_n "checking size of int *... " >&6; }
41332if ${ac_cv_sizeof_int_p+:} false; then :
41333  $as_echo_n "(cached) " >&6
41334else
41335  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41336
41337else
41338  if test "$ac_cv_type_int_p" = yes; then
41339     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41341as_fn_error 77 "cannot compute sizeof (int *)
41342See \`config.log' for more details" "$LINENO" 5; }
41343   else
41344     ac_cv_sizeof_int_p=0
41345   fi
41346fi
41347
41348fi
41349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41350$as_echo "$ac_cv_sizeof_int_p" >&6; }
41351
41352
41353
41354cat >>confdefs.h <<_ACEOF
41355#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41356_ACEOF
41357
41358
41359
41360  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41361  if test "x$ac_cv_sizeof_int_p" = x; then
41362    # The test failed, lets stick to the assumed value.
41363    { $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
41364$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41365  else
41366    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41367
41368    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41369      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41370      # Let's try to implicitely set the compilers target architecture and retry the test
41371      { $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
41372$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;}
41373      { $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
41374$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;}
41375
41376  # When we add flags to the "official" CFLAGS etc, we need to
41377  # keep track of these additions in ADDED_CFLAGS etc. These
41378  # will later be checked to make sure only controlled additions
41379  # have been made to CFLAGS etc.
41380  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41381  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41382  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41383
41384  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41385  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41386  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41387
41388  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41389  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41390  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41391
41392
41393      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41394      unset ac_cv_sizeof_int_p
41395      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41396      cat >>confdefs.h <<_ACEOF
41397#undef SIZEOF_INT_P
41398_ACEOF
41399
41400      # The cast to long int works around a bug in the HP C Compiler
41401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41403# This bug is HP SR number 8606223364.
41404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41405$as_echo_n "checking size of int *... " >&6; }
41406if ${ac_cv_sizeof_int_p+:} false; then :
41407  $as_echo_n "(cached) " >&6
41408else
41409  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41410
41411else
41412  if test "$ac_cv_type_int_p" = yes; then
41413     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41415as_fn_error 77 "cannot compute sizeof (int *)
41416See \`config.log' for more details" "$LINENO" 5; }
41417   else
41418     ac_cv_sizeof_int_p=0
41419   fi
41420fi
41421
41422fi
41423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41424$as_echo "$ac_cv_sizeof_int_p" >&6; }
41425
41426
41427
41428cat >>confdefs.h <<_ACEOF
41429#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41430_ACEOF
41431
41432
41433
41434      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41435
41436      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41437        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
41438      fi
41439    fi
41440  fi
41441
41442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41443$as_echo_n "checking for target address size... " >&6; }
41444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41445$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41446
41447
41448  ###############################################################################
41449  #
41450  # Is the target little of big endian?
41451  #
41452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41453$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41454if ${ac_cv_c_bigendian+:} false; then :
41455  $as_echo_n "(cached) " >&6
41456else
41457  ac_cv_c_bigendian=unknown
41458    # See if we're dealing with a universal compiler.
41459    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41460/* end confdefs.h.  */
41461#ifndef __APPLE_CC__
41462	       not a universal capable compiler
41463	     #endif
41464	     typedef int dummy;
41465
41466_ACEOF
41467if ac_fn_cxx_try_compile "$LINENO"; then :
41468
41469	# Check for potential -arch flags.  It is not universal unless
41470	# there are at least two -arch flags with different values.
41471	ac_arch=
41472	ac_prev=
41473	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41474	 if test -n "$ac_prev"; then
41475	   case $ac_word in
41476	     i?86 | x86_64 | ppc | ppc64)
41477	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41478		 ac_arch=$ac_word
41479	       else
41480		 ac_cv_c_bigendian=universal
41481		 break
41482	       fi
41483	       ;;
41484	   esac
41485	   ac_prev=
41486	 elif test "x$ac_word" = "x-arch"; then
41487	   ac_prev=arch
41488	 fi
41489       done
41490fi
41491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41492    if test $ac_cv_c_bigendian = unknown; then
41493      # See if sys/param.h defines the BYTE_ORDER macro.
41494      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41495/* end confdefs.h.  */
41496#include <sys/types.h>
41497	     #include <sys/param.h>
41498
41499int
41500main ()
41501{
41502#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41503		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41504		     && LITTLE_ENDIAN)
41505	      bogus endian macros
41506	     #endif
41507
41508  ;
41509  return 0;
41510}
41511_ACEOF
41512if ac_fn_cxx_try_compile "$LINENO"; then :
41513  # It does; now see whether it defined to BIG_ENDIAN or not.
41514	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41515/* end confdefs.h.  */
41516#include <sys/types.h>
41517		#include <sys/param.h>
41518
41519int
41520main ()
41521{
41522#if BYTE_ORDER != BIG_ENDIAN
41523		 not big endian
41524		#endif
41525
41526  ;
41527  return 0;
41528}
41529_ACEOF
41530if ac_fn_cxx_try_compile "$LINENO"; then :
41531  ac_cv_c_bigendian=yes
41532else
41533  ac_cv_c_bigendian=no
41534fi
41535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41536fi
41537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41538    fi
41539    if test $ac_cv_c_bigendian = unknown; then
41540      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41541      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41542/* end confdefs.h.  */
41543#include <limits.h>
41544
41545int
41546main ()
41547{
41548#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41549	      bogus endian macros
41550	     #endif
41551
41552  ;
41553  return 0;
41554}
41555_ACEOF
41556if ac_fn_cxx_try_compile "$LINENO"; then :
41557  # It does; now see whether it defined to _BIG_ENDIAN or not.
41558	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41559/* end confdefs.h.  */
41560#include <limits.h>
41561
41562int
41563main ()
41564{
41565#ifndef _BIG_ENDIAN
41566		 not big endian
41567		#endif
41568
41569  ;
41570  return 0;
41571}
41572_ACEOF
41573if ac_fn_cxx_try_compile "$LINENO"; then :
41574  ac_cv_c_bigendian=yes
41575else
41576  ac_cv_c_bigendian=no
41577fi
41578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41579fi
41580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41581    fi
41582    if test $ac_cv_c_bigendian = unknown; then
41583      # Compile a test program.
41584      if test "$cross_compiling" = yes; then :
41585  # Try to guess by grepping values from an object file.
41586	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41587/* end confdefs.h.  */
41588short int ascii_mm[] =
41589		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41590		short int ascii_ii[] =
41591		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41592		int use_ascii (int i) {
41593		  return ascii_mm[i] + ascii_ii[i];
41594		}
41595		short int ebcdic_ii[] =
41596		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41597		short int ebcdic_mm[] =
41598		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41599		int use_ebcdic (int i) {
41600		  return ebcdic_mm[i] + ebcdic_ii[i];
41601		}
41602		extern int foo;
41603
41604int
41605main ()
41606{
41607return use_ascii (foo) == use_ebcdic (foo);
41608  ;
41609  return 0;
41610}
41611_ACEOF
41612if ac_fn_cxx_try_compile "$LINENO"; then :
41613  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41614	      ac_cv_c_bigendian=yes
41615	    fi
41616	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41617	      if test "$ac_cv_c_bigendian" = unknown; then
41618		ac_cv_c_bigendian=no
41619	      else
41620		# finding both strings is unlikely to happen, but who knows?
41621		ac_cv_c_bigendian=unknown
41622	      fi
41623	    fi
41624fi
41625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41626else
41627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41628/* end confdefs.h.  */
41629$ac_includes_default
41630int
41631main ()
41632{
41633
41634	     /* Are we little or big endian?  From Harbison&Steele.  */
41635	     union
41636	     {
41637	       long int l;
41638	       char c[sizeof (long int)];
41639	     } u;
41640	     u.l = 1;
41641	     return u.c[sizeof (long int) - 1] == 1;
41642
41643  ;
41644  return 0;
41645}
41646_ACEOF
41647if ac_fn_cxx_try_run "$LINENO"; then :
41648  ac_cv_c_bigendian=no
41649else
41650  ac_cv_c_bigendian=yes
41651fi
41652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41653  conftest.$ac_objext conftest.beam conftest.$ac_ext
41654fi
41655
41656    fi
41657fi
41658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41659$as_echo "$ac_cv_c_bigendian" >&6; }
41660 case $ac_cv_c_bigendian in #(
41661   yes)
41662     ENDIAN="big";; #(
41663   no)
41664     ENDIAN="little" ;; #(
41665   universal)
41666     ENDIAN="universal_endianness"
41667     ;; #(
41668   *)
41669     ENDIAN="unknown" ;;
41670 esac
41671
41672
41673  if test "x$ENDIAN" = xuniversal_endianness; then
41674    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41675  fi
41676  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41677    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
41678  fi
41679
41680
41681# Configure flags for the tools
41682
41683  ###############################################################################
41684  #
41685  # How to compile shared libraries.
41686  #
41687
41688  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41689    PICFLAG="-fPIC"
41690    C_FLAG_REORDER=''
41691    CXX_FLAG_REORDER=''
41692
41693    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41694      # Linking is different on MacOSX
41695      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41696      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41697      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41698      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41699      SET_SHARED_LIBRARY_MAPFILE=''
41700    else
41701      # Default works for linux, might work on other platforms as well.
41702      SHARED_LIBRARY_FLAGS='-shared'
41703      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41704      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41705      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41706      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41707    fi
41708  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41709    PICFLAG=''
41710    C_FLAG_REORDER=''
41711    CXX_FLAG_REORDER=''
41712
41713    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41714      # Linking is different on MacOSX
41715      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41716      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41717      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41718      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41719      SET_SHARED_LIBRARY_MAPFILE=''
41720    else
41721      # Default works for linux, might work on other platforms as well.
41722      SHARED_LIBRARY_FLAGS='-shared'
41723      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41724      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41725      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41726      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41727    fi
41728  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41729    PICFLAG="-KPIC"
41730    C_FLAG_REORDER='-xF'
41731    CXX_FLAG_REORDER='-xF'
41732    SHARED_LIBRARY_FLAGS="-G"
41733    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41734    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41735    SET_SHARED_LIBRARY_NAME=''
41736    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41737  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41738    PICFLAG="-qpic=large"
41739    C_FLAG_REORDER=''
41740    CXX_FLAG_REORDER=''
41741    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41742    SET_EXECUTABLE_ORIGIN=""
41743    SET_SHARED_LIBRARY_ORIGIN=''
41744    SET_SHARED_LIBRARY_NAME=''
41745    SET_SHARED_LIBRARY_MAPFILE=''
41746  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41747    PICFLAG=""
41748    C_FLAG_REORDER=''
41749    CXX_FLAG_REORDER=''
41750    SHARED_LIBRARY_FLAGS="-LD"
41751    SET_EXECUTABLE_ORIGIN=''
41752    SET_SHARED_LIBRARY_ORIGIN=''
41753    SET_SHARED_LIBRARY_NAME=''
41754    SET_SHARED_LIBRARY_MAPFILE=''
41755  fi
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41766    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41767    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41768    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41769  fi
41770  # The (cross) compiler is now configured, we can now test capabilities
41771  # of the target platform.
41772
41773
41774
41775  ###############################################################################
41776  #
41777  # Setup the opt flags for different compilers
41778  # and different operating systems.
41779  #
41780
41781  # FIXME: this was indirectly the old default, but just inherited.
41782  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41783  #   C_FLAG_DEPS="-MMD -MF"
41784  # fi
41785
41786  # Generate make dependency files
41787  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41788    C_FLAG_DEPS="-MMD -MF"
41789  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41790    C_FLAG_DEPS="-MMD -MF"
41791  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41792    C_FLAG_DEPS="-xMMD -xMF"
41793  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41794    C_FLAG_DEPS="-qmakedep=gcc -MF"
41795  fi
41796  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41797
41798
41799
41800  # Debug symbols
41801  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41802    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41803      # reduce from default "-g2" option to save space
41804      CFLAGS_DEBUG_SYMBOLS="-g1"
41805      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41806    else
41807      CFLAGS_DEBUG_SYMBOLS="-g"
41808      CXXFLAGS_DEBUG_SYMBOLS="-g"
41809    fi
41810  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41811    CFLAGS_DEBUG_SYMBOLS="-g"
41812    CXXFLAGS_DEBUG_SYMBOLS="-g"
41813  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41814    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41815    # FIXME: likely a bug, this disables debug symbols rather than enables them
41816    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41817  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41818    CFLAGS_DEBUG_SYMBOLS="-g"
41819    CXXFLAGS_DEBUG_SYMBOLS="-g"
41820  fi
41821
41822
41823
41824  # bounds, memory and behavior checking options
41825  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41826    case $DEBUG_LEVEL in
41827    release )
41828      # no adjustment
41829      ;;
41830    fastdebug )
41831      # no adjustment
41832      ;;
41833    slowdebug )
41834      # Add runtime stack smashing and undefined behavior checks
41835      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41836      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41837      ;;
41838    esac
41839  fi
41840
41841
41842
41843  # Optimization levels
41844  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41845    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41846
41847    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41848      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41849      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41850      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41851      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41852      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41853      C_O_FLAG_NONE="-xregs=no%frameptr"
41854      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41855      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41856      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41857      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41858      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41859      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41860        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41861        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41862      fi
41863    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41864      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41865      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41866      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41867      C_O_FLAG_DEBUG=""
41868      C_O_FLAG_NONE=""
41869      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41870      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41871      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41872      C_O_FLAG_DEBUG=""
41873      CXX_O_FLAG_NONE=""
41874    fi
41875  else
41876    # The remaining toolchains share opt flags between CC and CXX;
41877    # setup for C and duplicate afterwards.
41878    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41879      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41880        # On MacOSX we optimize for size, something
41881        # we should do for all platforms?
41882        C_O_FLAG_HIGHEST="-Os"
41883        C_O_FLAG_HI="-Os"
41884        C_O_FLAG_NORM="-Os"
41885      else
41886        C_O_FLAG_HIGHEST="-O3"
41887        C_O_FLAG_HI="-O3"
41888        C_O_FLAG_NORM="-O2"
41889      fi
41890      C_O_FLAG_DEBUG="-O0"
41891      C_O_FLAG_NONE="-O0"
41892    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41893      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41894        # On MacOSX we optimize for size, something
41895        # we should do for all platforms?
41896        C_O_FLAG_HIGHEST="-Os"
41897        C_O_FLAG_HI="-Os"
41898        C_O_FLAG_NORM="-Os"
41899      else
41900        C_O_FLAG_HIGHEST="-O3"
41901        C_O_FLAG_HI="-O3"
41902        C_O_FLAG_NORM="-O2"
41903      fi
41904      C_O_FLAG_DEBUG="-O0"
41905      C_O_FLAG_NONE="-O0"
41906    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41907      C_O_FLAG_HIGHEST="-O3"
41908      C_O_FLAG_HI="-O3 -qstrict"
41909      C_O_FLAG_NORM="-O2"
41910      C_O_FLAG_DEBUG="-qnoopt"
41911      C_O_FLAG_NONE="-qnoop"
41912    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41913      C_O_FLAG_HIGHEST="-O2"
41914      C_O_FLAG_HI="-O1"
41915      C_O_FLAG_NORM="-O1"
41916      C_O_FLAG_DEBUG="-Od"
41917      C_O_FLAG_NONE="-Od"
41918    fi
41919    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41920    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41921    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41922    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
41923    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41924  fi
41925
41926  # Adjust optimization flags according to debug level.
41927  case $DEBUG_LEVEL in
41928    release )
41929      # no adjustment
41930      ;;
41931    fastdebug )
41932      # Not quite so much optimization
41933      C_O_FLAG_HI="$C_O_FLAG_NORM"
41934      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41935      ;;
41936    slowdebug )
41937      # Disable optimization
41938      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
41939      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
41940      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
41941      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
41942      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
41943      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
41944      ;;
41945  esac
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959  # Special extras...
41960  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41961    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41962      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41963      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41964    fi
41965    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
41966    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
41967  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41968    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
41969    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
41970  fi
41971
41972  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41973    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41974$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41975  fi
41976
41977  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41978    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41979$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41980  fi
41981
41982  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41983    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41984$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41985  fi
41986
41987
41988# Check whether --with-extra-cflags was given.
41989if test "${with_extra_cflags+set}" = set; then :
41990  withval=$with_extra_cflags;
41991fi
41992
41993
41994
41995# Check whether --with-extra-cxxflags was given.
41996if test "${with_extra_cxxflags+set}" = set; then :
41997  withval=$with_extra_cxxflags;
41998fi
41999
42000
42001
42002# Check whether --with-extra-ldflags was given.
42003if test "${with_extra_ldflags+set}" = set; then :
42004  withval=$with_extra_ldflags;
42005fi
42006
42007
42008  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42009  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42010  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42011
42012  # Hotspot needs these set in their legacy form
42013  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42014  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42015  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42016
42017
42018
42019
42020
42021  ###############################################################################
42022  #
42023  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42024  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42025  #
42026
42027  # Setup compiler/platform specific flags into
42028  #    CFLAGS_JDK    - C Compiler flags
42029  #    CXXFLAGS_JDK  - C++ Compiler flags
42030  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42031  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42032    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42033        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42034    case $OPENJDK_TARGET_CPU_ARCH in
42035      arm )
42036        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42037        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42038        ;;
42039      ppc )
42040        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42041        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42042        ;;
42043      * )
42044        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42045        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42046        ;;
42047    esac
42048  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42049    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42050    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42051      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42052    fi
42053
42054    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42055    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42056  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42057    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42058    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42059  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42060    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42061        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42062        -DWIN32_LEAN_AND_MEAN \
42063        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42064        -DWIN32 -DIAL"
42065    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42066      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42067    else
42068      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42069    fi
42070    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42071    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42072    # studio.
42073    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42074      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42075          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42076    fi
42077  fi
42078
42079  ###############################################################################
42080
42081  # Adjust flags according to debug level.
42082  case $DEBUG_LEVEL in
42083    fastdebug | slowdebug )
42084      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42085      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42086      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42087      ;;
42088    release )
42089      ;;
42090    * )
42091      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42092      ;;
42093  esac
42094
42095  # Setup LP64
42096  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42097
42098  # Set some common defines. These works for all compilers, but assume
42099  # -D is universally accepted.
42100
42101  # Setup endianness
42102  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42103    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42104    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42105    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42106    #   Note: -Dmacro         is the same as    #define macro 1
42107    #         -Dmacro=        is the same as    #define macro
42108    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42109      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42110    else
42111      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42112    fi
42113  else
42114    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42115    # are defined in the system?
42116    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42117      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42118    else
42119      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42120    fi
42121  fi
42122
42123  # Setup target OS define. Use OS target name but in upper case.
42124  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42125  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42126
42127  # Setup target CPU
42128  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42129
42130  # Setup debug/release defines
42131  if test "x$DEBUG_LEVEL" = xrelease; then
42132    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42133    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42134      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42135    fi
42136  else
42137    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42138  fi
42139
42140  # Setup release name
42141  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42142
42143
42144  # Set some additional per-OS defines.
42145  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42146    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42147  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42148    # FIXME: PPC64 should not be here.
42149    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42150  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42151    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42152  fi
42153
42154  # Additional macosx handling
42155  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42156    # Setting these parameters makes it an error to link to macosx APIs that are
42157    # newer than the given OS version and makes the linked binaries compatible
42158    # even if built on a newer version of the OS.
42159    # The expected format is X.Y.Z
42160    MACOSX_VERSION_MIN=10.7.0
42161
42162
42163    # The macro takes the version with no dots, ex: 1070
42164    # Let the flags variables get resolved in make for easier override on make
42165    # command line.
42166    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42167    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42168  fi
42169
42170  # Setup some hard coded includes
42171  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42172      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42173      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42174      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42175
42176  # The shared libraries are compiled using the picflag.
42177  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42178  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42179
42180  # Executable flags
42181  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42182  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42183
42184
42185
42186
42187
42188
42189  # Flags for compiling test libraries
42190  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42191  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42192
42193  # Flags for compiling test executables
42194  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42195  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42196
42197
42198
42199
42200
42201
42202  # Setup LDFLAGS et al.
42203  #
42204
42205  # Now this is odd. The JDK native libraries have to link against libjvm.so
42206  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42207  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42208  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42209  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42210  # libraries will link to whatever is in memory. Yuck.
42211  #
42212  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42213  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42214    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42215    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42216      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42217    fi
42218    # TODO: make -debug optional "--disable-full-debug-symbols"
42219    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42220  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42221    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42222    # We have previously set HAS_GNU_HASH if this is the case
42223    if test -n "$HAS_GNU_HASH"; then
42224      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42225    fi
42226    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42227      # And since we now know that the linker is gnu, then add -z defs, to forbid
42228      # undefined symbols in object files.
42229      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42230      case $DEBUG_LEVEL in
42231        release )
42232          # tell linker to optimize libraries.
42233          # Should this be supplied to the OSS linker as well?
42234          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42235          ;;
42236        slowdebug )
42237          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42238            # do relocations at load
42239            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42240            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42241          fi
42242          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42243            # mark relocations read only
42244            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42245            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42246          fi
42247          ;;
42248        fastdebug )
42249          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42250            # mark relocations read only
42251            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42252            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42253          fi
42254          ;;
42255        * )
42256          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42257          ;;
42258        esac
42259    fi
42260  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42261    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42262    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42263  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42264    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42265  fi
42266
42267  # Customize LDFLAGS for executables
42268
42269  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42270
42271  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42272    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42273      LDFLAGS_STACK_SIZE=1048576
42274    else
42275      LDFLAGS_STACK_SIZE=327680
42276    fi
42277    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42278  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42279    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42280  fi
42281
42282  # Customize LDFLAGS for libs
42283  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42284
42285  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42286    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42287    LDFLAGS_JDKLIB_SUFFIX=""
42288  else
42289    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42290        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42291
42292    # On some platforms (mac) the linker warns about non existing -L dirs.
42293    # Add server first if available. Linking aginst client does not always produce the same results.
42294    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42295    # Default to server for other variants.
42296    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42297      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42298    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42299      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42300    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42301      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42302    else
42303      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42304    fi
42305
42306    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42307    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42308      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42309    fi
42310  fi
42311
42312
42313
42314
42315
42316
42317
42318  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42319  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42320  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42321  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42322
42323
42324
42325
42326
42327
42328
42329  # Some Zero and Shark settings.
42330  # ZERO_ARCHFLAG tells the compiler which mode to build for
42331  case "${OPENJDK_TARGET_CPU}" in
42332    s390)
42333      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42334      ;;
42335    *)
42336      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42337  esac
42338
42339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42340$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42341  supports=yes
42342
42343  saved_cflags="$CFLAGS"
42344  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42345  ac_ext=c
42346ac_cpp='$CPP $CPPFLAGS'
42347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42349ac_compiler_gnu=$ac_cv_c_compiler_gnu
42350
42351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42352/* end confdefs.h.  */
42353int i;
42354_ACEOF
42355if ac_fn_c_try_compile "$LINENO"; then :
42356
42357else
42358  supports=no
42359fi
42360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42361  ac_ext=cpp
42362ac_cpp='$CXXCPP $CPPFLAGS'
42363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42366
42367  CFLAGS="$saved_cflags"
42368
42369  saved_cxxflags="$CXXFLAGS"
42370  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42371  ac_ext=cpp
42372ac_cpp='$CXXCPP $CPPFLAGS'
42373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42376
42377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42378/* end confdefs.h.  */
42379int i;
42380_ACEOF
42381if ac_fn_cxx_try_compile "$LINENO"; then :
42382
42383else
42384  supports=no
42385fi
42386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42387  ac_ext=cpp
42388ac_cpp='$CXXCPP $CPPFLAGS'
42389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42392
42393  CXXFLAGS="$saved_cxxflags"
42394
42395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42396$as_echo "$supports" >&6; }
42397  if test "x$supports" = "xyes" ; then
42398    :
42399  else
42400    ZERO_ARCHFLAG=""
42401  fi
42402
42403
42404
42405  # Check that the compiler supports -mX (or -qX on AIX) flags
42406  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42407
42408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42409$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42410  supports=yes
42411
42412  saved_cflags="$CFLAGS"
42413  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42414  ac_ext=c
42415ac_cpp='$CPP $CPPFLAGS'
42416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42418ac_compiler_gnu=$ac_cv_c_compiler_gnu
42419
42420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42421/* end confdefs.h.  */
42422int i;
42423_ACEOF
42424if ac_fn_c_try_compile "$LINENO"; then :
42425
42426else
42427  supports=no
42428fi
42429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42430  ac_ext=cpp
42431ac_cpp='$CXXCPP $CPPFLAGS'
42432ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42433ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42434ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42435
42436  CFLAGS="$saved_cflags"
42437
42438  saved_cxxflags="$CXXFLAGS"
42439  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42440  ac_ext=cpp
42441ac_cpp='$CXXCPP $CPPFLAGS'
42442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42445
42446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42447/* end confdefs.h.  */
42448int i;
42449_ACEOF
42450if ac_fn_cxx_try_compile "$LINENO"; then :
42451
42452else
42453  supports=no
42454fi
42455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42456  ac_ext=cpp
42457ac_cpp='$CXXCPP $CPPFLAGS'
42458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42461
42462  CXXFLAGS="$saved_cxxflags"
42463
42464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42465$as_echo "$supports" >&6; }
42466  if test "x$supports" = "xyes" ; then
42467    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42468  else
42469    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42470  fi
42471
42472
42473
42474  case "${TOOLCHAIN_TYPE}" in
42475    microsoft)
42476      DISABLE_WARNING_PREFIX="-wd"
42477      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42478      ;;
42479    solstudio)
42480      DISABLE_WARNING_PREFIX="-erroff="
42481      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42482      ;;
42483    gcc)
42484      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42485
42486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42487$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42488  supports=yes
42489
42490  saved_cflags="$CFLAGS"
42491  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42492  ac_ext=c
42493ac_cpp='$CPP $CPPFLAGS'
42494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42496ac_compiler_gnu=$ac_cv_c_compiler_gnu
42497
42498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42499/* end confdefs.h.  */
42500int i;
42501_ACEOF
42502if ac_fn_c_try_compile "$LINENO"; then :
42503
42504else
42505  supports=no
42506fi
42507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42508  ac_ext=cpp
42509ac_cpp='$CXXCPP $CPPFLAGS'
42510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42513
42514  CFLAGS="$saved_cflags"
42515
42516  saved_cxxflags="$CXXFLAGS"
42517  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42518  ac_ext=cpp
42519ac_cpp='$CXXCPP $CPPFLAGS'
42520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42523
42524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42525/* end confdefs.h.  */
42526int i;
42527_ACEOF
42528if ac_fn_cxx_try_compile "$LINENO"; then :
42529
42530else
42531  supports=no
42532fi
42533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42534  ac_ext=cpp
42535ac_cpp='$CXXCPP $CPPFLAGS'
42536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42539
42540  CXXFLAGS="$saved_cxxflags"
42541
42542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42543$as_echo "$supports" >&6; }
42544  if test "x$supports" = "xyes" ; then
42545    GCC_CAN_DISABLE_WARNINGS=true
42546  else
42547    GCC_CAN_DISABLE_WARNINGS=false
42548
42549  fi
42550
42551      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42552        DISABLE_WARNING_PREFIX="-Wno-"
42553      else
42554        DISABLE_WARNING_PREFIX=
42555      fi
42556      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42557      ;;
42558    clang)
42559      DISABLE_WARNING_PREFIX="-Wno-"
42560      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42561      ;;
42562  esac
42563
42564
42565
42566
42567# Setup debug symbols (need objcopy from the toolchain for that)
42568
42569  #
42570  # ENABLE_DEBUG_SYMBOLS
42571  # This must be done after the toolchain is setup, since we're looking at objcopy.
42572  #
42573  # Check whether --enable-debug-symbols was given.
42574if test "${enable_debug_symbols+set}" = set; then :
42575  enableval=$enable_debug_symbols;
42576fi
42577
42578
42579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42580$as_echo_n "checking if we should generate debug symbols... " >&6; }
42581
42582  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42583    # explicit enabling of enable-debug-symbols and can't find objcopy
42584    #   this is an error
42585    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42586  fi
42587
42588  if test "x$enable_debug_symbols" = "xyes"; then
42589    ENABLE_DEBUG_SYMBOLS=true
42590  elif test "x$enable_debug_symbols" = "xno"; then
42591    ENABLE_DEBUG_SYMBOLS=false
42592  else
42593    # Default is on if objcopy is found
42594    if test "x$OBJCOPY" != x; then
42595      ENABLE_DEBUG_SYMBOLS=true
42596    # MacOS X and Windows don't use objcopy but default is on for those OSes
42597    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42598      ENABLE_DEBUG_SYMBOLS=true
42599    else
42600      ENABLE_DEBUG_SYMBOLS=false
42601    fi
42602  fi
42603
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42605$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42606
42607  #
42608  # ZIP_DEBUGINFO_FILES
42609  #
42610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42611$as_echo_n "checking if we should zip debug-info files... " >&6; }
42612  # Check whether --enable-zip-debug-info was given.
42613if test "${enable_zip_debug_info+set}" = set; then :
42614  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42615else
42616  enable_zip_debug_info="yes"
42617fi
42618
42619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42620$as_echo "${enable_zip_debug_info}" >&6; }
42621
42622  if test "x${enable_zip_debug_info}" = "xno"; then
42623    ZIP_DEBUGINFO_FILES=false
42624  else
42625    ZIP_DEBUGINFO_FILES=true
42626  fi
42627
42628
42629
42630
42631
42632  # Check whether --enable-native-coverage was given.
42633if test "${enable_native_coverage+set}" = set; then :
42634  enableval=$enable_native_coverage;
42635fi
42636
42637  GCOV_ENABLED="false"
42638  if test "x$enable_native_coverage" = "xyes"; then
42639    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42640      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42641$as_echo_n "checking if native coverage is enabled... " >&6; }
42642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42643$as_echo "yes" >&6; }
42644      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42645      GCOV_LDFLAGS="-fprofile-arcs"
42646      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42647      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42648      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42649      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42650      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42651      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42652      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42653      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42654      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42655      GCOV_ENABLED="true"
42656    else
42657      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42658    fi
42659  elif test "x$enable_native_coverage" = "xno"; then
42660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42661$as_echo_n "checking if native coverage is enabled... " >&6; }
42662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42663$as_echo "no" >&6; }
42664  elif test "x$enable_native_coverage" != "x"; then
42665    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42666  fi
42667
42668
42669
42670
42671###############################################################################
42672#
42673# Check dependencies for external and internal libraries.
42674#
42675###############################################################################
42676
42677# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42678
42679  # When using cygwin or msys, we need a wrapper binary that renames
42680  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42681  # @files and rewrites these too! This wrapper binary is
42682  # called fixpath.
42683  FIXPATH=
42684  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42686$as_echo_n "checking if fixpath can be created... " >&6; }
42687    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42688    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42689    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42690    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42691      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42692      FIXPATH="$FIXPATH_BIN -c"
42693    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42694      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42695      # @ was chosen as separator to minimize risk of other tools messing around with it
42696      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42697          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42698      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42699      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42700    fi
42701    FIXPATH_SRC_W="$FIXPATH_SRC"
42702    FIXPATH_BIN_W="$FIXPATH_BIN"
42703
42704  unix_path="$FIXPATH_SRC_W"
42705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42706    windows_path=`$CYGPATH -m "$unix_path"`
42707    FIXPATH_SRC_W="$windows_path"
42708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42709    windows_path=`cmd //c echo $unix_path`
42710    FIXPATH_SRC_W="$windows_path"
42711  fi
42712
42713
42714  unix_path="$FIXPATH_BIN_W"
42715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42716    windows_path=`$CYGPATH -m "$unix_path"`
42717    FIXPATH_BIN_W="$windows_path"
42718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42719    windows_path=`cmd //c echo $unix_path`
42720    FIXPATH_BIN_W="$windows_path"
42721  fi
42722
42723    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42724    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42725    cd $FIXPATH_DIR
42726    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42727    cd $CURDIR
42728
42729    if test ! -x $FIXPATH_BIN; then
42730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732      cat $FIXPATH_DIR/fixpath1.log
42733      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42734    fi
42735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42736$as_echo "yes" >&6; }
42737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42738$as_echo_n "checking if fixpath.exe works... " >&6; }
42739    cd $FIXPATH_DIR
42740    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42741        > $FIXPATH_DIR/fixpath2.log 2>&1
42742    cd $CURDIR
42743    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42745$as_echo "no" >&6; }
42746      cat $FIXPATH_DIR/fixpath2.log
42747      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42748    fi
42749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42750$as_echo "yes" >&6; }
42751  fi
42752
42753
42754
42755
42756
42757
42758  ###############################################################################
42759  #
42760  # OS specific settings that we never will need to probe.
42761  #
42762  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42764$as_echo_n "checking what is not needed on Linux?... " >&6; }
42765    PULSE_NOT_NEEDED=yes
42766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42767$as_echo "pulse" >&6; }
42768  fi
42769
42770  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42772$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42773    ALSA_NOT_NEEDED=yes
42774    PULSE_NOT_NEEDED=yes
42775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42776$as_echo "alsa pulse" >&6; }
42777  fi
42778
42779  if test "x$OPENJDK_TARGET_OS" = xaix; then
42780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42781$as_echo_n "checking what is not needed on AIX?... " >&6; }
42782    ALSA_NOT_NEEDED=yes
42783    PULSE_NOT_NEEDED=yes
42784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42785$as_echo "alsa pulse" >&6; }
42786  fi
42787
42788
42789  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42791$as_echo_n "checking what is not needed on Windows?... " >&6; }
42792    CUPS_NOT_NEEDED=yes
42793    ALSA_NOT_NEEDED=yes
42794    PULSE_NOT_NEEDED=yes
42795    X11_NOT_NEEDED=yes
42796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42797$as_echo "alsa cups pulse x11" >&6; }
42798  fi
42799
42800  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42802$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42803    ALSA_NOT_NEEDED=yes
42804    PULSE_NOT_NEEDED=yes
42805    X11_NOT_NEEDED=yes
42806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42807$as_echo "alsa pulse x11" >&6; }
42808  fi
42809
42810  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42812$as_echo_n "checking what is not needed on bsd?... " >&6; }
42813    ALSA_NOT_NEEDED=yes
42814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42815$as_echo "alsa" >&6; }
42816  fi
42817
42818  if test "x$OPENJDK" = "xfalse"; then
42819    FREETYPE_NOT_NEEDED=yes
42820  fi
42821
42822  if test "x$SUPPORT_HEADFUL" = xno; then
42823    X11_NOT_NEEDED=yes
42824  fi
42825
42826
42827
42828  ###############################################################################
42829  #
42830  # Check for X Windows
42831  #
42832
42833  if test "x$X11_NOT_NEEDED" = xyes; then
42834    if test "x${with_x}" != x; then
42835      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42836$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42837    fi
42838    X_CFLAGS=
42839    X_LIBS=
42840  else
42841    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42842    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42843    # --x-libraries for the sysroot, if that seems to be correct.
42844    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42845      if test "x$SYSROOT" != "x"; then
42846        if test "x$x_includes" = xNONE; then
42847          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42848            x_includes="$SYSROOT/usr/X11R6/include"
42849          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42850            x_includes="$SYSROOT/usr/include"
42851          fi
42852        fi
42853        if test "x$x_libraries" = xNONE; then
42854          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42855            x_libraries="$SYSROOT/usr/X11R6/lib"
42856          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42857            x_libraries="$SYSROOT/usr/lib64"
42858          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42859            x_libraries="$SYSROOT/usr/lib"
42860          fi
42861        fi
42862      fi
42863    fi
42864
42865    # Now let autoconf do it's magic
42866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42867$as_echo_n "checking for X... " >&6; }
42868
42869
42870# Check whether --with-x was given.
42871if test "${with_x+set}" = set; then :
42872  withval=$with_x;
42873fi
42874
42875# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42876if test "x$with_x" = xno; then
42877  # The user explicitly disabled X.
42878  have_x=disabled
42879else
42880  case $x_includes,$x_libraries in #(
42881    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42882    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42883  $as_echo_n "(cached) " >&6
42884else
42885  # One or both of the vars are not set, and there is no cached value.
42886ac_x_includes=no ac_x_libraries=no
42887rm -f -r conftest.dir
42888if mkdir conftest.dir; then
42889  cd conftest.dir
42890  cat >Imakefile <<'_ACEOF'
42891incroot:
42892	@echo incroot='${INCROOT}'
42893usrlibdir:
42894	@echo usrlibdir='${USRLIBDIR}'
42895libdir:
42896	@echo libdir='${LIBDIR}'
42897_ACEOF
42898  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42899    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42900    for ac_var in incroot usrlibdir libdir; do
42901      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42902    done
42903    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42904    for ac_extension in a so sl dylib la dll; do
42905      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42906	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42907	ac_im_usrlibdir=$ac_im_libdir; break
42908      fi
42909    done
42910    # Screen out bogus values from the imake configuration.  They are
42911    # bogus both because they are the default anyway, and because
42912    # using them would break gcc on systems where it needs fixed includes.
42913    case $ac_im_incroot in
42914	/usr/include) ac_x_includes= ;;
42915	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42916    esac
42917    case $ac_im_usrlibdir in
42918	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42919	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42920    esac
42921  fi
42922  cd ..
42923  rm -f -r conftest.dir
42924fi
42925
42926# Standard set of common directories for X headers.
42927# Check X11 before X11Rn because it is often a symlink to the current release.
42928ac_x_header_dirs='
42929/usr/X11/include
42930/usr/X11R7/include
42931/usr/X11R6/include
42932/usr/X11R5/include
42933/usr/X11R4/include
42934
42935/usr/include/X11
42936/usr/include/X11R7
42937/usr/include/X11R6
42938/usr/include/X11R5
42939/usr/include/X11R4
42940
42941/usr/local/X11/include
42942/usr/local/X11R7/include
42943/usr/local/X11R6/include
42944/usr/local/X11R5/include
42945/usr/local/X11R4/include
42946
42947/usr/local/include/X11
42948/usr/local/include/X11R7
42949/usr/local/include/X11R6
42950/usr/local/include/X11R5
42951/usr/local/include/X11R4
42952
42953/usr/X386/include
42954/usr/x386/include
42955/usr/XFree86/include/X11
42956
42957/usr/include
42958/usr/local/include
42959/usr/unsupported/include
42960/usr/athena/include
42961/usr/local/x11r5/include
42962/usr/lpp/Xamples/include
42963
42964/usr/openwin/include
42965/usr/openwin/share/include'
42966
42967if test "$ac_x_includes" = no; then
42968  # Guess where to find include files, by looking for Xlib.h.
42969  # First, try using that file with no special directory specified.
42970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42971/* end confdefs.h.  */
42972#include <X11/Xlib.h>
42973_ACEOF
42974if ac_fn_cxx_try_cpp "$LINENO"; then :
42975  # We can compile using X headers with no special include directory.
42976ac_x_includes=
42977else
42978  for ac_dir in $ac_x_header_dirs; do
42979  if test -r "$ac_dir/X11/Xlib.h"; then
42980    ac_x_includes=$ac_dir
42981    break
42982  fi
42983done
42984fi
42985rm -f conftest.err conftest.i conftest.$ac_ext
42986fi # $ac_x_includes = no
42987
42988if test "$ac_x_libraries" = no; then
42989  # Check for the libraries.
42990  # See if we find them without any special options.
42991  # Don't add to $LIBS permanently.
42992  ac_save_LIBS=$LIBS
42993  LIBS="-lX11 $LIBS"
42994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42995/* end confdefs.h.  */
42996#include <X11/Xlib.h>
42997int
42998main ()
42999{
43000XrmInitialize ()
43001  ;
43002  return 0;
43003}
43004_ACEOF
43005if ac_fn_cxx_try_link "$LINENO"; then :
43006  LIBS=$ac_save_LIBS
43007# We can link X programs with no special library path.
43008ac_x_libraries=
43009else
43010  LIBS=$ac_save_LIBS
43011for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43012do
43013  # Don't even attempt the hair of trying to link an X program!
43014  for ac_extension in a so sl dylib la dll; do
43015    if test -r "$ac_dir/libX11.$ac_extension"; then
43016      ac_x_libraries=$ac_dir
43017      break 2
43018    fi
43019  done
43020done
43021fi
43022rm -f core conftest.err conftest.$ac_objext \
43023    conftest$ac_exeext conftest.$ac_ext
43024fi # $ac_x_libraries = no
43025
43026case $ac_x_includes,$ac_x_libraries in #(
43027  no,* | *,no | *\'*)
43028    # Didn't find X, or a directory has "'" in its name.
43029    ac_cv_have_x="have_x=no";; #(
43030  *)
43031    # Record where we found X for the cache.
43032    ac_cv_have_x="have_x=yes\
43033	ac_x_includes='$ac_x_includes'\
43034	ac_x_libraries='$ac_x_libraries'"
43035esac
43036fi
43037;; #(
43038    *) have_x=yes;;
43039  esac
43040  eval "$ac_cv_have_x"
43041fi # $with_x != no
43042
43043if test "$have_x" != yes; then
43044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43045$as_echo "$have_x" >&6; }
43046  no_x=yes
43047else
43048  # If each of the values was on the command line, it overrides each guess.
43049  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43050  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43051  # Update the cache value to reflect the command line values.
43052  ac_cv_have_x="have_x=yes\
43053	ac_x_includes='$x_includes'\
43054	ac_x_libraries='$x_libraries'"
43055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43056$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43057fi
43058
43059    if test "$no_x" = yes; then
43060  # Not all programs may use this symbol, but it does not hurt to define it.
43061
43062$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43063
43064  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43065else
43066  if test -n "$x_includes"; then
43067    X_CFLAGS="$X_CFLAGS -I$x_includes"
43068  fi
43069
43070  # It would also be nice to do this for all -L options, not just this one.
43071  if test -n "$x_libraries"; then
43072    X_LIBS="$X_LIBS -L$x_libraries"
43073    # For Solaris; some versions of Sun CC require a space after -R and
43074    # others require no space.  Words are not sufficient . . . .
43075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43076$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43077    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43078    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43079    ac_cxx_werror_flag=yes
43080    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43081/* end confdefs.h.  */
43082
43083int
43084main ()
43085{
43086
43087  ;
43088  return 0;
43089}
43090_ACEOF
43091if ac_fn_cxx_try_link "$LINENO"; then :
43092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43093$as_echo "no" >&6; }
43094       X_LIBS="$X_LIBS -R$x_libraries"
43095else
43096  LIBS="$ac_xsave_LIBS -R $x_libraries"
43097       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43098/* end confdefs.h.  */
43099
43100int
43101main ()
43102{
43103
43104  ;
43105  return 0;
43106}
43107_ACEOF
43108if ac_fn_cxx_try_link "$LINENO"; then :
43109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43110$as_echo "yes" >&6; }
43111	  X_LIBS="$X_LIBS -R $x_libraries"
43112else
43113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43114$as_echo "neither works" >&6; }
43115fi
43116rm -f core conftest.err conftest.$ac_objext \
43117    conftest$ac_exeext conftest.$ac_ext
43118fi
43119rm -f core conftest.err conftest.$ac_objext \
43120    conftest$ac_exeext conftest.$ac_ext
43121    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43122    LIBS=$ac_xsave_LIBS
43123  fi
43124
43125  # Check for system-dependent libraries X programs must link with.
43126  # Do this before checking for the system-independent R6 libraries
43127  # (-lICE), since we may need -lsocket or whatever for X linking.
43128
43129  if test "$ISC" = yes; then
43130    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43131  else
43132    # Martyn Johnson says this is needed for Ultrix, if the X
43133    # libraries were built with DECnet support.  And Karl Berry says
43134    # the Alpha needs dnet_stub (dnet does not exist).
43135    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43136    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43137/* end confdefs.h.  */
43138
43139/* Override any GCC internal prototype to avoid an error.
43140   Use char because int might match the return type of a GCC
43141   builtin and then its argument prototype would still apply.  */
43142#ifdef __cplusplus
43143extern "C"
43144#endif
43145char XOpenDisplay ();
43146int
43147main ()
43148{
43149return XOpenDisplay ();
43150  ;
43151  return 0;
43152}
43153_ACEOF
43154if ac_fn_cxx_try_link "$LINENO"; then :
43155
43156else
43157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43158$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43159if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43160  $as_echo_n "(cached) " >&6
43161else
43162  ac_check_lib_save_LIBS=$LIBS
43163LIBS="-ldnet  $LIBS"
43164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43165/* end confdefs.h.  */
43166
43167/* Override any GCC internal prototype to avoid an error.
43168   Use char because int might match the return type of a GCC
43169   builtin and then its argument prototype would still apply.  */
43170#ifdef __cplusplus
43171extern "C"
43172#endif
43173char dnet_ntoa ();
43174int
43175main ()
43176{
43177return dnet_ntoa ();
43178  ;
43179  return 0;
43180}
43181_ACEOF
43182if ac_fn_cxx_try_link "$LINENO"; then :
43183  ac_cv_lib_dnet_dnet_ntoa=yes
43184else
43185  ac_cv_lib_dnet_dnet_ntoa=no
43186fi
43187rm -f core conftest.err conftest.$ac_objext \
43188    conftest$ac_exeext conftest.$ac_ext
43189LIBS=$ac_check_lib_save_LIBS
43190fi
43191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43192$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43193if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43194  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43195fi
43196
43197    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43198      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43199$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43200if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43201  $as_echo_n "(cached) " >&6
43202else
43203  ac_check_lib_save_LIBS=$LIBS
43204LIBS="-ldnet_stub  $LIBS"
43205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43206/* end confdefs.h.  */
43207
43208/* Override any GCC internal prototype to avoid an error.
43209   Use char because int might match the return type of a GCC
43210   builtin and then its argument prototype would still apply.  */
43211#ifdef __cplusplus
43212extern "C"
43213#endif
43214char dnet_ntoa ();
43215int
43216main ()
43217{
43218return dnet_ntoa ();
43219  ;
43220  return 0;
43221}
43222_ACEOF
43223if ac_fn_cxx_try_link "$LINENO"; then :
43224  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43225else
43226  ac_cv_lib_dnet_stub_dnet_ntoa=no
43227fi
43228rm -f core conftest.err conftest.$ac_objext \
43229    conftest$ac_exeext conftest.$ac_ext
43230LIBS=$ac_check_lib_save_LIBS
43231fi
43232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43233$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43234if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43235  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43236fi
43237
43238    fi
43239fi
43240rm -f core conftest.err conftest.$ac_objext \
43241    conftest$ac_exeext conftest.$ac_ext
43242    LIBS="$ac_xsave_LIBS"
43243
43244    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43245    # to get the SysV transport functions.
43246    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43247    # needs -lnsl.
43248    # The nsl library prevents programs from opening the X display
43249    # on Irix 5.2, according to T.E. Dickey.
43250    # The functions gethostbyname, getservbyname, and inet_addr are
43251    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43252    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43253if test "x$ac_cv_func_gethostbyname" = xyes; then :
43254
43255fi
43256
43257    if test $ac_cv_func_gethostbyname = no; then
43258      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43259$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43260if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43261  $as_echo_n "(cached) " >&6
43262else
43263  ac_check_lib_save_LIBS=$LIBS
43264LIBS="-lnsl  $LIBS"
43265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43266/* end confdefs.h.  */
43267
43268/* Override any GCC internal prototype to avoid an error.
43269   Use char because int might match the return type of a GCC
43270   builtin and then its argument prototype would still apply.  */
43271#ifdef __cplusplus
43272extern "C"
43273#endif
43274char gethostbyname ();
43275int
43276main ()
43277{
43278return gethostbyname ();
43279  ;
43280  return 0;
43281}
43282_ACEOF
43283if ac_fn_cxx_try_link "$LINENO"; then :
43284  ac_cv_lib_nsl_gethostbyname=yes
43285else
43286  ac_cv_lib_nsl_gethostbyname=no
43287fi
43288rm -f core conftest.err conftest.$ac_objext \
43289    conftest$ac_exeext conftest.$ac_ext
43290LIBS=$ac_check_lib_save_LIBS
43291fi
43292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43293$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43294if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43295  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43296fi
43297
43298      if test $ac_cv_lib_nsl_gethostbyname = no; then
43299	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43300$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43301if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43302  $as_echo_n "(cached) " >&6
43303else
43304  ac_check_lib_save_LIBS=$LIBS
43305LIBS="-lbsd  $LIBS"
43306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43307/* end confdefs.h.  */
43308
43309/* Override any GCC internal prototype to avoid an error.
43310   Use char because int might match the return type of a GCC
43311   builtin and then its argument prototype would still apply.  */
43312#ifdef __cplusplus
43313extern "C"
43314#endif
43315char gethostbyname ();
43316int
43317main ()
43318{
43319return gethostbyname ();
43320  ;
43321  return 0;
43322}
43323_ACEOF
43324if ac_fn_cxx_try_link "$LINENO"; then :
43325  ac_cv_lib_bsd_gethostbyname=yes
43326else
43327  ac_cv_lib_bsd_gethostbyname=no
43328fi
43329rm -f core conftest.err conftest.$ac_objext \
43330    conftest$ac_exeext conftest.$ac_ext
43331LIBS=$ac_check_lib_save_LIBS
43332fi
43333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43334$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43335if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43336  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43337fi
43338
43339      fi
43340    fi
43341
43342    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43343    # socket/setsockopt and other routines are undefined under SCO ODT
43344    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43345    # on later versions), says Simon Leinen: it contains gethostby*
43346    # variants that don't use the name server (or something).  -lsocket
43347    # must be given before -lnsl if both are needed.  We assume that
43348    # if connect needs -lnsl, so does gethostbyname.
43349    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43350if test "x$ac_cv_func_connect" = xyes; then :
43351
43352fi
43353
43354    if test $ac_cv_func_connect = no; then
43355      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43356$as_echo_n "checking for connect in -lsocket... " >&6; }
43357if ${ac_cv_lib_socket_connect+:} false; then :
43358  $as_echo_n "(cached) " >&6
43359else
43360  ac_check_lib_save_LIBS=$LIBS
43361LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43363/* end confdefs.h.  */
43364
43365/* Override any GCC internal prototype to avoid an error.
43366   Use char because int might match the return type of a GCC
43367   builtin and then its argument prototype would still apply.  */
43368#ifdef __cplusplus
43369extern "C"
43370#endif
43371char connect ();
43372int
43373main ()
43374{
43375return connect ();
43376  ;
43377  return 0;
43378}
43379_ACEOF
43380if ac_fn_cxx_try_link "$LINENO"; then :
43381  ac_cv_lib_socket_connect=yes
43382else
43383  ac_cv_lib_socket_connect=no
43384fi
43385rm -f core conftest.err conftest.$ac_objext \
43386    conftest$ac_exeext conftest.$ac_ext
43387LIBS=$ac_check_lib_save_LIBS
43388fi
43389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43390$as_echo "$ac_cv_lib_socket_connect" >&6; }
43391if test "x$ac_cv_lib_socket_connect" = xyes; then :
43392  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43393fi
43394
43395    fi
43396
43397    # Guillermo Gomez says -lposix is necessary on A/UX.
43398    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43399if test "x$ac_cv_func_remove" = xyes; then :
43400
43401fi
43402
43403    if test $ac_cv_func_remove = no; then
43404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43405$as_echo_n "checking for remove in -lposix... " >&6; }
43406if ${ac_cv_lib_posix_remove+:} false; then :
43407  $as_echo_n "(cached) " >&6
43408else
43409  ac_check_lib_save_LIBS=$LIBS
43410LIBS="-lposix  $LIBS"
43411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43412/* end confdefs.h.  */
43413
43414/* Override any GCC internal prototype to avoid an error.
43415   Use char because int might match the return type of a GCC
43416   builtin and then its argument prototype would still apply.  */
43417#ifdef __cplusplus
43418extern "C"
43419#endif
43420char remove ();
43421int
43422main ()
43423{
43424return remove ();
43425  ;
43426  return 0;
43427}
43428_ACEOF
43429if ac_fn_cxx_try_link "$LINENO"; then :
43430  ac_cv_lib_posix_remove=yes
43431else
43432  ac_cv_lib_posix_remove=no
43433fi
43434rm -f core conftest.err conftest.$ac_objext \
43435    conftest$ac_exeext conftest.$ac_ext
43436LIBS=$ac_check_lib_save_LIBS
43437fi
43438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43439$as_echo "$ac_cv_lib_posix_remove" >&6; }
43440if test "x$ac_cv_lib_posix_remove" = xyes; then :
43441  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43442fi
43443
43444    fi
43445
43446    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43447    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43448if test "x$ac_cv_func_shmat" = xyes; then :
43449
43450fi
43451
43452    if test $ac_cv_func_shmat = no; then
43453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43454$as_echo_n "checking for shmat in -lipc... " >&6; }
43455if ${ac_cv_lib_ipc_shmat+:} false; then :
43456  $as_echo_n "(cached) " >&6
43457else
43458  ac_check_lib_save_LIBS=$LIBS
43459LIBS="-lipc  $LIBS"
43460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43461/* end confdefs.h.  */
43462
43463/* Override any GCC internal prototype to avoid an error.
43464   Use char because int might match the return type of a GCC
43465   builtin and then its argument prototype would still apply.  */
43466#ifdef __cplusplus
43467extern "C"
43468#endif
43469char shmat ();
43470int
43471main ()
43472{
43473return shmat ();
43474  ;
43475  return 0;
43476}
43477_ACEOF
43478if ac_fn_cxx_try_link "$LINENO"; then :
43479  ac_cv_lib_ipc_shmat=yes
43480else
43481  ac_cv_lib_ipc_shmat=no
43482fi
43483rm -f core conftest.err conftest.$ac_objext \
43484    conftest$ac_exeext conftest.$ac_ext
43485LIBS=$ac_check_lib_save_LIBS
43486fi
43487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43488$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43489if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43490  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43491fi
43492
43493    fi
43494  fi
43495
43496  # Check for libraries that X11R6 Xt/Xaw programs need.
43497  ac_save_LDFLAGS=$LDFLAGS
43498  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43499  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43500  # check for ICE first), but we must link in the order -lSM -lICE or
43501  # we get undefined symbols.  So assume we have SM if we have ICE.
43502  # These have to be linked with before -lX11, unlike the other
43503  # libraries we check for below, so use a different variable.
43504  # John Interrante, Karl Berry
43505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43506$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43507if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43508  $as_echo_n "(cached) " >&6
43509else
43510  ac_check_lib_save_LIBS=$LIBS
43511LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43513/* end confdefs.h.  */
43514
43515/* Override any GCC internal prototype to avoid an error.
43516   Use char because int might match the return type of a GCC
43517   builtin and then its argument prototype would still apply.  */
43518#ifdef __cplusplus
43519extern "C"
43520#endif
43521char IceConnectionNumber ();
43522int
43523main ()
43524{
43525return IceConnectionNumber ();
43526  ;
43527  return 0;
43528}
43529_ACEOF
43530if ac_fn_cxx_try_link "$LINENO"; then :
43531  ac_cv_lib_ICE_IceConnectionNumber=yes
43532else
43533  ac_cv_lib_ICE_IceConnectionNumber=no
43534fi
43535rm -f core conftest.err conftest.$ac_objext \
43536    conftest$ac_exeext conftest.$ac_ext
43537LIBS=$ac_check_lib_save_LIBS
43538fi
43539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43540$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43541if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43542  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43543fi
43544
43545  LDFLAGS=$ac_save_LDFLAGS
43546
43547fi
43548
43549
43550    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43551    # this doesn't make sense so we remove it.
43552    if test "x$COMPILE_TYPE" = xcross; then
43553      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43554    fi
43555
43556    if test "x$no_x" = xyes; then
43557
43558  # Print a helpful message on how to acquire the necessary build dependency.
43559  # x11 is the help tag: freetype, cups, pulse, alsa etc
43560  MISSING_DEPENDENCY=x11
43561
43562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43563    cygwin_help $MISSING_DEPENDENCY
43564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43565    msys_help $MISSING_DEPENDENCY
43566  else
43567    PKGHANDLER_COMMAND=
43568
43569    case $PKGHANDLER in
43570      apt-get)
43571        apt_help     $MISSING_DEPENDENCY ;;
43572      yum)
43573        yum_help     $MISSING_DEPENDENCY ;;
43574      port)
43575        port_help    $MISSING_DEPENDENCY ;;
43576      pkgutil)
43577        pkgutil_help $MISSING_DEPENDENCY ;;
43578      pkgadd)
43579        pkgadd_help  $MISSING_DEPENDENCY ;;
43580    esac
43581
43582    if test "x$PKGHANDLER_COMMAND" != x; then
43583      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43584    fi
43585  fi
43586
43587      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43588    fi
43589
43590    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43591      OPENWIN_HOME="/usr/openwin"
43592      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43593      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43594          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43595          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43596          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43597    fi
43598
43599    ac_ext=c
43600ac_cpp='$CPP $CPPFLAGS'
43601ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43602ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43603ac_compiler_gnu=$ac_cv_c_compiler_gnu
43604
43605    OLD_CFLAGS="$CFLAGS"
43606    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43607
43608    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43609    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43610do :
43611  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43612ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43613          # include <X11/Xlib.h>
43614          # include <X11/Xutil.h>
43615
43616
43617"
43618if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43619  cat >>confdefs.h <<_ACEOF
43620#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43621_ACEOF
43622 X11_HEADERS_OK=yes
43623else
43624  X11_HEADERS_OK=no; break
43625fi
43626
43627done
43628
43629
43630    if test "x$X11_HEADERS_OK" = xno; then
43631
43632  # Print a helpful message on how to acquire the necessary build dependency.
43633  # x11 is the help tag: freetype, cups, pulse, alsa etc
43634  MISSING_DEPENDENCY=x11
43635
43636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43637    cygwin_help $MISSING_DEPENDENCY
43638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43639    msys_help $MISSING_DEPENDENCY
43640  else
43641    PKGHANDLER_COMMAND=
43642
43643    case $PKGHANDLER in
43644      apt-get)
43645        apt_help     $MISSING_DEPENDENCY ;;
43646      yum)
43647        yum_help     $MISSING_DEPENDENCY ;;
43648      port)
43649        port_help    $MISSING_DEPENDENCY ;;
43650      pkgutil)
43651        pkgutil_help $MISSING_DEPENDENCY ;;
43652      pkgadd)
43653        pkgadd_help  $MISSING_DEPENDENCY ;;
43654    esac
43655
43656    if test "x$PKGHANDLER_COMMAND" != x; then
43657      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43658    fi
43659  fi
43660
43661      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43662    fi
43663
43664    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43665    # defined in libawt_xawt.
43666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43667$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43668    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43669/* end confdefs.h.  */
43670#include <X11/extensions/Xrender.h>
43671int
43672main ()
43673{
43674XLinearGradient x;
43675  ;
43676  return 0;
43677}
43678_ACEOF
43679if ac_fn_c_try_compile "$LINENO"; then :
43680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43681$as_echo "yes" >&6; }
43682else
43683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43684$as_echo "no" >&6; }
43685         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43686fi
43687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43688
43689    CFLAGS="$OLD_CFLAGS"
43690    ac_ext=cpp
43691ac_cpp='$CXXCPP $CPPFLAGS'
43692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43695
43696  fi # X11_NOT_NEEDED
43697
43698
43699
43700
43701
43702
43703  ###############################################################################
43704  #
43705  # The common unix printing system cups is used to print from java.
43706  #
43707
43708# Check whether --with-cups was given.
43709if test "${with_cups+set}" = set; then :
43710  withval=$with_cups;
43711fi
43712
43713
43714# Check whether --with-cups-include was given.
43715if test "${with_cups_include+set}" = set; then :
43716  withval=$with_cups_include;
43717fi
43718
43719
43720  if test "x$CUPS_NOT_NEEDED" = xyes; then
43721    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43722      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43723$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43724    fi
43725    CUPS_CFLAGS=
43726  else
43727    CUPS_FOUND=no
43728
43729    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43730      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43731    fi
43732
43733    if test "x${with_cups}" != x; then
43734      CUPS_CFLAGS="-I${with_cups}/include"
43735      CUPS_FOUND=yes
43736    fi
43737    if test "x${with_cups_include}" != x; then
43738      CUPS_CFLAGS="-I${with_cups_include}"
43739      CUPS_FOUND=yes
43740    fi
43741    if test "x$CUPS_FOUND" = xno; then
43742
43743
43744  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43745    # Source the builddeps file again, to make sure it uses the latest variables!
43746    . $builddepsfile
43747    # Look for a target and build machine specific resource!
43748    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43749    if test "x$resource" = x; then
43750      # Ok, lets instead look for a target specific resource
43751      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43752    fi
43753    if test "x$resource" = x; then
43754      # Ok, lets instead look for a build specific resource
43755      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43756    fi
43757    if test "x$resource" = x; then
43758      # Ok, lets instead look for a generic resource
43759      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43760      resource=${builddep_cups}
43761    fi
43762    if test "x$resource" != x; then
43763      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43764$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43765      # If the resource in the builddeps.conf file is an existing directory,
43766      # for example /java/linux/cups
43767      if test -d ${resource}; then
43768        depdir=${resource}
43769      else
43770
43771  # cups is for example mymodule
43772  # $resource is for example libs/general/libmymod_1_2_3.zip
43773  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43774  # $with_builddeps_dir is for example /localhome/builddeps
43775  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43776  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43777  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43778  filename=`basename $resource`
43779  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43780  filebase=${filename%%.*}
43781  extension=${filename#*.}
43782  installdir=$with_builddeps_dir/$filebase
43783  if test ! -f $installdir/$filename.unpacked; then
43784    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43785$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43786    if test ! -d $installdir; then
43787      mkdir -p $installdir
43788    fi
43789    if test ! -d $installdir; then
43790      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43791    fi
43792    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43793    touch $tmpfile
43794    if test ! -f $tmpfile; then
43795      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43796    fi
43797
43798  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43799  # $tmpfile is the local file name for the downloaded file.
43800  VALID_TOOL=no
43801  if test "x$BDEPS_FTP" = xwget; then
43802    VALID_TOOL=yes
43803    wget -O $tmpfile $with_builddeps_server/$resource
43804  fi
43805  if test "x$BDEPS_FTP" = xlftp; then
43806    VALID_TOOL=yes
43807    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43808  fi
43809  if test "x$BDEPS_FTP" = xftp; then
43810    VALID_TOOL=yes
43811    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43812    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43813    FTPUSERPWD=${FTPSERVER%%@*}
43814    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43815      FTPUSER=${userpwd%%:*}
43816      FTPPWD=${userpwd#*@}
43817      FTPSERVER=${FTPSERVER#*@}
43818    else
43819      FTPUSER=ftp
43820      FTPPWD=ftp
43821    fi
43822    # the "pass" command does not work on some
43823    # ftp clients (read ftp.exe) but if it works,
43824    # passive mode is better!
43825    ( \
43826        echo "user $FTPUSER $FTPPWD"        ; \
43827        echo "pass"                         ; \
43828        echo "bin"                          ; \
43829        echo "get $FTPPATH $tmpfile"              ; \
43830    ) | ftp -in $FTPSERVER
43831  fi
43832  if test "x$VALID_TOOL" != xyes; then
43833    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43834  fi
43835
43836    mv $tmpfile $installdir/$filename
43837    if test ! -s $installdir/$filename; then
43838      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43839    fi
43840    case "$extension" in
43841      zip)  echo "Unzipping $installdir/$filename..."
43842        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43843        ;;
43844      tar.gz) echo "Untaring $installdir/$filename..."
43845        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43846        ;;
43847      tgz) echo "Untaring $installdir/$filename..."
43848        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43849        ;;
43850      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43851        ;;
43852    esac
43853  fi
43854  if test -f $installdir/$filename.unpacked; then
43855    depdir=$installdir
43856  fi
43857
43858      fi
43859      # Source the builddeps file again, because in the previous command, the depdir
43860      # was updated to point at the current build dependency install directory.
43861      . $builddepsfile
43862      # Now extract variables from the builddeps.conf files.
43863      theroot=${builddep_cups_ROOT}
43864      thecflags=${builddep_cups_CFLAGS}
43865      thelibs=${builddep_cups_LIBS}
43866      if test "x$depdir" = x; then
43867        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43868      fi
43869      CUPS=$depdir
43870      if test "x$theroot" != x; then
43871        CUPS="$theroot"
43872      fi
43873      if test "x$thecflags" != x; then
43874        CUPS_CFLAGS="$thecflags"
43875      fi
43876      if test "x$thelibs" != x; then
43877        CUPS_LIBS="$thelibs"
43878      fi
43879      CUPS_FOUND=yes
43880
43881    fi
43882
43883  fi
43884
43885    fi
43886    if test "x$CUPS_FOUND" = xno; then
43887      # Are the cups headers installed in the default /usr/include location?
43888      for ac_header in cups/cups.h cups/ppd.h
43889do :
43890  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43891ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43892if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43893  cat >>confdefs.h <<_ACEOF
43894#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43895_ACEOF
43896
43897            CUPS_FOUND=yes
43898            CUPS_CFLAGS=
43899            DEFAULT_CUPS=yes
43900
43901
43902fi
43903
43904done
43905
43906    fi
43907    if test "x$CUPS_FOUND" = xno; then
43908      # Getting nervous now? Lets poke around for standard Solaris third-party
43909      # package installation locations.
43910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43911$as_echo_n "checking for cups headers... " >&6; }
43912      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43913        # An SFW package seems to be installed!
43914        CUPS_FOUND=yes
43915        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43916      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43917        # A CSW package seems to be installed!
43918        CUPS_FOUND=yes
43919        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43920      fi
43921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43922$as_echo "$CUPS_FOUND" >&6; }
43923    fi
43924    if test "x$CUPS_FOUND" = xno; then
43925
43926  # Print a helpful message on how to acquire the necessary build dependency.
43927  # cups is the help tag: freetype, cups, pulse, alsa etc
43928  MISSING_DEPENDENCY=cups
43929
43930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43931    cygwin_help $MISSING_DEPENDENCY
43932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43933    msys_help $MISSING_DEPENDENCY
43934  else
43935    PKGHANDLER_COMMAND=
43936
43937    case $PKGHANDLER in
43938      apt-get)
43939        apt_help     $MISSING_DEPENDENCY ;;
43940      yum)
43941        yum_help     $MISSING_DEPENDENCY ;;
43942      port)
43943        port_help    $MISSING_DEPENDENCY ;;
43944      pkgutil)
43945        pkgutil_help $MISSING_DEPENDENCY ;;
43946      pkgadd)
43947        pkgadd_help  $MISSING_DEPENDENCY ;;
43948    esac
43949
43950    if test "x$PKGHANDLER_COMMAND" != x; then
43951      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43952    fi
43953  fi
43954
43955      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43956    fi
43957  fi
43958
43959
43960
43961
43962
43963
43964  ###############################################################################
43965  #
43966  # The ubiquitous freetype library is used to render fonts.
43967  #
43968
43969# Check whether --with-freetype was given.
43970if test "${with_freetype+set}" = set; then :
43971  withval=$with_freetype;
43972fi
43973
43974
43975# Check whether --with-freetype-include was given.
43976if test "${with_freetype_include+set}" = set; then :
43977  withval=$with_freetype_include;
43978fi
43979
43980
43981# Check whether --with-freetype-lib was given.
43982if test "${with_freetype_lib+set}" = set; then :
43983  withval=$with_freetype_lib;
43984fi
43985
43986
43987# Check whether --with-freetype-src was given.
43988if test "${with_freetype_src+set}" = set; then :
43989  withval=$with_freetype_src;
43990fi
43991
43992  # Check whether --enable-freetype-bundling was given.
43993if test "${enable_freetype_bundling+set}" = set; then :
43994  enableval=$enable_freetype_bundling;
43995fi
43996
43997
43998  # Need to specify explicitly since it needs to be overridden on some versions of macosx
43999  FREETYPE_BASE_NAME=freetype
44000  FREETYPE_CFLAGS=
44001  FREETYPE_LIBS=
44002  FREETYPE_BUNDLE_LIB_PATH=
44003
44004  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44005    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
44006      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44007$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44008    fi
44009    if test "x$enable_freetype_bundling" != x; then
44010      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44011$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44012    fi
44013  else
44014    # freetype is needed to build; go get it!
44015
44016    BUNDLE_FREETYPE="$enable_freetype_bundling"
44017
44018    if  test "x$with_freetype_src" != x; then
44019      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44020        # Try to build freetype if --with-freetype-src was given on Windows
44021
44022  FREETYPE_SRC_PATH="$with_freetype_src"
44023  BUILD_FREETYPE=yes
44024
44025  # Check if the freetype sources are acessible..
44026  if ! test -d $FREETYPE_SRC_PATH; then
44027    { $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
44028$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44029    BUILD_FREETYPE=no
44030  fi
44031  # ..and contain a vc2010 project file
44032  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44033  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44034    { $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
44035$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44036    BUILD_FREETYPE=no
44037  fi
44038  # Now check if configure found a version of 'msbuild.exe'
44039  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44040    { $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
44041$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;}
44042    BUILD_FREETYPE=no
44043  fi
44044
44045  # Ready to go..
44046  if test "x$BUILD_FREETYPE" = xyes; then
44047
44048    # msbuild requires trailing slashes for output directories
44049    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44050    freetype_lib_path_unix="$freetype_lib_path"
44051    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44052
44053  unix_path="$vcxproj_path"
44054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44055    windows_path=`$CYGPATH -m "$unix_path"`
44056    vcxproj_path="$windows_path"
44057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44058    windows_path=`cmd //c echo $unix_path`
44059    vcxproj_path="$windows_path"
44060  fi
44061
44062
44063  unix_path="$freetype_lib_path"
44064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44065    windows_path=`$CYGPATH -m "$unix_path"`
44066    freetype_lib_path="$windows_path"
44067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44068    windows_path=`cmd //c echo $unix_path`
44069    freetype_lib_path="$windows_path"
44070  fi
44071
44072
44073  unix_path="$freetype_obj_path"
44074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44075    windows_path=`$CYGPATH -m "$unix_path"`
44076    freetype_obj_path="$windows_path"
44077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44078    windows_path=`cmd //c echo $unix_path`
44079    freetype_obj_path="$windows_path"
44080  fi
44081
44082    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44083      freetype_platform=x64
44084    else
44085      freetype_platform=win32
44086    fi
44087
44088    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44089    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44090    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44091    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44092    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44093$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44094
44095    # First we try to build the freetype.dll
44096    $ECHO -e "@echo off\n"\
44097	     "$MSBUILD $vcxproj_path "\
44098		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44099		       "/p:Configuration=\"Release Multithreaded\" "\
44100		       "/p:Platform=$freetype_platform "\
44101		       "/p:ConfigurationType=DynamicLibrary "\
44102		       "/p:TargetName=freetype "\
44103		       "/p:OutDir=\"$freetype_lib_path\" "\
44104		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44105    cmd /c freetype.bat
44106
44107    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44108      # If that succeeds we also build freetype.lib
44109      $ECHO -e "@echo off\n"\
44110	       "$MSBUILD $vcxproj_path "\
44111			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44112			 "/p:Configuration=\"Release Multithreaded\" "\
44113			 "/p:Platform=$freetype_platform "\
44114			 "/p:ConfigurationType=StaticLibrary "\
44115			 "/p:TargetName=freetype "\
44116			 "/p:OutDir=\"$freetype_lib_path\" "\
44117			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44118      cmd /c freetype.bat
44119
44120      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44121	# Once we build both, lib and dll, set freetype lib and include path appropriately
44122	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44123	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44124	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44125$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44126      else
44127	BUILD_FREETYPE=no
44128      fi
44129    else
44130      BUILD_FREETYPE=no
44131    fi
44132  fi
44133
44134        if test "x$BUILD_FREETYPE" = xyes; then
44135          # Okay, we built it. Check that it works.
44136
44137  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44138  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44139  METHOD="--with-freetype-src"
44140
44141  # Let's start with an optimistic view of the world :-)
44142  FOUND_FREETYPE=yes
44143
44144  # First look for the canonical freetype main include file ft2build.h.
44145  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44146    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44147    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44148    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44149      # Fail.
44150      FOUND_FREETYPE=no
44151    fi
44152  fi
44153
44154  if test "x$FOUND_FREETYPE" = xyes; then
44155    # Include file found, let's continue the sanity check.
44156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44157$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44158
44159    # Reset to default value
44160    FREETYPE_BASE_NAME=freetype
44161    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44162    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44163      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44164          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44165        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44166        # for the .6 version explicitly.
44167        FREETYPE_BASE_NAME=freetype.6
44168        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44169        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44170$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44171      else
44172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44173$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44174        FOUND_FREETYPE=no
44175      fi
44176    else
44177      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44178        # On Windows, we will need both .lib and .dll file.
44179        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44180          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44181$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44182          FOUND_FREETYPE=no
44183        fi
44184      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44185          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44186        # Found lib in isa dir, use that instead.
44187        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44188        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44189$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44190      fi
44191    fi
44192  fi
44193
44194  if test "x$FOUND_FREETYPE" = xyes; then
44195
44196  # Only process if variable expands to non-empty
44197
44198  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44200
44201  # Input might be given as Windows format, start by converting to
44202  # unix format.
44203  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44204  new_path=`$CYGPATH -u "$path"`
44205
44206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44209  # "foo.exe" is OK but "foo" is an error.
44210  #
44211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44212  # It is also a way to make sure we got the proper file name for the real test later on.
44213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44214  if test "x$test_shortpath" = x; then
44215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44216$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44217    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44218  fi
44219
44220  # Call helper function which possibly converts this using DOS-style short mode.
44221  # If so, the updated path is stored in $new_path.
44222
44223  input_path="$new_path"
44224  # Check if we need to convert this using DOS-style short mode. If the path
44225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44226  # take no chances and rewrite it.
44227  # Note: m4 eats our [], so we need to use [ and ] instead.
44228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44229  if test "x$has_forbidden_chars" != x; then
44230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44234      # Going to short mode and back again did indeed matter. Since short mode is
44235      # case insensitive, let's make it lowercase to improve readability.
44236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44237      # Now convert it back to Unix-style (cygpath)
44238      input_path=`$CYGPATH -u "$shortmode_path"`
44239      new_path="$input_path"
44240    fi
44241  fi
44242
44243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44244  if test "x$test_cygdrive_prefix" = x; then
44245    # As a simple fix, exclude /usr/bin since it's not a real path.
44246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44248      # a path prefixed by /cygdrive for fixpath to work.
44249      new_path="$CYGWIN_ROOT_PATH$input_path"
44250    fi
44251  fi
44252
44253
44254  if test "x$path" != "x$new_path"; then
44255    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44257$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44258  fi
44259
44260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44261
44262  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44263  has_colon=`$ECHO $path | $GREP ^.:`
44264  new_path="$path"
44265  if test "x$has_colon" = x; then
44266    # Not in mixed or Windows style, start by that.
44267    new_path=`cmd //c echo $path`
44268  fi
44269
44270
44271  input_path="$new_path"
44272  # Check if we need to convert this using DOS-style short mode. If the path
44273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44274  # take no chances and rewrite it.
44275  # Note: m4 eats our [], so we need to use [ and ] instead.
44276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44277  if test "x$has_forbidden_chars" != x; then
44278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44280  fi
44281
44282
44283  windows_path="$new_path"
44284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44285    unix_path=`$CYGPATH -u "$windows_path"`
44286    new_path="$unix_path"
44287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44289    new_path="$unix_path"
44290  fi
44291
44292  if test "x$path" != "x$new_path"; then
44293    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44296  fi
44297
44298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44300
44301    else
44302      # We're on a unix platform. Hooray! :)
44303      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44304      has_space=`$ECHO "$path" | $GREP " "`
44305      if test "x$has_space" != x; then
44306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44309      fi
44310
44311      # Use eval to expand a potential ~
44312      eval path="$path"
44313      if test ! -f "$path" && test ! -d "$path"; then
44314        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44315      fi
44316
44317      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44318    fi
44319  fi
44320
44321
44322  # Only process if variable expands to non-empty
44323
44324  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44326
44327  # Input might be given as Windows format, start by converting to
44328  # unix format.
44329  path="$POTENTIAL_FREETYPE_LIB_PATH"
44330  new_path=`$CYGPATH -u "$path"`
44331
44332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44335  # "foo.exe" is OK but "foo" is an error.
44336  #
44337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44338  # It is also a way to make sure we got the proper file name for the real test later on.
44339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44340  if test "x$test_shortpath" = x; then
44341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44343    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44344  fi
44345
44346  # Call helper function which possibly converts this using DOS-style short mode.
44347  # If so, the updated path is stored in $new_path.
44348
44349  input_path="$new_path"
44350  # Check if we need to convert this using DOS-style short mode. If the path
44351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44352  # take no chances and rewrite it.
44353  # Note: m4 eats our [], so we need to use [ and ] instead.
44354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44355  if test "x$has_forbidden_chars" != x; then
44356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44360      # Going to short mode and back again did indeed matter. Since short mode is
44361      # case insensitive, let's make it lowercase to improve readability.
44362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44363      # Now convert it back to Unix-style (cygpath)
44364      input_path=`$CYGPATH -u "$shortmode_path"`
44365      new_path="$input_path"
44366    fi
44367  fi
44368
44369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44370  if test "x$test_cygdrive_prefix" = x; then
44371    # As a simple fix, exclude /usr/bin since it's not a real path.
44372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44374      # a path prefixed by /cygdrive for fixpath to work.
44375      new_path="$CYGWIN_ROOT_PATH$input_path"
44376    fi
44377  fi
44378
44379
44380  if test "x$path" != "x$new_path"; then
44381    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44383$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44384  fi
44385
44386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44387
44388  path="$POTENTIAL_FREETYPE_LIB_PATH"
44389  has_colon=`$ECHO $path | $GREP ^.:`
44390  new_path="$path"
44391  if test "x$has_colon" = x; then
44392    # Not in mixed or Windows style, start by that.
44393    new_path=`cmd //c echo $path`
44394  fi
44395
44396
44397  input_path="$new_path"
44398  # Check if we need to convert this using DOS-style short mode. If the path
44399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44400  # take no chances and rewrite it.
44401  # Note: m4 eats our [], so we need to use [ and ] instead.
44402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44403  if test "x$has_forbidden_chars" != x; then
44404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44406  fi
44407
44408
44409  windows_path="$new_path"
44410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44411    unix_path=`$CYGPATH -u "$windows_path"`
44412    new_path="$unix_path"
44413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44415    new_path="$unix_path"
44416  fi
44417
44418  if test "x$path" != "x$new_path"; then
44419    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44421$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44422  fi
44423
44424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44426
44427    else
44428      # We're on a unix platform. Hooray! :)
44429      path="$POTENTIAL_FREETYPE_LIB_PATH"
44430      has_space=`$ECHO "$path" | $GREP " "`
44431      if test "x$has_space" != x; then
44432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44434        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44435      fi
44436
44437      # Use eval to expand a potential ~
44438      eval path="$path"
44439      if test ! -f "$path" && test ! -d "$path"; then
44440        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44441      fi
44442
44443      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44444    fi
44445  fi
44446
44447
44448    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44450$as_echo_n "checking for freetype includes... " >&6; }
44451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44452$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44453    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44455$as_echo_n "checking for freetype libraries... " >&6; }
44456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44457$as_echo "$FREETYPE_LIB_PATH" >&6; }
44458  fi
44459
44460          if test "x$FOUND_FREETYPE" != xyes; then
44461            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44462          fi
44463        else
44464          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44465$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44466          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44467        fi
44468      else
44469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44470$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44471      fi
44472    fi
44473
44474    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44475      # User has specified settings
44476
44477      if test "x$BUNDLE_FREETYPE" = x; then
44478        # If not specified, default is to bundle freetype
44479        BUNDLE_FREETYPE=yes
44480      fi
44481
44482      if test "x$with_freetype" != x; then
44483        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44484        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44485      fi
44486
44487      # Allow --with-freetype-lib and --with-freetype-include to override
44488      if test "x$with_freetype_include" != x; then
44489        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44490      fi
44491      if test "x$with_freetype_lib" != x; then
44492        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44493      fi
44494
44495      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44496        # Okay, we got it. Check that it works.
44497
44498  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44499  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44500  METHOD="--with-freetype"
44501
44502  # Let's start with an optimistic view of the world :-)
44503  FOUND_FREETYPE=yes
44504
44505  # First look for the canonical freetype main include file ft2build.h.
44506  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44507    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44508    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44509    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44510      # Fail.
44511      FOUND_FREETYPE=no
44512    fi
44513  fi
44514
44515  if test "x$FOUND_FREETYPE" = xyes; then
44516    # Include file found, let's continue the sanity check.
44517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44518$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44519
44520    # Reset to default value
44521    FREETYPE_BASE_NAME=freetype
44522    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44523    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44524      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44525          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44526        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44527        # for the .6 version explicitly.
44528        FREETYPE_BASE_NAME=freetype.6
44529        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44530        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44531$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44532      else
44533        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44534$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44535        FOUND_FREETYPE=no
44536      fi
44537    else
44538      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44539        # On Windows, we will need both .lib and .dll file.
44540        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44541          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44542$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44543          FOUND_FREETYPE=no
44544        fi
44545      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44546          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44547        # Found lib in isa dir, use that instead.
44548        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44549        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44550$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44551      fi
44552    fi
44553  fi
44554
44555  if test "x$FOUND_FREETYPE" = xyes; then
44556
44557  # Only process if variable expands to non-empty
44558
44559  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44561
44562  # Input might be given as Windows format, start by converting to
44563  # unix format.
44564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44565  new_path=`$CYGPATH -u "$path"`
44566
44567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44570  # "foo.exe" is OK but "foo" is an error.
44571  #
44572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44573  # It is also a way to make sure we got the proper file name for the real test later on.
44574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44575  if test "x$test_shortpath" = x; then
44576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44577$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44578    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44579  fi
44580
44581  # Call helper function which possibly converts this using DOS-style short mode.
44582  # If so, the updated path is stored in $new_path.
44583
44584  input_path="$new_path"
44585  # Check if we need to convert this using DOS-style short mode. If the path
44586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44587  # take no chances and rewrite it.
44588  # Note: m4 eats our [], so we need to use [ and ] instead.
44589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44590  if test "x$has_forbidden_chars" != x; then
44591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44595      # Going to short mode and back again did indeed matter. Since short mode is
44596      # case insensitive, let's make it lowercase to improve readability.
44597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44598      # Now convert it back to Unix-style (cygpath)
44599      input_path=`$CYGPATH -u "$shortmode_path"`
44600      new_path="$input_path"
44601    fi
44602  fi
44603
44604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44605  if test "x$test_cygdrive_prefix" = x; then
44606    # As a simple fix, exclude /usr/bin since it's not a real path.
44607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44609      # a path prefixed by /cygdrive for fixpath to work.
44610      new_path="$CYGWIN_ROOT_PATH$input_path"
44611    fi
44612  fi
44613
44614
44615  if test "x$path" != "x$new_path"; then
44616    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44619  fi
44620
44621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44622
44623  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44624  has_colon=`$ECHO $path | $GREP ^.:`
44625  new_path="$path"
44626  if test "x$has_colon" = x; then
44627    # Not in mixed or Windows style, start by that.
44628    new_path=`cmd //c echo $path`
44629  fi
44630
44631
44632  input_path="$new_path"
44633  # Check if we need to convert this using DOS-style short mode. If the path
44634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44635  # take no chances and rewrite it.
44636  # Note: m4 eats our [], so we need to use [ and ] instead.
44637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44638  if test "x$has_forbidden_chars" != x; then
44639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44641  fi
44642
44643
44644  windows_path="$new_path"
44645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44646    unix_path=`$CYGPATH -u "$windows_path"`
44647    new_path="$unix_path"
44648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44650    new_path="$unix_path"
44651  fi
44652
44653  if test "x$path" != "x$new_path"; then
44654    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44657  fi
44658
44659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44661
44662    else
44663      # We're on a unix platform. Hooray! :)
44664      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44665      has_space=`$ECHO "$path" | $GREP " "`
44666      if test "x$has_space" != x; then
44667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44670      fi
44671
44672      # Use eval to expand a potential ~
44673      eval path="$path"
44674      if test ! -f "$path" && test ! -d "$path"; then
44675        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44676      fi
44677
44678      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44679    fi
44680  fi
44681
44682
44683  # Only process if variable expands to non-empty
44684
44685  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44687
44688  # Input might be given as Windows format, start by converting to
44689  # unix format.
44690  path="$POTENTIAL_FREETYPE_LIB_PATH"
44691  new_path=`$CYGPATH -u "$path"`
44692
44693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44696  # "foo.exe" is OK but "foo" is an error.
44697  #
44698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44699  # It is also a way to make sure we got the proper file name for the real test later on.
44700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44701  if test "x$test_shortpath" = x; then
44702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44705  fi
44706
44707  # Call helper function which possibly converts this using DOS-style short mode.
44708  # If so, the updated path is stored in $new_path.
44709
44710  input_path="$new_path"
44711  # Check if we need to convert this using DOS-style short mode. If the path
44712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44713  # take no chances and rewrite it.
44714  # Note: m4 eats our [], so we need to use [ and ] instead.
44715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44716  if test "x$has_forbidden_chars" != x; then
44717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44721      # Going to short mode and back again did indeed matter. Since short mode is
44722      # case insensitive, let's make it lowercase to improve readability.
44723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44724      # Now convert it back to Unix-style (cygpath)
44725      input_path=`$CYGPATH -u "$shortmode_path"`
44726      new_path="$input_path"
44727    fi
44728  fi
44729
44730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44731  if test "x$test_cygdrive_prefix" = x; then
44732    # As a simple fix, exclude /usr/bin since it's not a real path.
44733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44735      # a path prefixed by /cygdrive for fixpath to work.
44736      new_path="$CYGWIN_ROOT_PATH$input_path"
44737    fi
44738  fi
44739
44740
44741  if test "x$path" != "x$new_path"; then
44742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44745  fi
44746
44747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44748
44749  path="$POTENTIAL_FREETYPE_LIB_PATH"
44750  has_colon=`$ECHO $path | $GREP ^.:`
44751  new_path="$path"
44752  if test "x$has_colon" = x; then
44753    # Not in mixed or Windows style, start by that.
44754    new_path=`cmd //c echo $path`
44755  fi
44756
44757
44758  input_path="$new_path"
44759  # Check if we need to convert this using DOS-style short mode. If the path
44760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44761  # take no chances and rewrite it.
44762  # Note: m4 eats our [], so we need to use [ and ] instead.
44763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44764  if test "x$has_forbidden_chars" != x; then
44765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44767  fi
44768
44769
44770  windows_path="$new_path"
44771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44772    unix_path=`$CYGPATH -u "$windows_path"`
44773    new_path="$unix_path"
44774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44776    new_path="$unix_path"
44777  fi
44778
44779  if test "x$path" != "x$new_path"; then
44780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44783  fi
44784
44785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44787
44788    else
44789      # We're on a unix platform. Hooray! :)
44790      path="$POTENTIAL_FREETYPE_LIB_PATH"
44791      has_space=`$ECHO "$path" | $GREP " "`
44792      if test "x$has_space" != x; then
44793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44796      fi
44797
44798      # Use eval to expand a potential ~
44799      eval path="$path"
44800      if test ! -f "$path" && test ! -d "$path"; then
44801        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44802      fi
44803
44804      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44805    fi
44806  fi
44807
44808
44809    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44811$as_echo_n "checking for freetype includes... " >&6; }
44812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44813$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44814    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44816$as_echo_n "checking for freetype libraries... " >&6; }
44817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44818$as_echo "$FREETYPE_LIB_PATH" >&6; }
44819  fi
44820
44821        if test "x$FOUND_FREETYPE" != xyes; then
44822          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44823        fi
44824      else
44825        # User specified only one of lib or include. This is an error.
44826        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44827          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44828$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44829          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44830        else
44831          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44832$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44833          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44834        fi
44835      fi
44836    else
44837      # User did not specify settings, but we need freetype. Try to locate it.
44838
44839      if test "x$BUNDLE_FREETYPE" = x; then
44840        # If not specified, default is to bundle freetype only on windows
44841        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44842          BUNDLE_FREETYPE=yes
44843        else
44844          BUNDLE_FREETYPE=no
44845        fi
44846      fi
44847
44848      if test "x$FOUND_FREETYPE" != xyes; then
44849        # Check builddeps
44850
44851
44852  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44853    # Source the builddeps file again, to make sure it uses the latest variables!
44854    . $builddepsfile
44855    # Look for a target and build machine specific resource!
44856    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44857    if test "x$resource" = x; then
44858      # Ok, lets instead look for a target specific resource
44859      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44860    fi
44861    if test "x$resource" = x; then
44862      # Ok, lets instead look for a build specific resource
44863      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44864    fi
44865    if test "x$resource" = x; then
44866      # Ok, lets instead look for a generic resource
44867      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44868      resource=${builddep_freetype2}
44869    fi
44870    if test "x$resource" != x; then
44871      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44872$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44873      # If the resource in the builddeps.conf file is an existing directory,
44874      # for example /java/linux/cups
44875      if test -d ${resource}; then
44876        depdir=${resource}
44877      else
44878
44879  # freetype2 is for example mymodule
44880  # $resource is for example libs/general/libmymod_1_2_3.zip
44881  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44882  # $with_builddeps_dir is for example /localhome/builddeps
44883  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44884  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44885  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44886  filename=`basename $resource`
44887  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44888  filebase=${filename%%.*}
44889  extension=${filename#*.}
44890  installdir=$with_builddeps_dir/$filebase
44891  if test ! -f $installdir/$filename.unpacked; then
44892    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44893$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44894    if test ! -d $installdir; then
44895      mkdir -p $installdir
44896    fi
44897    if test ! -d $installdir; then
44898      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44899    fi
44900    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44901    touch $tmpfile
44902    if test ! -f $tmpfile; then
44903      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44904    fi
44905
44906  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44907  # $tmpfile is the local file name for the downloaded file.
44908  VALID_TOOL=no
44909  if test "x$BDEPS_FTP" = xwget; then
44910    VALID_TOOL=yes
44911    wget -O $tmpfile $with_builddeps_server/$resource
44912  fi
44913  if test "x$BDEPS_FTP" = xlftp; then
44914    VALID_TOOL=yes
44915    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44916  fi
44917  if test "x$BDEPS_FTP" = xftp; then
44918    VALID_TOOL=yes
44919    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44920    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44921    FTPUSERPWD=${FTPSERVER%%@*}
44922    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44923      FTPUSER=${userpwd%%:*}
44924      FTPPWD=${userpwd#*@}
44925      FTPSERVER=${FTPSERVER#*@}
44926    else
44927      FTPUSER=ftp
44928      FTPPWD=ftp
44929    fi
44930    # the "pass" command does not work on some
44931    # ftp clients (read ftp.exe) but if it works,
44932    # passive mode is better!
44933    ( \
44934        echo "user $FTPUSER $FTPPWD"        ; \
44935        echo "pass"                         ; \
44936        echo "bin"                          ; \
44937        echo "get $FTPPATH $tmpfile"              ; \
44938    ) | ftp -in $FTPSERVER
44939  fi
44940  if test "x$VALID_TOOL" != xyes; then
44941    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44942  fi
44943
44944    mv $tmpfile $installdir/$filename
44945    if test ! -s $installdir/$filename; then
44946      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44947    fi
44948    case "$extension" in
44949      zip)  echo "Unzipping $installdir/$filename..."
44950        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44951        ;;
44952      tar.gz) echo "Untaring $installdir/$filename..."
44953        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44954        ;;
44955      tgz) echo "Untaring $installdir/$filename..."
44956        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44957        ;;
44958      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44959        ;;
44960    esac
44961  fi
44962  if test -f $installdir/$filename.unpacked; then
44963    depdir=$installdir
44964  fi
44965
44966      fi
44967      # Source the builddeps file again, because in the previous command, the depdir
44968      # was updated to point at the current build dependency install directory.
44969      . $builddepsfile
44970      # Now extract variables from the builddeps.conf files.
44971      theroot=${builddep_freetype2_ROOT}
44972      thecflags=${builddep_freetype2_CFLAGS}
44973      thelibs=${builddep_freetype2_LIBS}
44974      if test "x$depdir" = x; then
44975        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44976      fi
44977      FREETYPE=$depdir
44978      if test "x$theroot" != x; then
44979        FREETYPE="$theroot"
44980      fi
44981      if test "x$thecflags" != x; then
44982        FREETYPE_CFLAGS="$thecflags"
44983      fi
44984      if test "x$thelibs" != x; then
44985        FREETYPE_LIBS="$thelibs"
44986      fi
44987      FOUND_FREETYPE=yes
44988      else FOUND_FREETYPE=no
44989
44990    fi
44991    else FOUND_FREETYPE=no
44992
44993  fi
44994
44995        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44996        if test "x$FOUND_FREETYPE" = xyes; then
44997          if test "x$BUNDLE_FREETYPE" = xyes; then
44998            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44999$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45000            FOUND_FREETYPE=no
45001          else
45002            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45003$as_echo_n "checking for freetype... " >&6; }
45004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45005$as_echo "yes (using builddeps)" >&6; }
45006          fi
45007        fi
45008      fi
45009
45010      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45011      if test "x$SYSROOT" = x; then
45012        if test "x$FOUND_FREETYPE" != xyes; then
45013          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45014          if test "x$PKG_CONFIG" != x; then
45015
45016pkg_failed=no
45017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45018$as_echo_n "checking for FREETYPE... " >&6; }
45019
45020if test -n "$FREETYPE_CFLAGS"; then
45021    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45022 elif test -n "$PKG_CONFIG"; then
45023    if test -n "$PKG_CONFIG" && \
45024    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45025  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45026  ac_status=$?
45027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45028  test $ac_status = 0; }; then
45029  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45030else
45031  pkg_failed=yes
45032fi
45033 else
45034    pkg_failed=untried
45035fi
45036if test -n "$FREETYPE_LIBS"; then
45037    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45038 elif test -n "$PKG_CONFIG"; then
45039    if test -n "$PKG_CONFIG" && \
45040    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45041  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45042  ac_status=$?
45043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45044  test $ac_status = 0; }; then
45045  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45046else
45047  pkg_failed=yes
45048fi
45049 else
45050    pkg_failed=untried
45051fi
45052
45053
45054
45055if test $pkg_failed = yes; then
45056
45057if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45058        _pkg_short_errors_supported=yes
45059else
45060        _pkg_short_errors_supported=no
45061fi
45062        if test $_pkg_short_errors_supported = yes; then
45063	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45064        else
45065	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45066        fi
45067	# Put the nasty error message in config.log where it belongs
45068	echo "$FREETYPE_PKG_ERRORS" >&5
45069
45070	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45071$as_echo "no" >&6; }
45072                FOUND_FREETYPE=no
45073elif test $pkg_failed = untried; then
45074	FOUND_FREETYPE=no
45075else
45076	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45077	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45079$as_echo "yes" >&6; }
45080	FOUND_FREETYPE=yes
45081fi
45082            if test "x$FOUND_FREETYPE" = xyes; then
45083              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45084              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45085              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45086              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45087                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45088              fi
45089              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45090              if test "x$BUNDLE_FREETYPE" = xyes; then
45091                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45092$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45093                FOUND_FREETYPE=no
45094              else
45095                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45096$as_echo_n "checking for freetype... " >&6; }
45097                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45098$as_echo "yes (using pkg-config)" >&6; }
45099              fi
45100            fi
45101          fi
45102        fi
45103      fi
45104
45105      if test "x$FOUND_FREETYPE" != xyes; then
45106        # Check in well-known locations
45107        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45108          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45109
45110  windows_path="$FREETYPE_BASE_DIR"
45111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45112    unix_path=`$CYGPATH -u "$windows_path"`
45113    FREETYPE_BASE_DIR="$unix_path"
45114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45116    FREETYPE_BASE_DIR="$unix_path"
45117  fi
45118
45119
45120  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45121  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45122  METHOD="well-known location"
45123
45124  # Let's start with an optimistic view of the world :-)
45125  FOUND_FREETYPE=yes
45126
45127  # First look for the canonical freetype main include file ft2build.h.
45128  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45129    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45130    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45131    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45132      # Fail.
45133      FOUND_FREETYPE=no
45134    fi
45135  fi
45136
45137  if test "x$FOUND_FREETYPE" = xyes; then
45138    # Include file found, let's continue the sanity check.
45139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45140$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45141
45142    # Reset to default value
45143    FREETYPE_BASE_NAME=freetype
45144    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45145    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45146      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45148        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45149        # for the .6 version explicitly.
45150        FREETYPE_BASE_NAME=freetype.6
45151        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45152        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45153$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45154      else
45155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45156$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45157        FOUND_FREETYPE=no
45158      fi
45159    else
45160      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45161        # On Windows, we will need both .lib and .dll file.
45162        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45163          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45164$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45165          FOUND_FREETYPE=no
45166        fi
45167      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45168          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45169        # Found lib in isa dir, use that instead.
45170        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45171        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45172$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45173      fi
45174    fi
45175  fi
45176
45177  if test "x$FOUND_FREETYPE" = xyes; then
45178
45179  # Only process if variable expands to non-empty
45180
45181  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45183
45184  # Input might be given as Windows format, start by converting to
45185  # unix format.
45186  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45187  new_path=`$CYGPATH -u "$path"`
45188
45189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45192  # "foo.exe" is OK but "foo" is an error.
45193  #
45194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45195  # It is also a way to make sure we got the proper file name for the real test later on.
45196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45197  if test "x$test_shortpath" = x; then
45198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45201  fi
45202
45203  # Call helper function which possibly converts this using DOS-style short mode.
45204  # If so, the updated path is stored in $new_path.
45205
45206  input_path="$new_path"
45207  # Check if we need to convert this using DOS-style short mode. If the path
45208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45209  # take no chances and rewrite it.
45210  # Note: m4 eats our [], so we need to use [ and ] instead.
45211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45212  if test "x$has_forbidden_chars" != x; then
45213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45217      # Going to short mode and back again did indeed matter. Since short mode is
45218      # case insensitive, let's make it lowercase to improve readability.
45219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45220      # Now convert it back to Unix-style (cygpath)
45221      input_path=`$CYGPATH -u "$shortmode_path"`
45222      new_path="$input_path"
45223    fi
45224  fi
45225
45226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45227  if test "x$test_cygdrive_prefix" = x; then
45228    # As a simple fix, exclude /usr/bin since it's not a real path.
45229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45231      # a path prefixed by /cygdrive for fixpath to work.
45232      new_path="$CYGWIN_ROOT_PATH$input_path"
45233    fi
45234  fi
45235
45236
45237  if test "x$path" != "x$new_path"; then
45238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45241  fi
45242
45243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45244
45245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45246  has_colon=`$ECHO $path | $GREP ^.:`
45247  new_path="$path"
45248  if test "x$has_colon" = x; then
45249    # Not in mixed or Windows style, start by that.
45250    new_path=`cmd //c echo $path`
45251  fi
45252
45253
45254  input_path="$new_path"
45255  # Check if we need to convert this using DOS-style short mode. If the path
45256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45257  # take no chances and rewrite it.
45258  # Note: m4 eats our [], so we need to use [ and ] instead.
45259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45260  if test "x$has_forbidden_chars" != x; then
45261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45263  fi
45264
45265
45266  windows_path="$new_path"
45267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45268    unix_path=`$CYGPATH -u "$windows_path"`
45269    new_path="$unix_path"
45270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45272    new_path="$unix_path"
45273  fi
45274
45275  if test "x$path" != "x$new_path"; then
45276    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45279  fi
45280
45281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45283
45284    else
45285      # We're on a unix platform. Hooray! :)
45286      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45287      has_space=`$ECHO "$path" | $GREP " "`
45288      if test "x$has_space" != x; then
45289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45292      fi
45293
45294      # Use eval to expand a potential ~
45295      eval path="$path"
45296      if test ! -f "$path" && test ! -d "$path"; then
45297        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45298      fi
45299
45300      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45301    fi
45302  fi
45303
45304
45305  # Only process if variable expands to non-empty
45306
45307  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45309
45310  # Input might be given as Windows format, start by converting to
45311  # unix format.
45312  path="$POTENTIAL_FREETYPE_LIB_PATH"
45313  new_path=`$CYGPATH -u "$path"`
45314
45315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45318  # "foo.exe" is OK but "foo" is an error.
45319  #
45320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45321  # It is also a way to make sure we got the proper file name for the real test later on.
45322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45323  if test "x$test_shortpath" = x; then
45324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45327  fi
45328
45329  # Call helper function which possibly converts this using DOS-style short mode.
45330  # If so, the updated path is stored in $new_path.
45331
45332  input_path="$new_path"
45333  # Check if we need to convert this using DOS-style short mode. If the path
45334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45335  # take no chances and rewrite it.
45336  # Note: m4 eats our [], so we need to use [ and ] instead.
45337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45338  if test "x$has_forbidden_chars" != x; then
45339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45343      # Going to short mode and back again did indeed matter. Since short mode is
45344      # case insensitive, let's make it lowercase to improve readability.
45345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45346      # Now convert it back to Unix-style (cygpath)
45347      input_path=`$CYGPATH -u "$shortmode_path"`
45348      new_path="$input_path"
45349    fi
45350  fi
45351
45352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45353  if test "x$test_cygdrive_prefix" = x; then
45354    # As a simple fix, exclude /usr/bin since it's not a real path.
45355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45357      # a path prefixed by /cygdrive for fixpath to work.
45358      new_path="$CYGWIN_ROOT_PATH$input_path"
45359    fi
45360  fi
45361
45362
45363  if test "x$path" != "x$new_path"; then
45364    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45367  fi
45368
45369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45370
45371  path="$POTENTIAL_FREETYPE_LIB_PATH"
45372  has_colon=`$ECHO $path | $GREP ^.:`
45373  new_path="$path"
45374  if test "x$has_colon" = x; then
45375    # Not in mixed or Windows style, start by that.
45376    new_path=`cmd //c echo $path`
45377  fi
45378
45379
45380  input_path="$new_path"
45381  # Check if we need to convert this using DOS-style short mode. If the path
45382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45383  # take no chances and rewrite it.
45384  # Note: m4 eats our [], so we need to use [ and ] instead.
45385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45386  if test "x$has_forbidden_chars" != x; then
45387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45389  fi
45390
45391
45392  windows_path="$new_path"
45393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45394    unix_path=`$CYGPATH -u "$windows_path"`
45395    new_path="$unix_path"
45396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45398    new_path="$unix_path"
45399  fi
45400
45401  if test "x$path" != "x$new_path"; then
45402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45405  fi
45406
45407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45409
45410    else
45411      # We're on a unix platform. Hooray! :)
45412      path="$POTENTIAL_FREETYPE_LIB_PATH"
45413      has_space=`$ECHO "$path" | $GREP " "`
45414      if test "x$has_space" != x; then
45415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45418      fi
45419
45420      # Use eval to expand a potential ~
45421      eval path="$path"
45422      if test ! -f "$path" && test ! -d "$path"; then
45423        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45424      fi
45425
45426      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45427    fi
45428  fi
45429
45430
45431    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45433$as_echo_n "checking for freetype includes... " >&6; }
45434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45435$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45436    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45438$as_echo_n "checking for freetype libraries... " >&6; }
45439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45440$as_echo "$FREETYPE_LIB_PATH" >&6; }
45441  fi
45442
45443          if test "x$FOUND_FREETYPE" != xyes; then
45444            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45445
45446  windows_path="$FREETYPE_BASE_DIR"
45447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45448    unix_path=`$CYGPATH -u "$windows_path"`
45449    FREETYPE_BASE_DIR="$unix_path"
45450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45452    FREETYPE_BASE_DIR="$unix_path"
45453  fi
45454
45455
45456  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45457  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45458  METHOD="well-known location"
45459
45460  # Let's start with an optimistic view of the world :-)
45461  FOUND_FREETYPE=yes
45462
45463  # First look for the canonical freetype main include file ft2build.h.
45464  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45465    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45466    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45467    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45468      # Fail.
45469      FOUND_FREETYPE=no
45470    fi
45471  fi
45472
45473  if test "x$FOUND_FREETYPE" = xyes; then
45474    # Include file found, let's continue the sanity check.
45475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45476$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45477
45478    # Reset to default value
45479    FREETYPE_BASE_NAME=freetype
45480    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45481    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45482      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45483          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45484        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45485        # for the .6 version explicitly.
45486        FREETYPE_BASE_NAME=freetype.6
45487        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45488        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45489$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45490      else
45491        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45493        FOUND_FREETYPE=no
45494      fi
45495    else
45496      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45497        # On Windows, we will need both .lib and .dll file.
45498        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45499          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45500$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45501          FOUND_FREETYPE=no
45502        fi
45503      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45504          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45505        # Found lib in isa dir, use that instead.
45506        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45507        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45508$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45509      fi
45510    fi
45511  fi
45512
45513  if test "x$FOUND_FREETYPE" = xyes; then
45514
45515  # Only process if variable expands to non-empty
45516
45517  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45519
45520  # Input might be given as Windows format, start by converting to
45521  # unix format.
45522  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45523  new_path=`$CYGPATH -u "$path"`
45524
45525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45528  # "foo.exe" is OK but "foo" is an error.
45529  #
45530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45531  # It is also a way to make sure we got the proper file name for the real test later on.
45532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45533  if test "x$test_shortpath" = x; then
45534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45537  fi
45538
45539  # Call helper function which possibly converts this using DOS-style short mode.
45540  # If so, the updated path is stored in $new_path.
45541
45542  input_path="$new_path"
45543  # Check if we need to convert this using DOS-style short mode. If the path
45544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45545  # take no chances and rewrite it.
45546  # Note: m4 eats our [], so we need to use [ and ] instead.
45547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45548  if test "x$has_forbidden_chars" != x; then
45549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45553      # Going to short mode and back again did indeed matter. Since short mode is
45554      # case insensitive, let's make it lowercase to improve readability.
45555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45556      # Now convert it back to Unix-style (cygpath)
45557      input_path=`$CYGPATH -u "$shortmode_path"`
45558      new_path="$input_path"
45559    fi
45560  fi
45561
45562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45563  if test "x$test_cygdrive_prefix" = x; then
45564    # As a simple fix, exclude /usr/bin since it's not a real path.
45565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45567      # a path prefixed by /cygdrive for fixpath to work.
45568      new_path="$CYGWIN_ROOT_PATH$input_path"
45569    fi
45570  fi
45571
45572
45573  if test "x$path" != "x$new_path"; then
45574    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45577  fi
45578
45579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45580
45581  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45582  has_colon=`$ECHO $path | $GREP ^.:`
45583  new_path="$path"
45584  if test "x$has_colon" = x; then
45585    # Not in mixed or Windows style, start by that.
45586    new_path=`cmd //c echo $path`
45587  fi
45588
45589
45590  input_path="$new_path"
45591  # Check if we need to convert this using DOS-style short mode. If the path
45592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45593  # take no chances and rewrite it.
45594  # Note: m4 eats our [], so we need to use [ and ] instead.
45595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45596  if test "x$has_forbidden_chars" != x; then
45597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45599  fi
45600
45601
45602  windows_path="$new_path"
45603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45604    unix_path=`$CYGPATH -u "$windows_path"`
45605    new_path="$unix_path"
45606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45608    new_path="$unix_path"
45609  fi
45610
45611  if test "x$path" != "x$new_path"; then
45612    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45615  fi
45616
45617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45619
45620    else
45621      # We're on a unix platform. Hooray! :)
45622      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45623      has_space=`$ECHO "$path" | $GREP " "`
45624      if test "x$has_space" != x; then
45625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45628      fi
45629
45630      # Use eval to expand a potential ~
45631      eval path="$path"
45632      if test ! -f "$path" && test ! -d "$path"; then
45633        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45634      fi
45635
45636      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45637    fi
45638  fi
45639
45640
45641  # Only process if variable expands to non-empty
45642
45643  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45645
45646  # Input might be given as Windows format, start by converting to
45647  # unix format.
45648  path="$POTENTIAL_FREETYPE_LIB_PATH"
45649  new_path=`$CYGPATH -u "$path"`
45650
45651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45654  # "foo.exe" is OK but "foo" is an error.
45655  #
45656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45657  # It is also a way to make sure we got the proper file name for the real test later on.
45658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45659  if test "x$test_shortpath" = x; then
45660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45662    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45663  fi
45664
45665  # Call helper function which possibly converts this using DOS-style short mode.
45666  # If so, the updated path is stored in $new_path.
45667
45668  input_path="$new_path"
45669  # Check if we need to convert this using DOS-style short mode. If the path
45670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45671  # take no chances and rewrite it.
45672  # Note: m4 eats our [], so we need to use [ and ] instead.
45673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45674  if test "x$has_forbidden_chars" != x; then
45675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45679      # Going to short mode and back again did indeed matter. Since short mode is
45680      # case insensitive, let's make it lowercase to improve readability.
45681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45682      # Now convert it back to Unix-style (cygpath)
45683      input_path=`$CYGPATH -u "$shortmode_path"`
45684      new_path="$input_path"
45685    fi
45686  fi
45687
45688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45689  if test "x$test_cygdrive_prefix" = x; then
45690    # As a simple fix, exclude /usr/bin since it's not a real path.
45691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45693      # a path prefixed by /cygdrive for fixpath to work.
45694      new_path="$CYGWIN_ROOT_PATH$input_path"
45695    fi
45696  fi
45697
45698
45699  if test "x$path" != "x$new_path"; then
45700    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45703  fi
45704
45705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45706
45707  path="$POTENTIAL_FREETYPE_LIB_PATH"
45708  has_colon=`$ECHO $path | $GREP ^.:`
45709  new_path="$path"
45710  if test "x$has_colon" = x; then
45711    # Not in mixed or Windows style, start by that.
45712    new_path=`cmd //c echo $path`
45713  fi
45714
45715
45716  input_path="$new_path"
45717  # Check if we need to convert this using DOS-style short mode. If the path
45718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45719  # take no chances and rewrite it.
45720  # Note: m4 eats our [], so we need to use [ and ] instead.
45721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45722  if test "x$has_forbidden_chars" != x; then
45723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45725  fi
45726
45727
45728  windows_path="$new_path"
45729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45730    unix_path=`$CYGPATH -u "$windows_path"`
45731    new_path="$unix_path"
45732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45734    new_path="$unix_path"
45735  fi
45736
45737  if test "x$path" != "x$new_path"; then
45738    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45741  fi
45742
45743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45745
45746    else
45747      # We're on a unix platform. Hooray! :)
45748      path="$POTENTIAL_FREETYPE_LIB_PATH"
45749      has_space=`$ECHO "$path" | $GREP " "`
45750      if test "x$has_space" != x; then
45751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45754      fi
45755
45756      # Use eval to expand a potential ~
45757      eval path="$path"
45758      if test ! -f "$path" && test ! -d "$path"; then
45759        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45760      fi
45761
45762      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45763    fi
45764  fi
45765
45766
45767    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45769$as_echo_n "checking for freetype includes... " >&6; }
45770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45771$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45772    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45774$as_echo_n "checking for freetype libraries... " >&6; }
45775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45776$as_echo "$FREETYPE_LIB_PATH" >&6; }
45777  fi
45778
45779          fi
45780        else
45781          FREETYPE_BASE_DIR="$SYSROOT/usr"
45782
45783  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45784  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45785  METHOD="well-known location"
45786
45787  # Let's start with an optimistic view of the world :-)
45788  FOUND_FREETYPE=yes
45789
45790  # First look for the canonical freetype main include file ft2build.h.
45791  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45792    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45793    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45794    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45795      # Fail.
45796      FOUND_FREETYPE=no
45797    fi
45798  fi
45799
45800  if test "x$FOUND_FREETYPE" = xyes; then
45801    # Include file found, let's continue the sanity check.
45802    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45803$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45804
45805    # Reset to default value
45806    FREETYPE_BASE_NAME=freetype
45807    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45808    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45809      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45810          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45811        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45812        # for the .6 version explicitly.
45813        FREETYPE_BASE_NAME=freetype.6
45814        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45815        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45816$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45817      else
45818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45819$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45820        FOUND_FREETYPE=no
45821      fi
45822    else
45823      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45824        # On Windows, we will need both .lib and .dll file.
45825        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45826          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45827$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45828          FOUND_FREETYPE=no
45829        fi
45830      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45831          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45832        # Found lib in isa dir, use that instead.
45833        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45834        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45835$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45836      fi
45837    fi
45838  fi
45839
45840  if test "x$FOUND_FREETYPE" = xyes; then
45841
45842  # Only process if variable expands to non-empty
45843
45844  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846
45847  # Input might be given as Windows format, start by converting to
45848  # unix format.
45849  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45850  new_path=`$CYGPATH -u "$path"`
45851
45852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45855  # "foo.exe" is OK but "foo" is an error.
45856  #
45857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45858  # It is also a way to make sure we got the proper file name for the real test later on.
45859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45860  if test "x$test_shortpath" = x; then
45861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45863    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45864  fi
45865
45866  # Call helper function which possibly converts this using DOS-style short mode.
45867  # If so, the updated path is stored in $new_path.
45868
45869  input_path="$new_path"
45870  # Check if we need to convert this using DOS-style short mode. If the path
45871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45872  # take no chances and rewrite it.
45873  # Note: m4 eats our [], so we need to use [ and ] instead.
45874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45875  if test "x$has_forbidden_chars" != x; then
45876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45880      # Going to short mode and back again did indeed matter. Since short mode is
45881      # case insensitive, let's make it lowercase to improve readability.
45882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45883      # Now convert it back to Unix-style (cygpath)
45884      input_path=`$CYGPATH -u "$shortmode_path"`
45885      new_path="$input_path"
45886    fi
45887  fi
45888
45889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45890  if test "x$test_cygdrive_prefix" = x; then
45891    # As a simple fix, exclude /usr/bin since it's not a real path.
45892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45894      # a path prefixed by /cygdrive for fixpath to work.
45895      new_path="$CYGWIN_ROOT_PATH$input_path"
45896    fi
45897  fi
45898
45899
45900  if test "x$path" != "x$new_path"; then
45901    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45904  fi
45905
45906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45907
45908  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45909  has_colon=`$ECHO $path | $GREP ^.:`
45910  new_path="$path"
45911  if test "x$has_colon" = x; then
45912    # Not in mixed or Windows style, start by that.
45913    new_path=`cmd //c echo $path`
45914  fi
45915
45916
45917  input_path="$new_path"
45918  # Check if we need to convert this using DOS-style short mode. If the path
45919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45920  # take no chances and rewrite it.
45921  # Note: m4 eats our [], so we need to use [ and ] instead.
45922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45923  if test "x$has_forbidden_chars" != x; then
45924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45926  fi
45927
45928
45929  windows_path="$new_path"
45930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45931    unix_path=`$CYGPATH -u "$windows_path"`
45932    new_path="$unix_path"
45933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45935    new_path="$unix_path"
45936  fi
45937
45938  if test "x$path" != "x$new_path"; then
45939    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45942  fi
45943
45944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45946
45947    else
45948      # We're on a unix platform. Hooray! :)
45949      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45950      has_space=`$ECHO "$path" | $GREP " "`
45951      if test "x$has_space" != x; then
45952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45955      fi
45956
45957      # Use eval to expand a potential ~
45958      eval path="$path"
45959      if test ! -f "$path" && test ! -d "$path"; then
45960        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45961      fi
45962
45963      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45964    fi
45965  fi
45966
45967
45968  # Only process if variable expands to non-empty
45969
45970  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45972
45973  # Input might be given as Windows format, start by converting to
45974  # unix format.
45975  path="$POTENTIAL_FREETYPE_LIB_PATH"
45976  new_path=`$CYGPATH -u "$path"`
45977
45978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45981  # "foo.exe" is OK but "foo" is an error.
45982  #
45983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45984  # It is also a way to make sure we got the proper file name for the real test later on.
45985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45986  if test "x$test_shortpath" = x; then
45987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45989    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45990  fi
45991
45992  # Call helper function which possibly converts this using DOS-style short mode.
45993  # If so, the updated path is stored in $new_path.
45994
45995  input_path="$new_path"
45996  # Check if we need to convert this using DOS-style short mode. If the path
45997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45998  # take no chances and rewrite it.
45999  # Note: m4 eats our [], so we need to use [ and ] instead.
46000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46001  if test "x$has_forbidden_chars" != x; then
46002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46006      # Going to short mode and back again did indeed matter. Since short mode is
46007      # case insensitive, let's make it lowercase to improve readability.
46008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46009      # Now convert it back to Unix-style (cygpath)
46010      input_path=`$CYGPATH -u "$shortmode_path"`
46011      new_path="$input_path"
46012    fi
46013  fi
46014
46015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46016  if test "x$test_cygdrive_prefix" = x; then
46017    # As a simple fix, exclude /usr/bin since it's not a real path.
46018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46020      # a path prefixed by /cygdrive for fixpath to work.
46021      new_path="$CYGWIN_ROOT_PATH$input_path"
46022    fi
46023  fi
46024
46025
46026  if test "x$path" != "x$new_path"; then
46027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46030  fi
46031
46032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46033
46034  path="$POTENTIAL_FREETYPE_LIB_PATH"
46035  has_colon=`$ECHO $path | $GREP ^.:`
46036  new_path="$path"
46037  if test "x$has_colon" = x; then
46038    # Not in mixed or Windows style, start by that.
46039    new_path=`cmd //c echo $path`
46040  fi
46041
46042
46043  input_path="$new_path"
46044  # Check if we need to convert this using DOS-style short mode. If the path
46045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46046  # take no chances and rewrite it.
46047  # Note: m4 eats our [], so we need to use [ and ] instead.
46048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46049  if test "x$has_forbidden_chars" != x; then
46050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46052  fi
46053
46054
46055  windows_path="$new_path"
46056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46057    unix_path=`$CYGPATH -u "$windows_path"`
46058    new_path="$unix_path"
46059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46061    new_path="$unix_path"
46062  fi
46063
46064  if test "x$path" != "x$new_path"; then
46065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46068  fi
46069
46070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46072
46073    else
46074      # We're on a unix platform. Hooray! :)
46075      path="$POTENTIAL_FREETYPE_LIB_PATH"
46076      has_space=`$ECHO "$path" | $GREP " "`
46077      if test "x$has_space" != x; then
46078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46081      fi
46082
46083      # Use eval to expand a potential ~
46084      eval path="$path"
46085      if test ! -f "$path" && test ! -d "$path"; then
46086        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46087      fi
46088
46089      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46090    fi
46091  fi
46092
46093
46094    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46096$as_echo_n "checking for freetype includes... " >&6; }
46097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46098$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46099    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46101$as_echo_n "checking for freetype libraries... " >&6; }
46102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46103$as_echo "$FREETYPE_LIB_PATH" >&6; }
46104  fi
46105
46106
46107          if test "x$FOUND_FREETYPE" != xyes; then
46108            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46109
46110  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46111  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46112  METHOD="well-known location"
46113
46114  # Let's start with an optimistic view of the world :-)
46115  FOUND_FREETYPE=yes
46116
46117  # First look for the canonical freetype main include file ft2build.h.
46118  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46119    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46120    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46121    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46122      # Fail.
46123      FOUND_FREETYPE=no
46124    fi
46125  fi
46126
46127  if test "x$FOUND_FREETYPE" = xyes; then
46128    # Include file found, let's continue the sanity check.
46129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46130$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46131
46132    # Reset to default value
46133    FREETYPE_BASE_NAME=freetype
46134    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46135    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46136      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46137          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46138        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46139        # for the .6 version explicitly.
46140        FREETYPE_BASE_NAME=freetype.6
46141        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46142        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46143$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46144      else
46145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46147        FOUND_FREETYPE=no
46148      fi
46149    else
46150      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46151        # On Windows, we will need both .lib and .dll file.
46152        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46153          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46154$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46155          FOUND_FREETYPE=no
46156        fi
46157      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46158          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46159        # Found lib in isa dir, use that instead.
46160        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46161        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46162$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46163      fi
46164    fi
46165  fi
46166
46167  if test "x$FOUND_FREETYPE" = xyes; then
46168
46169  # Only process if variable expands to non-empty
46170
46171  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46173
46174  # Input might be given as Windows format, start by converting to
46175  # unix format.
46176  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46177  new_path=`$CYGPATH -u "$path"`
46178
46179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46182  # "foo.exe" is OK but "foo" is an error.
46183  #
46184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46185  # It is also a way to make sure we got the proper file name for the real test later on.
46186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46187  if test "x$test_shortpath" = x; then
46188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46190    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46191  fi
46192
46193  # Call helper function which possibly converts this using DOS-style short mode.
46194  # If so, the updated path is stored in $new_path.
46195
46196  input_path="$new_path"
46197  # Check if we need to convert this using DOS-style short mode. If the path
46198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46199  # take no chances and rewrite it.
46200  # Note: m4 eats our [], so we need to use [ and ] instead.
46201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46202  if test "x$has_forbidden_chars" != x; then
46203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46207      # Going to short mode and back again did indeed matter. Since short mode is
46208      # case insensitive, let's make it lowercase to improve readability.
46209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46210      # Now convert it back to Unix-style (cygpath)
46211      input_path=`$CYGPATH -u "$shortmode_path"`
46212      new_path="$input_path"
46213    fi
46214  fi
46215
46216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46217  if test "x$test_cygdrive_prefix" = x; then
46218    # As a simple fix, exclude /usr/bin since it's not a real path.
46219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46221      # a path prefixed by /cygdrive for fixpath to work.
46222      new_path="$CYGWIN_ROOT_PATH$input_path"
46223    fi
46224  fi
46225
46226
46227  if test "x$path" != "x$new_path"; then
46228    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46231  fi
46232
46233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46234
46235  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46236  has_colon=`$ECHO $path | $GREP ^.:`
46237  new_path="$path"
46238  if test "x$has_colon" = x; then
46239    # Not in mixed or Windows style, start by that.
46240    new_path=`cmd //c echo $path`
46241  fi
46242
46243
46244  input_path="$new_path"
46245  # Check if we need to convert this using DOS-style short mode. If the path
46246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46247  # take no chances and rewrite it.
46248  # Note: m4 eats our [], so we need to use [ and ] instead.
46249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46250  if test "x$has_forbidden_chars" != x; then
46251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46253  fi
46254
46255
46256  windows_path="$new_path"
46257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46258    unix_path=`$CYGPATH -u "$windows_path"`
46259    new_path="$unix_path"
46260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46262    new_path="$unix_path"
46263  fi
46264
46265  if test "x$path" != "x$new_path"; then
46266    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46269  fi
46270
46271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46273
46274    else
46275      # We're on a unix platform. Hooray! :)
46276      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46277      has_space=`$ECHO "$path" | $GREP " "`
46278      if test "x$has_space" != x; then
46279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46282      fi
46283
46284      # Use eval to expand a potential ~
46285      eval path="$path"
46286      if test ! -f "$path" && test ! -d "$path"; then
46287        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46288      fi
46289
46290      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46291    fi
46292  fi
46293
46294
46295  # Only process if variable expands to non-empty
46296
46297  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46299
46300  # Input might be given as Windows format, start by converting to
46301  # unix format.
46302  path="$POTENTIAL_FREETYPE_LIB_PATH"
46303  new_path=`$CYGPATH -u "$path"`
46304
46305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46308  # "foo.exe" is OK but "foo" is an error.
46309  #
46310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46311  # It is also a way to make sure we got the proper file name for the real test later on.
46312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46313  if test "x$test_shortpath" = x; then
46314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46316    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46317  fi
46318
46319  # Call helper function which possibly converts this using DOS-style short mode.
46320  # If so, the updated path is stored in $new_path.
46321
46322  input_path="$new_path"
46323  # Check if we need to convert this using DOS-style short mode. If the path
46324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46325  # take no chances and rewrite it.
46326  # Note: m4 eats our [], so we need to use [ and ] instead.
46327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46328  if test "x$has_forbidden_chars" != x; then
46329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46333      # Going to short mode and back again did indeed matter. Since short mode is
46334      # case insensitive, let's make it lowercase to improve readability.
46335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46336      # Now convert it back to Unix-style (cygpath)
46337      input_path=`$CYGPATH -u "$shortmode_path"`
46338      new_path="$input_path"
46339    fi
46340  fi
46341
46342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46343  if test "x$test_cygdrive_prefix" = x; then
46344    # As a simple fix, exclude /usr/bin since it's not a real path.
46345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46347      # a path prefixed by /cygdrive for fixpath to work.
46348      new_path="$CYGWIN_ROOT_PATH$input_path"
46349    fi
46350  fi
46351
46352
46353  if test "x$path" != "x$new_path"; then
46354    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46357  fi
46358
46359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46360
46361  path="$POTENTIAL_FREETYPE_LIB_PATH"
46362  has_colon=`$ECHO $path | $GREP ^.:`
46363  new_path="$path"
46364  if test "x$has_colon" = x; then
46365    # Not in mixed or Windows style, start by that.
46366    new_path=`cmd //c echo $path`
46367  fi
46368
46369
46370  input_path="$new_path"
46371  # Check if we need to convert this using DOS-style short mode. If the path
46372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46373  # take no chances and rewrite it.
46374  # Note: m4 eats our [], so we need to use [ and ] instead.
46375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46376  if test "x$has_forbidden_chars" != x; then
46377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46379  fi
46380
46381
46382  windows_path="$new_path"
46383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46384    unix_path=`$CYGPATH -u "$windows_path"`
46385    new_path="$unix_path"
46386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46388    new_path="$unix_path"
46389  fi
46390
46391  if test "x$path" != "x$new_path"; then
46392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46395  fi
46396
46397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46399
46400    else
46401      # We're on a unix platform. Hooray! :)
46402      path="$POTENTIAL_FREETYPE_LIB_PATH"
46403      has_space=`$ECHO "$path" | $GREP " "`
46404      if test "x$has_space" != x; then
46405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46408      fi
46409
46410      # Use eval to expand a potential ~
46411      eval path="$path"
46412      if test ! -f "$path" && test ! -d "$path"; then
46413        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46414      fi
46415
46416      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46417    fi
46418  fi
46419
46420
46421    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46423$as_echo_n "checking for freetype includes... " >&6; }
46424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46425$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46426    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46428$as_echo_n "checking for freetype libraries... " >&6; }
46429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46430$as_echo "$FREETYPE_LIB_PATH" >&6; }
46431  fi
46432
46433          fi
46434
46435          if test "x$FOUND_FREETYPE" != xyes; then
46436            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46437
46438  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46439  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46440  METHOD="well-known location"
46441
46442  # Let's start with an optimistic view of the world :-)
46443  FOUND_FREETYPE=yes
46444
46445  # First look for the canonical freetype main include file ft2build.h.
46446  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46447    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46448    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46449    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46450      # Fail.
46451      FOUND_FREETYPE=no
46452    fi
46453  fi
46454
46455  if test "x$FOUND_FREETYPE" = xyes; then
46456    # Include file found, let's continue the sanity check.
46457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46458$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46459
46460    # Reset to default value
46461    FREETYPE_BASE_NAME=freetype
46462    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46463    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46464      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46466        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46467        # for the .6 version explicitly.
46468        FREETYPE_BASE_NAME=freetype.6
46469        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46470        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46471$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46472      else
46473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46474$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46475        FOUND_FREETYPE=no
46476      fi
46477    else
46478      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46479        # On Windows, we will need both .lib and .dll file.
46480        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46481          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46483          FOUND_FREETYPE=no
46484        fi
46485      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46486          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46487        # Found lib in isa dir, use that instead.
46488        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46489        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46490$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46491      fi
46492    fi
46493  fi
46494
46495  if test "x$FOUND_FREETYPE" = xyes; then
46496
46497  # Only process if variable expands to non-empty
46498
46499  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46501
46502  # Input might be given as Windows format, start by converting to
46503  # unix format.
46504  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46505  new_path=`$CYGPATH -u "$path"`
46506
46507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46510  # "foo.exe" is OK but "foo" is an error.
46511  #
46512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46513  # It is also a way to make sure we got the proper file name for the real test later on.
46514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46515  if test "x$test_shortpath" = x; then
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46518    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46519  fi
46520
46521  # Call helper function which possibly converts this using DOS-style short mode.
46522  # If so, the updated path is stored in $new_path.
46523
46524  input_path="$new_path"
46525  # Check if we need to convert this using DOS-style short mode. If the path
46526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46527  # take no chances and rewrite it.
46528  # Note: m4 eats our [], so we need to use [ and ] instead.
46529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46530  if test "x$has_forbidden_chars" != x; then
46531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46535      # Going to short mode and back again did indeed matter. Since short mode is
46536      # case insensitive, let's make it lowercase to improve readability.
46537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46538      # Now convert it back to Unix-style (cygpath)
46539      input_path=`$CYGPATH -u "$shortmode_path"`
46540      new_path="$input_path"
46541    fi
46542  fi
46543
46544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46545  if test "x$test_cygdrive_prefix" = x; then
46546    # As a simple fix, exclude /usr/bin since it's not a real path.
46547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46549      # a path prefixed by /cygdrive for fixpath to work.
46550      new_path="$CYGWIN_ROOT_PATH$input_path"
46551    fi
46552  fi
46553
46554
46555  if test "x$path" != "x$new_path"; then
46556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46559  fi
46560
46561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46562
46563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46564  has_colon=`$ECHO $path | $GREP ^.:`
46565  new_path="$path"
46566  if test "x$has_colon" = x; then
46567    # Not in mixed or Windows style, start by that.
46568    new_path=`cmd //c echo $path`
46569  fi
46570
46571
46572  input_path="$new_path"
46573  # Check if we need to convert this using DOS-style short mode. If the path
46574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46575  # take no chances and rewrite it.
46576  # Note: m4 eats our [], so we need to use [ and ] instead.
46577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46578  if test "x$has_forbidden_chars" != x; then
46579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46581  fi
46582
46583
46584  windows_path="$new_path"
46585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46586    unix_path=`$CYGPATH -u "$windows_path"`
46587    new_path="$unix_path"
46588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46590    new_path="$unix_path"
46591  fi
46592
46593  if test "x$path" != "x$new_path"; then
46594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46597  fi
46598
46599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46601
46602    else
46603      # We're on a unix platform. Hooray! :)
46604      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46605      has_space=`$ECHO "$path" | $GREP " "`
46606      if test "x$has_space" != x; then
46607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46610      fi
46611
46612      # Use eval to expand a potential ~
46613      eval path="$path"
46614      if test ! -f "$path" && test ! -d "$path"; then
46615        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46616      fi
46617
46618      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46619    fi
46620  fi
46621
46622
46623  # Only process if variable expands to non-empty
46624
46625  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46627
46628  # Input might be given as Windows format, start by converting to
46629  # unix format.
46630  path="$POTENTIAL_FREETYPE_LIB_PATH"
46631  new_path=`$CYGPATH -u "$path"`
46632
46633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46636  # "foo.exe" is OK but "foo" is an error.
46637  #
46638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46639  # It is also a way to make sure we got the proper file name for the real test later on.
46640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46641  if test "x$test_shortpath" = x; then
46642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46645  fi
46646
46647  # Call helper function which possibly converts this using DOS-style short mode.
46648  # If so, the updated path is stored in $new_path.
46649
46650  input_path="$new_path"
46651  # Check if we need to convert this using DOS-style short mode. If the path
46652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46653  # take no chances and rewrite it.
46654  # Note: m4 eats our [], so we need to use [ and ] instead.
46655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46656  if test "x$has_forbidden_chars" != x; then
46657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46661      # Going to short mode and back again did indeed matter. Since short mode is
46662      # case insensitive, let's make it lowercase to improve readability.
46663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46664      # Now convert it back to Unix-style (cygpath)
46665      input_path=`$CYGPATH -u "$shortmode_path"`
46666      new_path="$input_path"
46667    fi
46668  fi
46669
46670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46671  if test "x$test_cygdrive_prefix" = x; then
46672    # As a simple fix, exclude /usr/bin since it's not a real path.
46673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46675      # a path prefixed by /cygdrive for fixpath to work.
46676      new_path="$CYGWIN_ROOT_PATH$input_path"
46677    fi
46678  fi
46679
46680
46681  if test "x$path" != "x$new_path"; then
46682    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46685  fi
46686
46687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46688
46689  path="$POTENTIAL_FREETYPE_LIB_PATH"
46690  has_colon=`$ECHO $path | $GREP ^.:`
46691  new_path="$path"
46692  if test "x$has_colon" = x; then
46693    # Not in mixed or Windows style, start by that.
46694    new_path=`cmd //c echo $path`
46695  fi
46696
46697
46698  input_path="$new_path"
46699  # Check if we need to convert this using DOS-style short mode. If the path
46700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46701  # take no chances and rewrite it.
46702  # Note: m4 eats our [], so we need to use [ and ] instead.
46703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46704  if test "x$has_forbidden_chars" != x; then
46705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46707  fi
46708
46709
46710  windows_path="$new_path"
46711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46712    unix_path=`$CYGPATH -u "$windows_path"`
46713    new_path="$unix_path"
46714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46716    new_path="$unix_path"
46717  fi
46718
46719  if test "x$path" != "x$new_path"; then
46720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46723  fi
46724
46725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46727
46728    else
46729      # We're on a unix platform. Hooray! :)
46730      path="$POTENTIAL_FREETYPE_LIB_PATH"
46731      has_space=`$ECHO "$path" | $GREP " "`
46732      if test "x$has_space" != x; then
46733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46736      fi
46737
46738      # Use eval to expand a potential ~
46739      eval path="$path"
46740      if test ! -f "$path" && test ! -d "$path"; then
46741        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46742      fi
46743
46744      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46745    fi
46746  fi
46747
46748
46749    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46751$as_echo_n "checking for freetype includes... " >&6; }
46752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46753$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46754    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46756$as_echo_n "checking for freetype libraries... " >&6; }
46757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46758$as_echo "$FREETYPE_LIB_PATH" >&6; }
46759  fi
46760
46761          fi
46762
46763          if test "x$FOUND_FREETYPE" != xyes; then
46764            FREETYPE_BASE_DIR="$SYSROOT/usr"
46765            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46766
46767  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46768  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46769  METHOD="well-known location"
46770
46771  # Let's start with an optimistic view of the world :-)
46772  FOUND_FREETYPE=yes
46773
46774  # First look for the canonical freetype main include file ft2build.h.
46775  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46776    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46777    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46778    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46779      # Fail.
46780      FOUND_FREETYPE=no
46781    fi
46782  fi
46783
46784  if test "x$FOUND_FREETYPE" = xyes; then
46785    # Include file found, let's continue the sanity check.
46786    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46787$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46788
46789    # Reset to default value
46790    FREETYPE_BASE_NAME=freetype
46791    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46792    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46793      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46794          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46795        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46796        # for the .6 version explicitly.
46797        FREETYPE_BASE_NAME=freetype.6
46798        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46799        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46800$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46801      else
46802        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46803$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46804        FOUND_FREETYPE=no
46805      fi
46806    else
46807      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46808        # On Windows, we will need both .lib and .dll file.
46809        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46810          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46811$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46812          FOUND_FREETYPE=no
46813        fi
46814      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46815          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46816        # Found lib in isa dir, use that instead.
46817        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46818        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46819$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46820      fi
46821    fi
46822  fi
46823
46824  if test "x$FOUND_FREETYPE" = xyes; then
46825
46826  # Only process if variable expands to non-empty
46827
46828  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46830
46831  # Input might be given as Windows format, start by converting to
46832  # unix format.
46833  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46834  new_path=`$CYGPATH -u "$path"`
46835
46836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46839  # "foo.exe" is OK but "foo" is an error.
46840  #
46841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46842  # It is also a way to make sure we got the proper file name for the real test later on.
46843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46844  if test "x$test_shortpath" = x; then
46845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46846$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46847    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46848  fi
46849
46850  # Call helper function which possibly converts this using DOS-style short mode.
46851  # If so, the updated path is stored in $new_path.
46852
46853  input_path="$new_path"
46854  # Check if we need to convert this using DOS-style short mode. If the path
46855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46856  # take no chances and rewrite it.
46857  # Note: m4 eats our [], so we need to use [ and ] instead.
46858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46859  if test "x$has_forbidden_chars" != x; then
46860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46864      # Going to short mode and back again did indeed matter. Since short mode is
46865      # case insensitive, let's make it lowercase to improve readability.
46866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46867      # Now convert it back to Unix-style (cygpath)
46868      input_path=`$CYGPATH -u "$shortmode_path"`
46869      new_path="$input_path"
46870    fi
46871  fi
46872
46873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46874  if test "x$test_cygdrive_prefix" = x; then
46875    # As a simple fix, exclude /usr/bin since it's not a real path.
46876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46878      # a path prefixed by /cygdrive for fixpath to work.
46879      new_path="$CYGWIN_ROOT_PATH$input_path"
46880    fi
46881  fi
46882
46883
46884  if test "x$path" != "x$new_path"; then
46885    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46888  fi
46889
46890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46891
46892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46893  has_colon=`$ECHO $path | $GREP ^.:`
46894  new_path="$path"
46895  if test "x$has_colon" = x; then
46896    # Not in mixed or Windows style, start by that.
46897    new_path=`cmd //c echo $path`
46898  fi
46899
46900
46901  input_path="$new_path"
46902  # Check if we need to convert this using DOS-style short mode. If the path
46903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46904  # take no chances and rewrite it.
46905  # Note: m4 eats our [], so we need to use [ and ] instead.
46906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46907  if test "x$has_forbidden_chars" != x; then
46908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46910  fi
46911
46912
46913  windows_path="$new_path"
46914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46915    unix_path=`$CYGPATH -u "$windows_path"`
46916    new_path="$unix_path"
46917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46919    new_path="$unix_path"
46920  fi
46921
46922  if test "x$path" != "x$new_path"; then
46923    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46926  fi
46927
46928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46930
46931    else
46932      # We're on a unix platform. Hooray! :)
46933      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46934      has_space=`$ECHO "$path" | $GREP " "`
46935      if test "x$has_space" != x; then
46936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46937$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46939      fi
46940
46941      # Use eval to expand a potential ~
46942      eval path="$path"
46943      if test ! -f "$path" && test ! -d "$path"; then
46944        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46945      fi
46946
46947      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46948    fi
46949  fi
46950
46951
46952  # Only process if variable expands to non-empty
46953
46954  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46956
46957  # Input might be given as Windows format, start by converting to
46958  # unix format.
46959  path="$POTENTIAL_FREETYPE_LIB_PATH"
46960  new_path=`$CYGPATH -u "$path"`
46961
46962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46965  # "foo.exe" is OK but "foo" is an error.
46966  #
46967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46968  # It is also a way to make sure we got the proper file name for the real test later on.
46969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46970  if test "x$test_shortpath" = x; then
46971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46973    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46974  fi
46975
46976  # Call helper function which possibly converts this using DOS-style short mode.
46977  # If so, the updated path is stored in $new_path.
46978
46979  input_path="$new_path"
46980  # Check if we need to convert this using DOS-style short mode. If the path
46981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46982  # take no chances and rewrite it.
46983  # Note: m4 eats our [], so we need to use [ and ] instead.
46984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46985  if test "x$has_forbidden_chars" != x; then
46986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46990      # Going to short mode and back again did indeed matter. Since short mode is
46991      # case insensitive, let's make it lowercase to improve readability.
46992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46993      # Now convert it back to Unix-style (cygpath)
46994      input_path=`$CYGPATH -u "$shortmode_path"`
46995      new_path="$input_path"
46996    fi
46997  fi
46998
46999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47000  if test "x$test_cygdrive_prefix" = x; then
47001    # As a simple fix, exclude /usr/bin since it's not a real path.
47002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47004      # a path prefixed by /cygdrive for fixpath to work.
47005      new_path="$CYGWIN_ROOT_PATH$input_path"
47006    fi
47007  fi
47008
47009
47010  if test "x$path" != "x$new_path"; then
47011    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47014  fi
47015
47016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47017
47018  path="$POTENTIAL_FREETYPE_LIB_PATH"
47019  has_colon=`$ECHO $path | $GREP ^.:`
47020  new_path="$path"
47021  if test "x$has_colon" = x; then
47022    # Not in mixed or Windows style, start by that.
47023    new_path=`cmd //c echo $path`
47024  fi
47025
47026
47027  input_path="$new_path"
47028  # Check if we need to convert this using DOS-style short mode. If the path
47029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47030  # take no chances and rewrite it.
47031  # Note: m4 eats our [], so we need to use [ and ] instead.
47032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47033  if test "x$has_forbidden_chars" != x; then
47034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47036  fi
47037
47038
47039  windows_path="$new_path"
47040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47041    unix_path=`$CYGPATH -u "$windows_path"`
47042    new_path="$unix_path"
47043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47045    new_path="$unix_path"
47046  fi
47047
47048  if test "x$path" != "x$new_path"; then
47049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47052  fi
47053
47054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47056
47057    else
47058      # We're on a unix platform. Hooray! :)
47059      path="$POTENTIAL_FREETYPE_LIB_PATH"
47060      has_space=`$ECHO "$path" | $GREP " "`
47061      if test "x$has_space" != x; then
47062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47065      fi
47066
47067      # Use eval to expand a potential ~
47068      eval path="$path"
47069      if test ! -f "$path" && test ! -d "$path"; then
47070        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47071      fi
47072
47073      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47074    fi
47075  fi
47076
47077
47078    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47080$as_echo_n "checking for freetype includes... " >&6; }
47081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47082$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47083    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47085$as_echo_n "checking for freetype libraries... " >&6; }
47086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47087$as_echo "$FREETYPE_LIB_PATH" >&6; }
47088  fi
47089
47090            else
47091
47092  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47093  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47094  METHOD="well-known location"
47095
47096  # Let's start with an optimistic view of the world :-)
47097  FOUND_FREETYPE=yes
47098
47099  # First look for the canonical freetype main include file ft2build.h.
47100  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47101    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47102    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47103    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47104      # Fail.
47105      FOUND_FREETYPE=no
47106    fi
47107  fi
47108
47109  if test "x$FOUND_FREETYPE" = xyes; then
47110    # Include file found, let's continue the sanity check.
47111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47113
47114    # Reset to default value
47115    FREETYPE_BASE_NAME=freetype
47116    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47117    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47118      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47120        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47121        # for the .6 version explicitly.
47122        FREETYPE_BASE_NAME=freetype.6
47123        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47124        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47125$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47126      else
47127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47128$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47129        FOUND_FREETYPE=no
47130      fi
47131    else
47132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47133        # On Windows, we will need both .lib and .dll file.
47134        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47135          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47137          FOUND_FREETYPE=no
47138        fi
47139      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47141        # Found lib in isa dir, use that instead.
47142        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47143        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47144$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47145      fi
47146    fi
47147  fi
47148
47149  if test "x$FOUND_FREETYPE" = xyes; then
47150
47151  # Only process if variable expands to non-empty
47152
47153  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47155
47156  # Input might be given as Windows format, start by converting to
47157  # unix format.
47158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47159  new_path=`$CYGPATH -u "$path"`
47160
47161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47164  # "foo.exe" is OK but "foo" is an error.
47165  #
47166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47167  # It is also a way to make sure we got the proper file name for the real test later on.
47168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47169  if test "x$test_shortpath" = x; then
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47173  fi
47174
47175  # Call helper function which possibly converts this using DOS-style short mode.
47176  # If so, the updated path is stored in $new_path.
47177
47178  input_path="$new_path"
47179  # Check if we need to convert this using DOS-style short mode. If the path
47180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47181  # take no chances and rewrite it.
47182  # Note: m4 eats our [], so we need to use [ and ] instead.
47183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47184  if test "x$has_forbidden_chars" != x; then
47185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47189      # Going to short mode and back again did indeed matter. Since short mode is
47190      # case insensitive, let's make it lowercase to improve readability.
47191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47192      # Now convert it back to Unix-style (cygpath)
47193      input_path=`$CYGPATH -u "$shortmode_path"`
47194      new_path="$input_path"
47195    fi
47196  fi
47197
47198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47199  if test "x$test_cygdrive_prefix" = x; then
47200    # As a simple fix, exclude /usr/bin since it's not a real path.
47201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47203      # a path prefixed by /cygdrive for fixpath to work.
47204      new_path="$CYGWIN_ROOT_PATH$input_path"
47205    fi
47206  fi
47207
47208
47209  if test "x$path" != "x$new_path"; then
47210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47213  fi
47214
47215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47216
47217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47218  has_colon=`$ECHO $path | $GREP ^.:`
47219  new_path="$path"
47220  if test "x$has_colon" = x; then
47221    # Not in mixed or Windows style, start by that.
47222    new_path=`cmd //c echo $path`
47223  fi
47224
47225
47226  input_path="$new_path"
47227  # Check if we need to convert this using DOS-style short mode. If the path
47228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47229  # take no chances and rewrite it.
47230  # Note: m4 eats our [], so we need to use [ and ] instead.
47231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47232  if test "x$has_forbidden_chars" != x; then
47233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47235  fi
47236
47237
47238  windows_path="$new_path"
47239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47240    unix_path=`$CYGPATH -u "$windows_path"`
47241    new_path="$unix_path"
47242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47244    new_path="$unix_path"
47245  fi
47246
47247  if test "x$path" != "x$new_path"; then
47248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47251  fi
47252
47253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47255
47256    else
47257      # We're on a unix platform. Hooray! :)
47258      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47259      has_space=`$ECHO "$path" | $GREP " "`
47260      if test "x$has_space" != x; then
47261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47264      fi
47265
47266      # Use eval to expand a potential ~
47267      eval path="$path"
47268      if test ! -f "$path" && test ! -d "$path"; then
47269        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47270      fi
47271
47272      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47273    fi
47274  fi
47275
47276
47277  # Only process if variable expands to non-empty
47278
47279  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47281
47282  # Input might be given as Windows format, start by converting to
47283  # unix format.
47284  path="$POTENTIAL_FREETYPE_LIB_PATH"
47285  new_path=`$CYGPATH -u "$path"`
47286
47287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47290  # "foo.exe" is OK but "foo" is an error.
47291  #
47292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47293  # It is also a way to make sure we got the proper file name for the real test later on.
47294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47295  if test "x$test_shortpath" = x; then
47296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47298    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47299  fi
47300
47301  # Call helper function which possibly converts this using DOS-style short mode.
47302  # If so, the updated path is stored in $new_path.
47303
47304  input_path="$new_path"
47305  # Check if we need to convert this using DOS-style short mode. If the path
47306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47307  # take no chances and rewrite it.
47308  # Note: m4 eats our [], so we need to use [ and ] instead.
47309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47310  if test "x$has_forbidden_chars" != x; then
47311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47315      # Going to short mode and back again did indeed matter. Since short mode is
47316      # case insensitive, let's make it lowercase to improve readability.
47317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47318      # Now convert it back to Unix-style (cygpath)
47319      input_path=`$CYGPATH -u "$shortmode_path"`
47320      new_path="$input_path"
47321    fi
47322  fi
47323
47324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47325  if test "x$test_cygdrive_prefix" = x; then
47326    # As a simple fix, exclude /usr/bin since it's not a real path.
47327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47329      # a path prefixed by /cygdrive for fixpath to work.
47330      new_path="$CYGWIN_ROOT_PATH$input_path"
47331    fi
47332  fi
47333
47334
47335  if test "x$path" != "x$new_path"; then
47336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47339  fi
47340
47341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47342
47343  path="$POTENTIAL_FREETYPE_LIB_PATH"
47344  has_colon=`$ECHO $path | $GREP ^.:`
47345  new_path="$path"
47346  if test "x$has_colon" = x; then
47347    # Not in mixed or Windows style, start by that.
47348    new_path=`cmd //c echo $path`
47349  fi
47350
47351
47352  input_path="$new_path"
47353  # Check if we need to convert this using DOS-style short mode. If the path
47354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47355  # take no chances and rewrite it.
47356  # Note: m4 eats our [], so we need to use [ and ] instead.
47357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47358  if test "x$has_forbidden_chars" != x; then
47359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47361  fi
47362
47363
47364  windows_path="$new_path"
47365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47366    unix_path=`$CYGPATH -u "$windows_path"`
47367    new_path="$unix_path"
47368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47370    new_path="$unix_path"
47371  fi
47372
47373  if test "x$path" != "x$new_path"; then
47374    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47377  fi
47378
47379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47381
47382    else
47383      # We're on a unix platform. Hooray! :)
47384      path="$POTENTIAL_FREETYPE_LIB_PATH"
47385      has_space=`$ECHO "$path" | $GREP " "`
47386      if test "x$has_space" != x; then
47387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47390      fi
47391
47392      # Use eval to expand a potential ~
47393      eval path="$path"
47394      if test ! -f "$path" && test ! -d "$path"; then
47395        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47396      fi
47397
47398      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47399    fi
47400  fi
47401
47402
47403    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47405$as_echo_n "checking for freetype includes... " >&6; }
47406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47407$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47408    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47410$as_echo_n "checking for freetype libraries... " >&6; }
47411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47412$as_echo "$FREETYPE_LIB_PATH" >&6; }
47413  fi
47414
47415              if test "x$FOUND_FREETYPE" != xyes; then
47416
47417  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47418  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47419  METHOD="well-known location"
47420
47421  # Let's start with an optimistic view of the world :-)
47422  FOUND_FREETYPE=yes
47423
47424  # First look for the canonical freetype main include file ft2build.h.
47425  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47426    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47427    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47428    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47429      # Fail.
47430      FOUND_FREETYPE=no
47431    fi
47432  fi
47433
47434  if test "x$FOUND_FREETYPE" = xyes; then
47435    # Include file found, let's continue the sanity check.
47436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47437$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47438
47439    # Reset to default value
47440    FREETYPE_BASE_NAME=freetype
47441    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47442    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47443      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47444          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47445        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47446        # for the .6 version explicitly.
47447        FREETYPE_BASE_NAME=freetype.6
47448        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47449        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47450$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47451      else
47452        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47453$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47454        FOUND_FREETYPE=no
47455      fi
47456    else
47457      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47458        # On Windows, we will need both .lib and .dll file.
47459        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47460          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47461$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47462          FOUND_FREETYPE=no
47463        fi
47464      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47466        # Found lib in isa dir, use that instead.
47467        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47468        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47469$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47470      fi
47471    fi
47472  fi
47473
47474  if test "x$FOUND_FREETYPE" = xyes; then
47475
47476  # Only process if variable expands to non-empty
47477
47478  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47480
47481  # Input might be given as Windows format, start by converting to
47482  # unix format.
47483  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47484  new_path=`$CYGPATH -u "$path"`
47485
47486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47489  # "foo.exe" is OK but "foo" is an error.
47490  #
47491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47492  # It is also a way to make sure we got the proper file name for the real test later on.
47493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47494  if test "x$test_shortpath" = x; then
47495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47497    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47498  fi
47499
47500  # Call helper function which possibly converts this using DOS-style short mode.
47501  # If so, the updated path is stored in $new_path.
47502
47503  input_path="$new_path"
47504  # Check if we need to convert this using DOS-style short mode. If the path
47505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47506  # take no chances and rewrite it.
47507  # Note: m4 eats our [], so we need to use [ and ] instead.
47508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47509  if test "x$has_forbidden_chars" != x; then
47510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47514      # Going to short mode and back again did indeed matter. Since short mode is
47515      # case insensitive, let's make it lowercase to improve readability.
47516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47517      # Now convert it back to Unix-style (cygpath)
47518      input_path=`$CYGPATH -u "$shortmode_path"`
47519      new_path="$input_path"
47520    fi
47521  fi
47522
47523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47524  if test "x$test_cygdrive_prefix" = x; then
47525    # As a simple fix, exclude /usr/bin since it's not a real path.
47526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47528      # a path prefixed by /cygdrive for fixpath to work.
47529      new_path="$CYGWIN_ROOT_PATH$input_path"
47530    fi
47531  fi
47532
47533
47534  if test "x$path" != "x$new_path"; then
47535    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47537$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47538  fi
47539
47540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47541
47542  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47543  has_colon=`$ECHO $path | $GREP ^.:`
47544  new_path="$path"
47545  if test "x$has_colon" = x; then
47546    # Not in mixed or Windows style, start by that.
47547    new_path=`cmd //c echo $path`
47548  fi
47549
47550
47551  input_path="$new_path"
47552  # Check if we need to convert this using DOS-style short mode. If the path
47553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47554  # take no chances and rewrite it.
47555  # Note: m4 eats our [], so we need to use [ and ] instead.
47556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47557  if test "x$has_forbidden_chars" != x; then
47558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47560  fi
47561
47562
47563  windows_path="$new_path"
47564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47565    unix_path=`$CYGPATH -u "$windows_path"`
47566    new_path="$unix_path"
47567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47569    new_path="$unix_path"
47570  fi
47571
47572  if test "x$path" != "x$new_path"; then
47573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47576  fi
47577
47578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47580
47581    else
47582      # We're on a unix platform. Hooray! :)
47583      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47584      has_space=`$ECHO "$path" | $GREP " "`
47585      if test "x$has_space" != x; then
47586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47587$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47588        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47589      fi
47590
47591      # Use eval to expand a potential ~
47592      eval path="$path"
47593      if test ! -f "$path" && test ! -d "$path"; then
47594        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47595      fi
47596
47597      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47598    fi
47599  fi
47600
47601
47602  # Only process if variable expands to non-empty
47603
47604  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47606
47607  # Input might be given as Windows format, start by converting to
47608  # unix format.
47609  path="$POTENTIAL_FREETYPE_LIB_PATH"
47610  new_path=`$CYGPATH -u "$path"`
47611
47612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47615  # "foo.exe" is OK but "foo" is an error.
47616  #
47617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47618  # It is also a way to make sure we got the proper file name for the real test later on.
47619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47620  if test "x$test_shortpath" = x; then
47621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47624  fi
47625
47626  # Call helper function which possibly converts this using DOS-style short mode.
47627  # If so, the updated path is stored in $new_path.
47628
47629  input_path="$new_path"
47630  # Check if we need to convert this using DOS-style short mode. If the path
47631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47632  # take no chances and rewrite it.
47633  # Note: m4 eats our [], so we need to use [ and ] instead.
47634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47635  if test "x$has_forbidden_chars" != x; then
47636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47640      # Going to short mode and back again did indeed matter. Since short mode is
47641      # case insensitive, let's make it lowercase to improve readability.
47642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47643      # Now convert it back to Unix-style (cygpath)
47644      input_path=`$CYGPATH -u "$shortmode_path"`
47645      new_path="$input_path"
47646    fi
47647  fi
47648
47649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47650  if test "x$test_cygdrive_prefix" = x; then
47651    # As a simple fix, exclude /usr/bin since it's not a real path.
47652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47654      # a path prefixed by /cygdrive for fixpath to work.
47655      new_path="$CYGWIN_ROOT_PATH$input_path"
47656    fi
47657  fi
47658
47659
47660  if test "x$path" != "x$new_path"; then
47661    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47664  fi
47665
47666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47667
47668  path="$POTENTIAL_FREETYPE_LIB_PATH"
47669  has_colon=`$ECHO $path | $GREP ^.:`
47670  new_path="$path"
47671  if test "x$has_colon" = x; then
47672    # Not in mixed or Windows style, start by that.
47673    new_path=`cmd //c echo $path`
47674  fi
47675
47676
47677  input_path="$new_path"
47678  # Check if we need to convert this using DOS-style short mode. If the path
47679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47680  # take no chances and rewrite it.
47681  # Note: m4 eats our [], so we need to use [ and ] instead.
47682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47683  if test "x$has_forbidden_chars" != x; then
47684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47686  fi
47687
47688
47689  windows_path="$new_path"
47690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47691    unix_path=`$CYGPATH -u "$windows_path"`
47692    new_path="$unix_path"
47693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47695    new_path="$unix_path"
47696  fi
47697
47698  if test "x$path" != "x$new_path"; then
47699    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47702  fi
47703
47704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47706
47707    else
47708      # We're on a unix platform. Hooray! :)
47709      path="$POTENTIAL_FREETYPE_LIB_PATH"
47710      has_space=`$ECHO "$path" | $GREP " "`
47711      if test "x$has_space" != x; then
47712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47715      fi
47716
47717      # Use eval to expand a potential ~
47718      eval path="$path"
47719      if test ! -f "$path" && test ! -d "$path"; then
47720        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47721      fi
47722
47723      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47724    fi
47725  fi
47726
47727
47728    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47730$as_echo_n "checking for freetype includes... " >&6; }
47731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47732$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47733    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47735$as_echo_n "checking for freetype libraries... " >&6; }
47736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47737$as_echo "$FREETYPE_LIB_PATH" >&6; }
47738  fi
47739
47740              fi
47741            fi
47742          fi
47743        fi
47744      fi # end check in well-known locations
47745
47746      if test "x$FOUND_FREETYPE" != xyes; then
47747
47748  # Print a helpful message on how to acquire the necessary build dependency.
47749  # freetype is the help tag: freetype, cups, pulse, alsa etc
47750  MISSING_DEPENDENCY=freetype
47751
47752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47753    cygwin_help $MISSING_DEPENDENCY
47754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47755    msys_help $MISSING_DEPENDENCY
47756  else
47757    PKGHANDLER_COMMAND=
47758
47759    case $PKGHANDLER in
47760      apt-get)
47761        apt_help     $MISSING_DEPENDENCY ;;
47762      yum)
47763        yum_help     $MISSING_DEPENDENCY ;;
47764      port)
47765        port_help    $MISSING_DEPENDENCY ;;
47766      pkgutil)
47767        pkgutil_help $MISSING_DEPENDENCY ;;
47768      pkgadd)
47769        pkgadd_help  $MISSING_DEPENDENCY ;;
47770    esac
47771
47772    if test "x$PKGHANDLER_COMMAND" != x; then
47773      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47774    fi
47775  fi
47776
47777        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47778      fi
47779    fi # end user specified settings
47780
47781    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47782    if test "x$FREETYPE_CFLAGS" = x; then
47783
47784  # Only process if variable expands to non-empty
47785
47786  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47788
47789  # Input might be given as Windows format, start by converting to
47790  # unix format.
47791  path="$FREETYPE_INCLUDE_PATH"
47792  new_path=`$CYGPATH -u "$path"`
47793
47794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47797  # "foo.exe" is OK but "foo" is an error.
47798  #
47799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47800  # It is also a way to make sure we got the proper file name for the real test later on.
47801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47802  if test "x$test_shortpath" = x; then
47803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47804$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47805    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47806  fi
47807
47808  # Call helper function which possibly converts this using DOS-style short mode.
47809  # If so, the updated path is stored in $new_path.
47810
47811  input_path="$new_path"
47812  # Check if we need to convert this using DOS-style short mode. If the path
47813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47814  # take no chances and rewrite it.
47815  # Note: m4 eats our [], so we need to use [ and ] instead.
47816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47817  if test "x$has_forbidden_chars" != x; then
47818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47822      # Going to short mode and back again did indeed matter. Since short mode is
47823      # case insensitive, let's make it lowercase to improve readability.
47824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47825      # Now convert it back to Unix-style (cygpath)
47826      input_path=`$CYGPATH -u "$shortmode_path"`
47827      new_path="$input_path"
47828    fi
47829  fi
47830
47831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47832  if test "x$test_cygdrive_prefix" = x; then
47833    # As a simple fix, exclude /usr/bin since it's not a real path.
47834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47836      # a path prefixed by /cygdrive for fixpath to work.
47837      new_path="$CYGWIN_ROOT_PATH$input_path"
47838    fi
47839  fi
47840
47841
47842  if test "x$path" != "x$new_path"; then
47843    FREETYPE_INCLUDE_PATH="$new_path"
47844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47845$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47846  fi
47847
47848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47849
47850  path="$FREETYPE_INCLUDE_PATH"
47851  has_colon=`$ECHO $path | $GREP ^.:`
47852  new_path="$path"
47853  if test "x$has_colon" = x; then
47854    # Not in mixed or Windows style, start by that.
47855    new_path=`cmd //c echo $path`
47856  fi
47857
47858
47859  input_path="$new_path"
47860  # Check if we need to convert this using DOS-style short mode. If the path
47861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47862  # take no chances and rewrite it.
47863  # Note: m4 eats our [], so we need to use [ and ] instead.
47864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47865  if test "x$has_forbidden_chars" != x; then
47866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47868  fi
47869
47870
47871  windows_path="$new_path"
47872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47873    unix_path=`$CYGPATH -u "$windows_path"`
47874    new_path="$unix_path"
47875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47877    new_path="$unix_path"
47878  fi
47879
47880  if test "x$path" != "x$new_path"; then
47881    FREETYPE_INCLUDE_PATH="$new_path"
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47883$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47884  fi
47885
47886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47888
47889    else
47890      # We're on a unix platform. Hooray! :)
47891      path="$FREETYPE_INCLUDE_PATH"
47892      has_space=`$ECHO "$path" | $GREP " "`
47893      if test "x$has_space" != x; then
47894        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47895$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47896        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47897      fi
47898
47899      # Use eval to expand a potential ~
47900      eval path="$path"
47901      if test ! -f "$path" && test ! -d "$path"; then
47902        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47903      fi
47904
47905      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47906    fi
47907  fi
47908
47909      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47910        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47911      else
47912        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47913      fi
47914    fi
47915
47916    if test "x$FREETYPE_LIBS" = x; then
47917
47918  # Only process if variable expands to non-empty
47919
47920  if test "x$FREETYPE_LIB_PATH" != x; then
47921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47922
47923  # Input might be given as Windows format, start by converting to
47924  # unix format.
47925  path="$FREETYPE_LIB_PATH"
47926  new_path=`$CYGPATH -u "$path"`
47927
47928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47931  # "foo.exe" is OK but "foo" is an error.
47932  #
47933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47934  # It is also a way to make sure we got the proper file name for the real test later on.
47935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47936  if test "x$test_shortpath" = x; then
47937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47938$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47939    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47940  fi
47941
47942  # Call helper function which possibly converts this using DOS-style short mode.
47943  # If so, the updated path is stored in $new_path.
47944
47945  input_path="$new_path"
47946  # Check if we need to convert this using DOS-style short mode. If the path
47947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47948  # take no chances and rewrite it.
47949  # Note: m4 eats our [], so we need to use [ and ] instead.
47950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47951  if test "x$has_forbidden_chars" != x; then
47952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47956      # Going to short mode and back again did indeed matter. Since short mode is
47957      # case insensitive, let's make it lowercase to improve readability.
47958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47959      # Now convert it back to Unix-style (cygpath)
47960      input_path=`$CYGPATH -u "$shortmode_path"`
47961      new_path="$input_path"
47962    fi
47963  fi
47964
47965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47966  if test "x$test_cygdrive_prefix" = x; then
47967    # As a simple fix, exclude /usr/bin since it's not a real path.
47968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47970      # a path prefixed by /cygdrive for fixpath to work.
47971      new_path="$CYGWIN_ROOT_PATH$input_path"
47972    fi
47973  fi
47974
47975
47976  if test "x$path" != "x$new_path"; then
47977    FREETYPE_LIB_PATH="$new_path"
47978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47979$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47980  fi
47981
47982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47983
47984  path="$FREETYPE_LIB_PATH"
47985  has_colon=`$ECHO $path | $GREP ^.:`
47986  new_path="$path"
47987  if test "x$has_colon" = x; then
47988    # Not in mixed or Windows style, start by that.
47989    new_path=`cmd //c echo $path`
47990  fi
47991
47992
47993  input_path="$new_path"
47994  # Check if we need to convert this using DOS-style short mode. If the path
47995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47996  # take no chances and rewrite it.
47997  # Note: m4 eats our [], so we need to use [ and ] instead.
47998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47999  if test "x$has_forbidden_chars" != x; then
48000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48002  fi
48003
48004
48005  windows_path="$new_path"
48006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48007    unix_path=`$CYGPATH -u "$windows_path"`
48008    new_path="$unix_path"
48009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48011    new_path="$unix_path"
48012  fi
48013
48014  if test "x$path" != "x$new_path"; then
48015    FREETYPE_LIB_PATH="$new_path"
48016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48017$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48018  fi
48019
48020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48022
48023    else
48024      # We're on a unix platform. Hooray! :)
48025      path="$FREETYPE_LIB_PATH"
48026      has_space=`$ECHO "$path" | $GREP " "`
48027      if test "x$has_space" != x; then
48028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48029$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48031      fi
48032
48033      # Use eval to expand a potential ~
48034      eval path="$path"
48035      if test ! -f "$path" && test ! -d "$path"; then
48036        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48037      fi
48038
48039      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48040    fi
48041  fi
48042
48043      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48044        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48045      else
48046        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48047      fi
48048    fi
48049
48050    # Try to compile it
48051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48052$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48053    ac_ext=cpp
48054ac_cpp='$CXXCPP $CPPFLAGS'
48055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48058
48059    PREV_CXXCFLAGS="$CXXFLAGS"
48060    PREV_LIBS="$LIBS"
48061    PREV_CXX="$CXX"
48062    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48063    LIBS="$LIBS $FREETYPE_LIBS"
48064    CXX="$FIXPATH $CXX"
48065    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48066/* end confdefs.h.  */
48067
48068          #include<ft2build.h>
48069          #include FT_FREETYPE_H
48070          int main () {
48071            FT_Init_FreeType(NULL);
48072            return 0;
48073          }
48074
48075_ACEOF
48076if ac_fn_cxx_try_link "$LINENO"; then :
48077
48078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48079$as_echo "yes" >&6; }
48080
48081else
48082
48083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48084$as_echo "no" >&6; }
48085          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48086$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48087          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48088$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48089
48090
48091  # Print a helpful message on how to acquire the necessary build dependency.
48092  # freetype is the help tag: freetype, cups, pulse, alsa etc
48093  MISSING_DEPENDENCY=freetype
48094
48095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48096    cygwin_help $MISSING_DEPENDENCY
48097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48098    msys_help $MISSING_DEPENDENCY
48099  else
48100    PKGHANDLER_COMMAND=
48101
48102    case $PKGHANDLER in
48103      apt-get)
48104        apt_help     $MISSING_DEPENDENCY ;;
48105      yum)
48106        yum_help     $MISSING_DEPENDENCY ;;
48107      port)
48108        port_help    $MISSING_DEPENDENCY ;;
48109      pkgutil)
48110        pkgutil_help $MISSING_DEPENDENCY ;;
48111      pkgadd)
48112        pkgadd_help  $MISSING_DEPENDENCY ;;
48113    esac
48114
48115    if test "x$PKGHANDLER_COMMAND" != x; then
48116      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48117    fi
48118  fi
48119
48120
48121          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48122
48123
48124fi
48125rm -f core conftest.err conftest.$ac_objext \
48126    conftest$ac_exeext conftest.$ac_ext
48127    CXXCFLAGS="$PREV_CXXFLAGS"
48128    LIBS="$PREV_LIBS"
48129    CXX="$PREV_CXX"
48130    ac_ext=cpp
48131ac_cpp='$CXXCPP $CPPFLAGS'
48132ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48133ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48134ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48135
48136
48137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48138$as_echo_n "checking if we should bundle freetype... " >&6; }
48139    if test "x$BUNDLE_FREETYPE" = xyes; then
48140      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48141    fi
48142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48143$as_echo "$BUNDLE_FREETYPE" >&6; }
48144
48145  fi # end freetype needed
48146
48147
48148
48149
48150
48151
48152
48153  ###############################################################################
48154  #
48155  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48156  #
48157
48158# Check whether --with-alsa was given.
48159if test "${with_alsa+set}" = set; then :
48160  withval=$with_alsa;
48161fi
48162
48163
48164# Check whether --with-alsa-include was given.
48165if test "${with_alsa_include+set}" = set; then :
48166  withval=$with_alsa_include;
48167fi
48168
48169
48170# Check whether --with-alsa-lib was given.
48171if test "${with_alsa_lib+set}" = set; then :
48172  withval=$with_alsa_lib;
48173fi
48174
48175
48176  if test "x$ALSA_NOT_NEEDED" = xyes; then
48177    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48178      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48179$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48180    fi
48181    ALSA_CFLAGS=
48182    ALSA_LIBS=
48183  else
48184    ALSA_FOUND=no
48185
48186    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48187      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48188    fi
48189
48190    if test "x${with_alsa}" != x; then
48191      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48192      ALSA_CFLAGS="-I${with_alsa}/include"
48193      ALSA_FOUND=yes
48194    fi
48195    if test "x${with_alsa_include}" != x; then
48196      ALSA_CFLAGS="-I${with_alsa_include}"
48197      ALSA_FOUND=yes
48198    fi
48199    if test "x${with_alsa_lib}" != x; then
48200      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48201      ALSA_FOUND=yes
48202    fi
48203    if test "x$ALSA_FOUND" = xno; then
48204
48205
48206  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48207    # Source the builddeps file again, to make sure it uses the latest variables!
48208    . $builddepsfile
48209    # Look for a target and build machine specific resource!
48210    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48211    if test "x$resource" = x; then
48212      # Ok, lets instead look for a target specific resource
48213      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48214    fi
48215    if test "x$resource" = x; then
48216      # Ok, lets instead look for a build specific resource
48217      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48218    fi
48219    if test "x$resource" = x; then
48220      # Ok, lets instead look for a generic resource
48221      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48222      resource=${builddep_alsa}
48223    fi
48224    if test "x$resource" != x; then
48225      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48226$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48227      # If the resource in the builddeps.conf file is an existing directory,
48228      # for example /java/linux/cups
48229      if test -d ${resource}; then
48230        depdir=${resource}
48231      else
48232
48233  # alsa is for example mymodule
48234  # $resource is for example libs/general/libmymod_1_2_3.zip
48235  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48236  # $with_builddeps_dir is for example /localhome/builddeps
48237  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48238  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48239  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48240  filename=`basename $resource`
48241  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48242  filebase=${filename%%.*}
48243  extension=${filename#*.}
48244  installdir=$with_builddeps_dir/$filebase
48245  if test ! -f $installdir/$filename.unpacked; then
48246    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48247$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48248    if test ! -d $installdir; then
48249      mkdir -p $installdir
48250    fi
48251    if test ! -d $installdir; then
48252      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48253    fi
48254    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48255    touch $tmpfile
48256    if test ! -f $tmpfile; then
48257      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48258    fi
48259
48260  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48261  # $tmpfile is the local file name for the downloaded file.
48262  VALID_TOOL=no
48263  if test "x$BDEPS_FTP" = xwget; then
48264    VALID_TOOL=yes
48265    wget -O $tmpfile $with_builddeps_server/$resource
48266  fi
48267  if test "x$BDEPS_FTP" = xlftp; then
48268    VALID_TOOL=yes
48269    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48270  fi
48271  if test "x$BDEPS_FTP" = xftp; then
48272    VALID_TOOL=yes
48273    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48274    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48275    FTPUSERPWD=${FTPSERVER%%@*}
48276    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48277      FTPUSER=${userpwd%%:*}
48278      FTPPWD=${userpwd#*@}
48279      FTPSERVER=${FTPSERVER#*@}
48280    else
48281      FTPUSER=ftp
48282      FTPPWD=ftp
48283    fi
48284    # the "pass" command does not work on some
48285    # ftp clients (read ftp.exe) but if it works,
48286    # passive mode is better!
48287    ( \
48288        echo "user $FTPUSER $FTPPWD"        ; \
48289        echo "pass"                         ; \
48290        echo "bin"                          ; \
48291        echo "get $FTPPATH $tmpfile"              ; \
48292    ) | ftp -in $FTPSERVER
48293  fi
48294  if test "x$VALID_TOOL" != xyes; then
48295    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48296  fi
48297
48298    mv $tmpfile $installdir/$filename
48299    if test ! -s $installdir/$filename; then
48300      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48301    fi
48302    case "$extension" in
48303      zip)  echo "Unzipping $installdir/$filename..."
48304        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48305        ;;
48306      tar.gz) echo "Untaring $installdir/$filename..."
48307        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48308        ;;
48309      tgz) echo "Untaring $installdir/$filename..."
48310        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48311        ;;
48312      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48313        ;;
48314    esac
48315  fi
48316  if test -f $installdir/$filename.unpacked; then
48317    depdir=$installdir
48318  fi
48319
48320      fi
48321      # Source the builddeps file again, because in the previous command, the depdir
48322      # was updated to point at the current build dependency install directory.
48323      . $builddepsfile
48324      # Now extract variables from the builddeps.conf files.
48325      theroot=${builddep_alsa_ROOT}
48326      thecflags=${builddep_alsa_CFLAGS}
48327      thelibs=${builddep_alsa_LIBS}
48328      if test "x$depdir" = x; then
48329        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48330      fi
48331      ALSA=$depdir
48332      if test "x$theroot" != x; then
48333        ALSA="$theroot"
48334      fi
48335      if test "x$thecflags" != x; then
48336        ALSA_CFLAGS="$thecflags"
48337      fi
48338      if test "x$thelibs" != x; then
48339        ALSA_LIBS="$thelibs"
48340      fi
48341      ALSA_FOUND=yes
48342      else ALSA_FOUND=no
48343
48344    fi
48345    else ALSA_FOUND=no
48346
48347  fi
48348
48349    fi
48350    # Do not try pkg-config if we have a sysroot set.
48351    if test "x$SYSROOT" = x; then
48352      if test "x$ALSA_FOUND" = xno; then
48353
48354pkg_failed=no
48355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48356$as_echo_n "checking for ALSA... " >&6; }
48357
48358if test -n "$ALSA_CFLAGS"; then
48359    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48360 elif test -n "$PKG_CONFIG"; then
48361    if test -n "$PKG_CONFIG" && \
48362    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48363  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48364  ac_status=$?
48365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48366  test $ac_status = 0; }; then
48367  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48368else
48369  pkg_failed=yes
48370fi
48371 else
48372    pkg_failed=untried
48373fi
48374if test -n "$ALSA_LIBS"; then
48375    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48376 elif test -n "$PKG_CONFIG"; then
48377    if test -n "$PKG_CONFIG" && \
48378    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48379  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48380  ac_status=$?
48381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48382  test $ac_status = 0; }; then
48383  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48384else
48385  pkg_failed=yes
48386fi
48387 else
48388    pkg_failed=untried
48389fi
48390
48391
48392
48393if test $pkg_failed = yes; then
48394
48395if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48396        _pkg_short_errors_supported=yes
48397else
48398        _pkg_short_errors_supported=no
48399fi
48400        if test $_pkg_short_errors_supported = yes; then
48401	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48402        else
48403	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48404        fi
48405	# Put the nasty error message in config.log where it belongs
48406	echo "$ALSA_PKG_ERRORS" >&5
48407
48408	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48409$as_echo "no" >&6; }
48410                ALSA_FOUND=no
48411elif test $pkg_failed = untried; then
48412	ALSA_FOUND=no
48413else
48414	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48415	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48417$as_echo "yes" >&6; }
48418	ALSA_FOUND=yes
48419fi
48420      fi
48421    fi
48422    if test "x$ALSA_FOUND" = xno; then
48423      for ac_header in alsa/asoundlib.h
48424do :
48425  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48426if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48427  cat >>confdefs.h <<_ACEOF
48428#define HAVE_ALSA_ASOUNDLIB_H 1
48429_ACEOF
48430
48431            ALSA_FOUND=yes
48432            ALSA_CFLAGS=-Iignoreme
48433            ALSA_LIBS=-lasound
48434            DEFAULT_ALSA=yes
48435
48436else
48437  ALSA_FOUND=no
48438fi
48439
48440done
48441
48442    fi
48443    if test "x$ALSA_FOUND" = xno; then
48444
48445  # Print a helpful message on how to acquire the necessary build dependency.
48446  # alsa is the help tag: freetype, cups, pulse, alsa etc
48447  MISSING_DEPENDENCY=alsa
48448
48449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48450    cygwin_help $MISSING_DEPENDENCY
48451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48452    msys_help $MISSING_DEPENDENCY
48453  else
48454    PKGHANDLER_COMMAND=
48455
48456    case $PKGHANDLER in
48457      apt-get)
48458        apt_help     $MISSING_DEPENDENCY ;;
48459      yum)
48460        yum_help     $MISSING_DEPENDENCY ;;
48461      port)
48462        port_help    $MISSING_DEPENDENCY ;;
48463      pkgutil)
48464        pkgutil_help $MISSING_DEPENDENCY ;;
48465      pkgadd)
48466        pkgadd_help  $MISSING_DEPENDENCY ;;
48467    esac
48468
48469    if test "x$PKGHANDLER_COMMAND" != x; then
48470      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48471    fi
48472  fi
48473
48474      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48475    fi
48476  fi
48477
48478
48479
48480
48481
48482
48483  ###############################################################################
48484  #
48485  # Check for the jpeg library
48486  #
48487
48488
48489# Check whether --with-libjpeg was given.
48490if test "${with_libjpeg+set}" = set; then :
48491  withval=$with_libjpeg;
48492fi
48493
48494
48495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48496$as_echo_n "checking for which libjpeg to use... " >&6; }
48497
48498  # default is bundled
48499  DEFAULT_LIBJPEG=bundled
48500
48501  #
48502  # if user didn't specify, use DEFAULT_LIBJPEG
48503  #
48504  if test "x${with_libjpeg}" = "x"; then
48505    with_libjpeg=${DEFAULT_LIBJPEG}
48506  fi
48507
48508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48509$as_echo "${with_libjpeg}" >&6; }
48510
48511  if test "x${with_libjpeg}" = "xbundled"; then
48512    USE_EXTERNAL_LIBJPEG=false
48513  elif test "x${with_libjpeg}" = "xsystem"; then
48514    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48515if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48516
48517else
48518   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48519fi
48520
48521
48522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48523$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48524if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48525  $as_echo_n "(cached) " >&6
48526else
48527  ac_check_lib_save_LIBS=$LIBS
48528LIBS="-ljpeg  $LIBS"
48529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48530/* end confdefs.h.  */
48531
48532/* Override any GCC internal prototype to avoid an error.
48533   Use char because int might match the return type of a GCC
48534   builtin and then its argument prototype would still apply.  */
48535#ifdef __cplusplus
48536extern "C"
48537#endif
48538char jpeg_CreateDecompress ();
48539int
48540main ()
48541{
48542return jpeg_CreateDecompress ();
48543  ;
48544  return 0;
48545}
48546_ACEOF
48547if ac_fn_cxx_try_link "$LINENO"; then :
48548  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48549else
48550  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48551fi
48552rm -f core conftest.err conftest.$ac_objext \
48553    conftest$ac_exeext conftest.$ac_ext
48554LIBS=$ac_check_lib_save_LIBS
48555fi
48556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48557$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48558if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48559  cat >>confdefs.h <<_ACEOF
48560#define HAVE_LIBJPEG 1
48561_ACEOF
48562
48563  LIBS="-ljpeg $LIBS"
48564
48565else
48566   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48567fi
48568
48569
48570    USE_EXTERNAL_LIBJPEG=true
48571  else
48572    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48573  fi
48574
48575
48576
48577  ###############################################################################
48578  #
48579  # Check for the gif library
48580  #
48581
48582
48583# Check whether --with-giflib was given.
48584if test "${with_giflib+set}" = set; then :
48585  withval=$with_giflib;
48586fi
48587
48588
48589
48590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48591$as_echo_n "checking for which giflib to use... " >&6; }
48592
48593  # default is bundled
48594  DEFAULT_GIFLIB=bundled
48595
48596  #
48597  # if user didn't specify, use DEFAULT_GIFLIB
48598  #
48599  if test "x${with_giflib}" = "x"; then
48600    with_giflib=${DEFAULT_GIFLIB}
48601  fi
48602
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48604$as_echo "${with_giflib}" >&6; }
48605
48606  if test "x${with_giflib}" = "xbundled"; then
48607    USE_EXTERNAL_LIBGIF=false
48608  elif test "x${with_giflib}" = "xsystem"; then
48609    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48610if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48611
48612else
48613   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48614fi
48615
48616
48617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48618$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48619if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48620  $as_echo_n "(cached) " >&6
48621else
48622  ac_check_lib_save_LIBS=$LIBS
48623LIBS="-lgif  $LIBS"
48624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48625/* end confdefs.h.  */
48626
48627/* Override any GCC internal prototype to avoid an error.
48628   Use char because int might match the return type of a GCC
48629   builtin and then its argument prototype would still apply.  */
48630#ifdef __cplusplus
48631extern "C"
48632#endif
48633char DGifGetCode ();
48634int
48635main ()
48636{
48637return DGifGetCode ();
48638  ;
48639  return 0;
48640}
48641_ACEOF
48642if ac_fn_cxx_try_link "$LINENO"; then :
48643  ac_cv_lib_gif_DGifGetCode=yes
48644else
48645  ac_cv_lib_gif_DGifGetCode=no
48646fi
48647rm -f core conftest.err conftest.$ac_objext \
48648    conftest$ac_exeext conftest.$ac_ext
48649LIBS=$ac_check_lib_save_LIBS
48650fi
48651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48652$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48653if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48654  cat >>confdefs.h <<_ACEOF
48655#define HAVE_LIBGIF 1
48656_ACEOF
48657
48658  LIBS="-lgif $LIBS"
48659
48660else
48661   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48662fi
48663
48664
48665    USE_EXTERNAL_LIBGIF=true
48666  else
48667    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48668  fi
48669
48670
48671  ###############################################################################
48672  #
48673  # Check for the lcms2 library
48674  #
48675
48676
48677# Check whether --with-lcms was given.
48678if test "${with_lcms+set}" = set; then :
48679  withval=$with_lcms;
48680fi
48681
48682
48683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48684$as_echo_n "checking for which lcms to use... " >&6; }
48685
48686  DEFAULT_LCMS=bundled
48687
48688  #
48689  # If user didn't specify, use DEFAULT_LCMS
48690  #
48691  if test "x${with_lcms}" = "x"; then
48692      with_lcms=${DEFAULT_LCMS}
48693  fi
48694
48695  if test "x${with_lcms}" = "xbundled"; then
48696    USE_EXTERNAL_LCMS=false
48697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48698$as_echo "bundled" >&6; }
48699  elif test "x${with_lcms}" = "xsystem"; then
48700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48701$as_echo "system" >&6; }
48702
48703pkg_failed=no
48704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48705$as_echo_n "checking for LCMS... " >&6; }
48706
48707if test -n "$LCMS_CFLAGS"; then
48708    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48709 elif test -n "$PKG_CONFIG"; then
48710    if test -n "$PKG_CONFIG" && \
48711    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48712  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48713  ac_status=$?
48714  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48715  test $ac_status = 0; }; then
48716  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48717else
48718  pkg_failed=yes
48719fi
48720 else
48721    pkg_failed=untried
48722fi
48723if test -n "$LCMS_LIBS"; then
48724    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48725 elif test -n "$PKG_CONFIG"; then
48726    if test -n "$PKG_CONFIG" && \
48727    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48728  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48729  ac_status=$?
48730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48731  test $ac_status = 0; }; then
48732  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48733else
48734  pkg_failed=yes
48735fi
48736 else
48737    pkg_failed=untried
48738fi
48739
48740
48741
48742if test $pkg_failed = yes; then
48743
48744if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48745        _pkg_short_errors_supported=yes
48746else
48747        _pkg_short_errors_supported=no
48748fi
48749        if test $_pkg_short_errors_supported = yes; then
48750	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48751        else
48752	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48753        fi
48754	# Put the nasty error message in config.log where it belongs
48755	echo "$LCMS_PKG_ERRORS" >&5
48756
48757	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48758$as_echo "no" >&6; }
48759                LCMS_FOUND=no
48760elif test $pkg_failed = untried; then
48761	LCMS_FOUND=no
48762else
48763	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48764	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48766$as_echo "yes" >&6; }
48767	LCMS_FOUND=yes
48768fi
48769    if test "x${LCMS_FOUND}" = "xyes"; then
48770      USE_EXTERNAL_LCMS=true
48771    else
48772      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48773    fi
48774  else
48775    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48776  fi
48777
48778
48779
48780  ###############################################################################
48781  #
48782  # Check for the png library
48783  #
48784
48785
48786# Check whether --with-libpng was given.
48787if test "${with_libpng+set}" = set; then :
48788  withval=$with_libpng;
48789fi
48790
48791
48792
48793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48794$as_echo_n "checking for which libpng to use... " >&6; }
48795
48796  # default is bundled
48797  DEFAULT_LIBPNG=bundled
48798
48799  #
48800  # if user didn't specify, use DEFAULT_LIBPNG
48801  #
48802  if test "x${with_libpng}" = "x"; then
48803      with_libpng=${DEFAULT_LIBPNG}
48804  fi
48805
48806  if test "x${with_libpng}" = "xbundled"; then
48807      USE_EXTERNAL_LIBPNG=false
48808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48809$as_echo "bundled" >&6; }
48810  elif test "x${with_libpng}" = "xsystem"; then
48811
48812pkg_failed=no
48813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48814$as_echo_n "checking for PNG... " >&6; }
48815
48816if test -n "$PNG_CFLAGS"; then
48817    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48818 elif test -n "$PKG_CONFIG"; then
48819    if test -n "$PKG_CONFIG" && \
48820    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48821  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48822  ac_status=$?
48823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48824  test $ac_status = 0; }; then
48825  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48826else
48827  pkg_failed=yes
48828fi
48829 else
48830    pkg_failed=untried
48831fi
48832if test -n "$PNG_LIBS"; then
48833    pkg_cv_PNG_LIBS="$PNG_LIBS"
48834 elif test -n "$PKG_CONFIG"; then
48835    if test -n "$PKG_CONFIG" && \
48836    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48837  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48838  ac_status=$?
48839  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48840  test $ac_status = 0; }; then
48841  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48842else
48843  pkg_failed=yes
48844fi
48845 else
48846    pkg_failed=untried
48847fi
48848
48849
48850
48851if test $pkg_failed = yes; then
48852
48853if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48854        _pkg_short_errors_supported=yes
48855else
48856        _pkg_short_errors_supported=no
48857fi
48858        if test $_pkg_short_errors_supported = yes; then
48859	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48860        else
48861	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48862        fi
48863	# Put the nasty error message in config.log where it belongs
48864	echo "$PNG_PKG_ERRORS" >&5
48865
48866	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48867$as_echo "no" >&6; }
48868                 LIBPNG_FOUND=no
48869elif test $pkg_failed = untried; then
48870	 LIBPNG_FOUND=no
48871else
48872	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48873	PNG_LIBS=$pkg_cv_PNG_LIBS
48874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48875$as_echo "yes" >&6; }
48876	 LIBPNG_FOUND=yes
48877fi
48878      if test "x${LIBPNG_FOUND}" = "xyes"; then
48879          USE_EXTERNAL_LIBPNG=true
48880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48881$as_echo "system" >&6; }
48882      else
48883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48884$as_echo "system not found" >&6; }
48885          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48886      fi
48887  else
48888      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48889  fi
48890
48891
48892  ###############################################################################
48893  #
48894  # Check for the zlib library
48895  #
48896
48897
48898# Check whether --with-zlib was given.
48899if test "${with_zlib+set}" = set; then :
48900  withval=$with_zlib;
48901fi
48902
48903
48904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48905$as_echo_n "checking for compress in -lz... " >&6; }
48906if ${ac_cv_lib_z_compress+:} false; then :
48907  $as_echo_n "(cached) " >&6
48908else
48909  ac_check_lib_save_LIBS=$LIBS
48910LIBS="-lz  $LIBS"
48911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48912/* end confdefs.h.  */
48913
48914/* Override any GCC internal prototype to avoid an error.
48915   Use char because int might match the return type of a GCC
48916   builtin and then its argument prototype would still apply.  */
48917#ifdef __cplusplus
48918extern "C"
48919#endif
48920char compress ();
48921int
48922main ()
48923{
48924return compress ();
48925  ;
48926  return 0;
48927}
48928_ACEOF
48929if ac_fn_cxx_try_link "$LINENO"; then :
48930  ac_cv_lib_z_compress=yes
48931else
48932  ac_cv_lib_z_compress=no
48933fi
48934rm -f core conftest.err conftest.$ac_objext \
48935    conftest$ac_exeext conftest.$ac_ext
48936LIBS=$ac_check_lib_save_LIBS
48937fi
48938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48939$as_echo "$ac_cv_lib_z_compress" >&6; }
48940if test "x$ac_cv_lib_z_compress" = xyes; then :
48941   ZLIB_FOUND=yes
48942else
48943   ZLIB_FOUND=no
48944fi
48945
48946
48947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48948$as_echo_n "checking for which zlib to use... " >&6; }
48949
48950  DEFAULT_ZLIB=bundled
48951  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48952    #
48953    # On macosx default is system...on others default is
48954    #
48955    DEFAULT_ZLIB=system
48956  fi
48957
48958  if test "x${ZLIB_FOUND}" != "xyes"; then
48959    #
48960    # If we don't find any system...set default to bundled
48961    #
48962    DEFAULT_ZLIB=bundled
48963  fi
48964
48965  #
48966  # If user didn't specify, use DEFAULT_ZLIB
48967  #
48968  if test "x${with_zlib}" = "x"; then
48969    with_zlib=${DEFAULT_ZLIB}
48970  fi
48971
48972  if test "x${with_zlib}" = "xbundled"; then
48973    USE_EXTERNAL_LIBZ=false
48974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48975$as_echo "bundled" >&6; }
48976  elif test "x${with_zlib}" = "xsystem"; then
48977    if test "x${ZLIB_FOUND}" = "xyes"; then
48978      USE_EXTERNAL_LIBZ=true
48979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48980$as_echo "system" >&6; }
48981    else
48982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48983$as_echo "system not found" >&6; }
48984      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48985    fi
48986  else
48987    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48988  fi
48989
48990
48991
48992  ###############################################################################
48993  LIBZIP_CAN_USE_MMAP=true
48994
48995
48996
48997  ###############################################################################
48998  #
48999  # Check if altzone exists in time.h
49000  #
49001
49002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49003/* end confdefs.h.  */
49004#include <time.h>
49005int
49006main ()
49007{
49008return (int)altzone;
49009  ;
49010  return 0;
49011}
49012_ACEOF
49013if ac_fn_cxx_try_link "$LINENO"; then :
49014  has_altzone=yes
49015else
49016  has_altzone=no
49017fi
49018rm -f core conftest.err conftest.$ac_objext \
49019    conftest$ac_exeext conftest.$ac_ext
49020  if test "x$has_altzone" = xyes; then
49021
49022$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49023
49024  fi
49025
49026  ###############################################################################
49027  #
49028  # Check the maths library
49029  #
49030
49031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49032$as_echo_n "checking for cos in -lm... " >&6; }
49033if ${ac_cv_lib_m_cos+:} false; then :
49034  $as_echo_n "(cached) " >&6
49035else
49036  ac_check_lib_save_LIBS=$LIBS
49037LIBS="-lm  $LIBS"
49038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49039/* end confdefs.h.  */
49040
49041/* Override any GCC internal prototype to avoid an error.
49042   Use char because int might match the return type of a GCC
49043   builtin and then its argument prototype would still apply.  */
49044#ifdef __cplusplus
49045extern "C"
49046#endif
49047char cos ();
49048int
49049main ()
49050{
49051return cos ();
49052  ;
49053  return 0;
49054}
49055_ACEOF
49056if ac_fn_cxx_try_link "$LINENO"; then :
49057  ac_cv_lib_m_cos=yes
49058else
49059  ac_cv_lib_m_cos=no
49060fi
49061rm -f core conftest.err conftest.$ac_objext \
49062    conftest$ac_exeext conftest.$ac_ext
49063LIBS=$ac_check_lib_save_LIBS
49064fi
49065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49066$as_echo "$ac_cv_lib_m_cos" >&6; }
49067if test "x$ac_cv_lib_m_cos" = xyes; then :
49068  cat >>confdefs.h <<_ACEOF
49069#define HAVE_LIBM 1
49070_ACEOF
49071
49072  LIBS="-lm $LIBS"
49073
49074else
49075
49076        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49077$as_echo "$as_me: Maths library was not found" >&6;}
49078
49079
49080fi
49081
49082
49083
49084  ###############################################################################
49085  #
49086  # Check for libdl.so
49087
49088  save_LIBS="$LIBS"
49089  LIBS=""
49090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49091$as_echo_n "checking for dlopen in -ldl... " >&6; }
49092if ${ac_cv_lib_dl_dlopen+:} false; then :
49093  $as_echo_n "(cached) " >&6
49094else
49095  ac_check_lib_save_LIBS=$LIBS
49096LIBS="-ldl  $LIBS"
49097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49098/* end confdefs.h.  */
49099
49100/* Override any GCC internal prototype to avoid an error.
49101   Use char because int might match the return type of a GCC
49102   builtin and then its argument prototype would still apply.  */
49103#ifdef __cplusplus
49104extern "C"
49105#endif
49106char dlopen ();
49107int
49108main ()
49109{
49110return dlopen ();
49111  ;
49112  return 0;
49113}
49114_ACEOF
49115if ac_fn_cxx_try_link "$LINENO"; then :
49116  ac_cv_lib_dl_dlopen=yes
49117else
49118  ac_cv_lib_dl_dlopen=no
49119fi
49120rm -f core conftest.err conftest.$ac_objext \
49121    conftest$ac_exeext conftest.$ac_ext
49122LIBS=$ac_check_lib_save_LIBS
49123fi
49124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49125$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49126if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49127  cat >>confdefs.h <<_ACEOF
49128#define HAVE_LIBDL 1
49129_ACEOF
49130
49131  LIBS="-ldl $LIBS"
49132
49133fi
49134
49135  LIBDL="$LIBS"
49136
49137  LIBS="$save_LIBS"
49138
49139
49140  ###############################################################################
49141  #
49142  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49143  # dynamic build is configured on command line.
49144  #
49145
49146# Check whether --with-stdc++lib was given.
49147if test "${with_stdc__lib+set}" = set; then :
49148  withval=$with_stdc__lib;
49149        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49150                && test "x$with_stdc__lib" != xdefault; then
49151          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49152        fi
49153
49154else
49155  with_stdc__lib=default
49156
49157fi
49158
49159
49160  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49161    # Test if -lstdc++ works.
49162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49163$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49164    ac_ext=cpp
49165ac_cpp='$CXXCPP $CPPFLAGS'
49166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49169
49170    OLD_CXXFLAGS="$CXXFLAGS"
49171    CXXFLAGS="$CXXFLAGS -lstdc++"
49172    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49173/* end confdefs.h.  */
49174
49175int
49176main ()
49177{
49178return 0;
49179  ;
49180  return 0;
49181}
49182_ACEOF
49183if ac_fn_cxx_try_link "$LINENO"; then :
49184  has_dynamic_libstdcxx=yes
49185else
49186  has_dynamic_libstdcxx=no
49187fi
49188rm -f core conftest.err conftest.$ac_objext \
49189    conftest$ac_exeext conftest.$ac_ext
49190    CXXFLAGS="$OLD_CXXFLAGS"
49191    ac_ext=cpp
49192ac_cpp='$CXXCPP $CPPFLAGS'
49193ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49194ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49195ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49196
49197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49198$as_echo "$has_dynamic_libstdcxx" >&6; }
49199
49200    # Test if stdc++ can be linked statically.
49201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49202$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49203    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49204    ac_ext=cpp
49205ac_cpp='$CXXCPP $CPPFLAGS'
49206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49209
49210    OLD_LIBS="$LIBS"
49211    OLD_CXX="$CXX"
49212    LIBS="$STATIC_STDCXX_FLAGS"
49213    CXX="$CC"
49214    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49215/* end confdefs.h.  */
49216
49217int
49218main ()
49219{
49220return 0;
49221  ;
49222  return 0;
49223}
49224_ACEOF
49225if ac_fn_cxx_try_link "$LINENO"; then :
49226  has_static_libstdcxx=yes
49227else
49228  has_static_libstdcxx=no
49229fi
49230rm -f core conftest.err conftest.$ac_objext \
49231    conftest$ac_exeext conftest.$ac_ext
49232    LIBS="$OLD_LIBS"
49233    CXX="$OLD_CXX"
49234    ac_ext=cpp
49235ac_cpp='$CXXCPP $CPPFLAGS'
49236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49239
49240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49241$as_echo "$has_static_libstdcxx" >&6; }
49242
49243    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49244      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49245    fi
49246
49247    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49248      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49249    fi
49250
49251    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49252      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49253    fi
49254
49255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49256$as_echo_n "checking how to link with libstdc++... " >&6; }
49257    # If dynamic was requested, it's available since it would fail above otherwise.
49258    # If dynamic wasn't requested, go with static unless it isn't available.
49259    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49260      LIBCXX="$LIBCXX -lstdc++"
49261      LDCXX="$CXX"
49262      STATIC_CXX_SETTING="STATIC_CXX=false"
49263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49264$as_echo "dynamic" >&6; }
49265    else
49266      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49267      LDCXX="$CC"
49268      STATIC_CXX_SETTING="STATIC_CXX=true"
49269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49270$as_echo "static" >&6; }
49271    fi
49272  fi
49273
49274
49275  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49276    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49277
49278pkg_failed=no
49279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49280$as_echo_n "checking for LIBFFI... " >&6; }
49281
49282if test -n "$LIBFFI_CFLAGS"; then
49283    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49284 elif test -n "$PKG_CONFIG"; then
49285    if test -n "$PKG_CONFIG" && \
49286    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49287  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49288  ac_status=$?
49289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49290  test $ac_status = 0; }; then
49291  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49292else
49293  pkg_failed=yes
49294fi
49295 else
49296    pkg_failed=untried
49297fi
49298if test -n "$LIBFFI_LIBS"; then
49299    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49300 elif test -n "$PKG_CONFIG"; then
49301    if test -n "$PKG_CONFIG" && \
49302    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49303  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49304  ac_status=$?
49305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49306  test $ac_status = 0; }; then
49307  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49308else
49309  pkg_failed=yes
49310fi
49311 else
49312    pkg_failed=untried
49313fi
49314
49315
49316
49317if test $pkg_failed = yes; then
49318
49319if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49320        _pkg_short_errors_supported=yes
49321else
49322        _pkg_short_errors_supported=no
49323fi
49324        if test $_pkg_short_errors_supported = yes; then
49325	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49326        else
49327	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49328        fi
49329	# Put the nasty error message in config.log where it belongs
49330	echo "$LIBFFI_PKG_ERRORS" >&5
49331
49332	as_fn_error $? "Package requirements (libffi) were not met:
49333
49334$LIBFFI_PKG_ERRORS
49335
49336Consider adjusting the PKG_CONFIG_PATH environment variable if you
49337installed software in a non-standard prefix.
49338
49339Alternatively, you may set the environment variables LIBFFI_CFLAGS
49340and LIBFFI_LIBS to avoid the need to call pkg-config.
49341See the pkg-config man page for more details.
49342" "$LINENO" 5
49343elif test $pkg_failed = untried; then
49344	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49346as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49347is in your PATH or set the PKG_CONFIG environment variable to the full
49348path to pkg-config.
49349
49350Alternatively, you may set the environment variables LIBFFI_CFLAGS
49351and LIBFFI_LIBS to avoid the need to call pkg-config.
49352See the pkg-config man page for more details.
49353
49354To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49355See \`config.log' for more details" "$LINENO" 5; }
49356else
49357	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49358	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49360$as_echo "yes" >&6; }
49361	:
49362fi
49363
49364  fi
49365
49366  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49367    # Extract the first word of "llvm-config", so it can be a program name with args.
49368set dummy llvm-config; ac_word=$2
49369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49370$as_echo_n "checking for $ac_word... " >&6; }
49371if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49372  $as_echo_n "(cached) " >&6
49373else
49374  if test -n "$LLVM_CONFIG"; then
49375  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49376else
49377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49378for as_dir in $PATH
49379do
49380  IFS=$as_save_IFS
49381  test -z "$as_dir" && as_dir=.
49382    for ac_exec_ext in '' $ac_executable_extensions; do
49383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49384    ac_cv_prog_LLVM_CONFIG="llvm-config"
49385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49386    break 2
49387  fi
49388done
49389  done
49390IFS=$as_save_IFS
49391
49392fi
49393fi
49394LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49395if test -n "$LLVM_CONFIG"; then
49396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49397$as_echo "$LLVM_CONFIG" >&6; }
49398else
49399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49400$as_echo "no" >&6; }
49401fi
49402
49403
49404
49405    if test "x$LLVM_CONFIG" != xllvm-config; then
49406      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49407    fi
49408
49409    llvm_components="jit mcjit engine nativecodegen native"
49410    unset LLVM_CFLAGS
49411    for flag in $("$LLVM_CONFIG" --cxxflags); do
49412      if echo "${flag}" | grep -q '^-[ID]'; then
49413        if test "${flag}" != "-D_DEBUG" ; then
49414          if test "${LLVM_CFLAGS}" != "" ; then
49415            LLVM_CFLAGS="${LLVM_CFLAGS} "
49416          fi
49417          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49418        fi
49419      fi
49420    done
49421    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49422    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49423
49424    unset LLVM_LDFLAGS
49425    for flag in $("${LLVM_CONFIG}" --ldflags); do
49426      if echo "${flag}" | grep -q '^-L'; then
49427        if test "${LLVM_LDFLAGS}" != ""; then
49428          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49429        fi
49430        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49431      fi
49432    done
49433
49434    unset LLVM_LIBS
49435    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49436      if echo "${flag}" | grep -q '^-l'; then
49437        if test "${LLVM_LIBS}" != ""; then
49438          LLVM_LIBS="${LLVM_LIBS} "
49439        fi
49440        LLVM_LIBS="${LLVM_LIBS}${flag}"
49441      fi
49442    done
49443
49444
49445
49446
49447  fi
49448
49449  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49450  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49451    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49452  fi
49453
49454  # TODO better (platform agnostic) test
49455  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49456    LIBCXX="-lstdc++"
49457  fi
49458
49459
49460
49461
49462  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49463
49464
49465# Check whether --with-msvcr-dll was given.
49466if test "${with_msvcr_dll+set}" = set; then :
49467  withval=$with_msvcr_dll;
49468fi
49469
49470
49471  if test "x$with_msvcr_dll" != x; then
49472    # If given explicitely by user, do not probe. If not present, fail directly.
49473
49474  DLL_NAME="$MSVCR_NAME"
49475  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49476  METHOD="--with-msvcr-dll"
49477  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49478    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49479$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49480
49481    # Need to check if the found msvcr is correct architecture
49482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49483$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49484    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49486      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49487      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49488      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49489        CORRECT_MSVCR_ARCH="PE32 executable"
49490      else
49491        CORRECT_MSVCR_ARCH="PE32+ executable"
49492      fi
49493    else
49494      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49495        CORRECT_MSVCR_ARCH=386
49496      else
49497        CORRECT_MSVCR_ARCH=x86-64
49498      fi
49499    fi
49500    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49502$as_echo "ok" >&6; }
49503      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49504
49505  # Only process if variable expands to non-empty
49506
49507  if test "x$MSVC_DLL" != x; then
49508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49509
49510  # Input might be given as Windows format, start by converting to
49511  # unix format.
49512  path="$MSVC_DLL"
49513  new_path=`$CYGPATH -u "$path"`
49514
49515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49518  # "foo.exe" is OK but "foo" is an error.
49519  #
49520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49521  # It is also a way to make sure we got the proper file name for the real test later on.
49522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49523  if test "x$test_shortpath" = x; then
49524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49525$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49526    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49527  fi
49528
49529  # Call helper function which possibly converts this using DOS-style short mode.
49530  # If so, the updated path is stored in $new_path.
49531
49532  input_path="$new_path"
49533  # Check if we need to convert this using DOS-style short mode. If the path
49534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49535  # take no chances and rewrite it.
49536  # Note: m4 eats our [], so we need to use [ and ] instead.
49537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49538  if test "x$has_forbidden_chars" != x; then
49539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49543      # Going to short mode and back again did indeed matter. Since short mode is
49544      # case insensitive, let's make it lowercase to improve readability.
49545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49546      # Now convert it back to Unix-style (cygpath)
49547      input_path=`$CYGPATH -u "$shortmode_path"`
49548      new_path="$input_path"
49549    fi
49550  fi
49551
49552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49553  if test "x$test_cygdrive_prefix" = x; then
49554    # As a simple fix, exclude /usr/bin since it's not a real path.
49555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49557      # a path prefixed by /cygdrive for fixpath to work.
49558      new_path="$CYGWIN_ROOT_PATH$input_path"
49559    fi
49560  fi
49561
49562
49563  if test "x$path" != "x$new_path"; then
49564    MSVC_DLL="$new_path"
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49567  fi
49568
49569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49570
49571  path="$MSVC_DLL"
49572  has_colon=`$ECHO $path | $GREP ^.:`
49573  new_path="$path"
49574  if test "x$has_colon" = x; then
49575    # Not in mixed or Windows style, start by that.
49576    new_path=`cmd //c echo $path`
49577  fi
49578
49579
49580  input_path="$new_path"
49581  # Check if we need to convert this using DOS-style short mode. If the path
49582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49583  # take no chances and rewrite it.
49584  # Note: m4 eats our [], so we need to use [ and ] instead.
49585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49586  if test "x$has_forbidden_chars" != x; then
49587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49589  fi
49590
49591
49592  windows_path="$new_path"
49593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49594    unix_path=`$CYGPATH -u "$windows_path"`
49595    new_path="$unix_path"
49596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49598    new_path="$unix_path"
49599  fi
49600
49601  if test "x$path" != "x$new_path"; then
49602    MSVC_DLL="$new_path"
49603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49604$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49605  fi
49606
49607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49609
49610    else
49611      # We're on a unix platform. Hooray! :)
49612      path="$MSVC_DLL"
49613      has_space=`$ECHO "$path" | $GREP " "`
49614      if test "x$has_space" != x; then
49615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49616$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49618      fi
49619
49620      # Use eval to expand a potential ~
49621      eval path="$path"
49622      if test ! -f "$path" && test ! -d "$path"; then
49623        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49624      fi
49625
49626      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49627    fi
49628  fi
49629
49630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49631$as_echo_n "checking for $DLL_NAME... " >&6; }
49632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49633$as_echo "$MSVC_DLL" >&6; }
49634    else
49635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49636$as_echo "incorrect, ignoring" >&6; }
49637      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49638$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49639    fi
49640  fi
49641
49642    if test "x$MSVC_DLL" = x; then
49643      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49644    fi
49645    MSVCR_DLL="$MSVC_DLL"
49646  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49647
49648  DLL_NAME="$MSVCR_NAME"
49649  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49650  METHOD="devkit"
49651  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49653$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49654
49655    # Need to check if the found msvcr is correct architecture
49656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49657$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49658    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49660      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49661      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49662      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49663        CORRECT_MSVCR_ARCH="PE32 executable"
49664      else
49665        CORRECT_MSVCR_ARCH="PE32+ executable"
49666      fi
49667    else
49668      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49669        CORRECT_MSVCR_ARCH=386
49670      else
49671        CORRECT_MSVCR_ARCH=x86-64
49672      fi
49673    fi
49674    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49676$as_echo "ok" >&6; }
49677      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49678
49679  # Only process if variable expands to non-empty
49680
49681  if test "x$MSVC_DLL" != x; then
49682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49683
49684  # Input might be given as Windows format, start by converting to
49685  # unix format.
49686  path="$MSVC_DLL"
49687  new_path=`$CYGPATH -u "$path"`
49688
49689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49692  # "foo.exe" is OK but "foo" is an error.
49693  #
49694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49695  # It is also a way to make sure we got the proper file name for the real test later on.
49696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49697  if test "x$test_shortpath" = x; then
49698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49699$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49700    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49701  fi
49702
49703  # Call helper function which possibly converts this using DOS-style short mode.
49704  # If so, the updated path is stored in $new_path.
49705
49706  input_path="$new_path"
49707  # Check if we need to convert this using DOS-style short mode. If the path
49708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49709  # take no chances and rewrite it.
49710  # Note: m4 eats our [], so we need to use [ and ] instead.
49711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49712  if test "x$has_forbidden_chars" != x; then
49713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49717      # Going to short mode and back again did indeed matter. Since short mode is
49718      # case insensitive, let's make it lowercase to improve readability.
49719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49720      # Now convert it back to Unix-style (cygpath)
49721      input_path=`$CYGPATH -u "$shortmode_path"`
49722      new_path="$input_path"
49723    fi
49724  fi
49725
49726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49727  if test "x$test_cygdrive_prefix" = x; then
49728    # As a simple fix, exclude /usr/bin since it's not a real path.
49729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49731      # a path prefixed by /cygdrive for fixpath to work.
49732      new_path="$CYGWIN_ROOT_PATH$input_path"
49733    fi
49734  fi
49735
49736
49737  if test "x$path" != "x$new_path"; then
49738    MSVC_DLL="$new_path"
49739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49740$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49741  fi
49742
49743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49744
49745  path="$MSVC_DLL"
49746  has_colon=`$ECHO $path | $GREP ^.:`
49747  new_path="$path"
49748  if test "x$has_colon" = x; then
49749    # Not in mixed or Windows style, start by that.
49750    new_path=`cmd //c echo $path`
49751  fi
49752
49753
49754  input_path="$new_path"
49755  # Check if we need to convert this using DOS-style short mode. If the path
49756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49757  # take no chances and rewrite it.
49758  # Note: m4 eats our [], so we need to use [ and ] instead.
49759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49760  if test "x$has_forbidden_chars" != x; then
49761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49763  fi
49764
49765
49766  windows_path="$new_path"
49767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49768    unix_path=`$CYGPATH -u "$windows_path"`
49769    new_path="$unix_path"
49770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49772    new_path="$unix_path"
49773  fi
49774
49775  if test "x$path" != "x$new_path"; then
49776    MSVC_DLL="$new_path"
49777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49778$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49779  fi
49780
49781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49783
49784    else
49785      # We're on a unix platform. Hooray! :)
49786      path="$MSVC_DLL"
49787      has_space=`$ECHO "$path" | $GREP " "`
49788      if test "x$has_space" != x; then
49789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49790$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49792      fi
49793
49794      # Use eval to expand a potential ~
49795      eval path="$path"
49796      if test ! -f "$path" && test ! -d "$path"; then
49797        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49798      fi
49799
49800      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49801    fi
49802  fi
49803
49804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49805$as_echo_n "checking for $DLL_NAME... " >&6; }
49806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49807$as_echo "$MSVC_DLL" >&6; }
49808    else
49809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49810$as_echo "incorrect, ignoring" >&6; }
49811      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49812$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49813    fi
49814  fi
49815
49816    if test "x$MSVC_DLL" = x; then
49817      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49818    fi
49819    MSVCR_DLL="$MSVC_DLL"
49820  else
49821
49822  DLL_NAME="${MSVCR_NAME}"
49823  MSVC_DLL=
49824
49825  if test "x$MSVC_DLL" = x; then
49826    # Probe: Using well-known location from Visual Studio 10.0
49827    if test "x$VCINSTALLDIR" != x; then
49828      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49829
49830  windows_path="$CYGWIN_VC_INSTALL_DIR"
49831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49832    unix_path=`$CYGPATH -u "$windows_path"`
49833    CYGWIN_VC_INSTALL_DIR="$unix_path"
49834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49836    CYGWIN_VC_INSTALL_DIR="$unix_path"
49837  fi
49838
49839      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49840        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49841      else
49842        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49843      fi
49844      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49845
49846  DLL_NAME="$DLL_NAME"
49847  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49848  METHOD="well-known location in VCINSTALLDIR"
49849  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49850    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49851$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49852
49853    # Need to check if the found msvcr is correct architecture
49854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49855$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49856    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49858      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49859      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49860      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49861        CORRECT_MSVCR_ARCH="PE32 executable"
49862      else
49863        CORRECT_MSVCR_ARCH="PE32+ executable"
49864      fi
49865    else
49866      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49867        CORRECT_MSVCR_ARCH=386
49868      else
49869        CORRECT_MSVCR_ARCH=x86-64
49870      fi
49871    fi
49872    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49874$as_echo "ok" >&6; }
49875      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49876
49877  # Only process if variable expands to non-empty
49878
49879  if test "x$MSVC_DLL" != x; then
49880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49881
49882  # Input might be given as Windows format, start by converting to
49883  # unix format.
49884  path="$MSVC_DLL"
49885  new_path=`$CYGPATH -u "$path"`
49886
49887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49890  # "foo.exe" is OK but "foo" is an error.
49891  #
49892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49893  # It is also a way to make sure we got the proper file name for the real test later on.
49894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49895  if test "x$test_shortpath" = x; then
49896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49897$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49898    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49899  fi
49900
49901  # Call helper function which possibly converts this using DOS-style short mode.
49902  # If so, the updated path is stored in $new_path.
49903
49904  input_path="$new_path"
49905  # Check if we need to convert this using DOS-style short mode. If the path
49906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49907  # take no chances and rewrite it.
49908  # Note: m4 eats our [], so we need to use [ and ] instead.
49909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49910  if test "x$has_forbidden_chars" != x; then
49911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49915      # Going to short mode and back again did indeed matter. Since short mode is
49916      # case insensitive, let's make it lowercase to improve readability.
49917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49918      # Now convert it back to Unix-style (cygpath)
49919      input_path=`$CYGPATH -u "$shortmode_path"`
49920      new_path="$input_path"
49921    fi
49922  fi
49923
49924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49925  if test "x$test_cygdrive_prefix" = x; then
49926    # As a simple fix, exclude /usr/bin since it's not a real path.
49927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49929      # a path prefixed by /cygdrive for fixpath to work.
49930      new_path="$CYGWIN_ROOT_PATH$input_path"
49931    fi
49932  fi
49933
49934
49935  if test "x$path" != "x$new_path"; then
49936    MSVC_DLL="$new_path"
49937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49938$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49939  fi
49940
49941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49942
49943  path="$MSVC_DLL"
49944  has_colon=`$ECHO $path | $GREP ^.:`
49945  new_path="$path"
49946  if test "x$has_colon" = x; then
49947    # Not in mixed or Windows style, start by that.
49948    new_path=`cmd //c echo $path`
49949  fi
49950
49951
49952  input_path="$new_path"
49953  # Check if we need to convert this using DOS-style short mode. If the path
49954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49955  # take no chances and rewrite it.
49956  # Note: m4 eats our [], so we need to use [ and ] instead.
49957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49958  if test "x$has_forbidden_chars" != x; then
49959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49961  fi
49962
49963
49964  windows_path="$new_path"
49965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49966    unix_path=`$CYGPATH -u "$windows_path"`
49967    new_path="$unix_path"
49968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49970    new_path="$unix_path"
49971  fi
49972
49973  if test "x$path" != "x$new_path"; then
49974    MSVC_DLL="$new_path"
49975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49976$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49977  fi
49978
49979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49981
49982    else
49983      # We're on a unix platform. Hooray! :)
49984      path="$MSVC_DLL"
49985      has_space=`$ECHO "$path" | $GREP " "`
49986      if test "x$has_space" != x; then
49987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49988$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49990      fi
49991
49992      # Use eval to expand a potential ~
49993      eval path="$path"
49994      if test ! -f "$path" && test ! -d "$path"; then
49995        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49996      fi
49997
49998      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49999    fi
50000  fi
50001
50002      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50003$as_echo_n "checking for $DLL_NAME... " >&6; }
50004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50005$as_echo "$MSVC_DLL" >&6; }
50006    else
50007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50008$as_echo "incorrect, ignoring" >&6; }
50009      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50010$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50011    fi
50012  fi
50013
50014    fi
50015  fi
50016
50017  if test "x$MSVC_DLL" = x; then
50018    # Probe: Check in the Boot JDK directory.
50019    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50020
50021  DLL_NAME="$DLL_NAME"
50022  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50023  METHOD="well-known location in Boot JDK"
50024  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50025    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50026$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50027
50028    # Need to check if the found msvcr is correct architecture
50029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50030$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50031    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50033      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50034      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50035      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50036        CORRECT_MSVCR_ARCH="PE32 executable"
50037      else
50038        CORRECT_MSVCR_ARCH="PE32+ executable"
50039      fi
50040    else
50041      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50042        CORRECT_MSVCR_ARCH=386
50043      else
50044        CORRECT_MSVCR_ARCH=x86-64
50045      fi
50046    fi
50047    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50049$as_echo "ok" >&6; }
50050      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50051
50052  # Only process if variable expands to non-empty
50053
50054  if test "x$MSVC_DLL" != x; then
50055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50056
50057  # Input might be given as Windows format, start by converting to
50058  # unix format.
50059  path="$MSVC_DLL"
50060  new_path=`$CYGPATH -u "$path"`
50061
50062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50065  # "foo.exe" is OK but "foo" is an error.
50066  #
50067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50068  # It is also a way to make sure we got the proper file name for the real test later on.
50069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50070  if test "x$test_shortpath" = x; then
50071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50072$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50073    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50074  fi
50075
50076  # Call helper function which possibly converts this using DOS-style short mode.
50077  # If so, the updated path is stored in $new_path.
50078
50079  input_path="$new_path"
50080  # Check if we need to convert this using DOS-style short mode. If the path
50081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50082  # take no chances and rewrite it.
50083  # Note: m4 eats our [], so we need to use [ and ] instead.
50084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50085  if test "x$has_forbidden_chars" != x; then
50086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50090      # Going to short mode and back again did indeed matter. Since short mode is
50091      # case insensitive, let's make it lowercase to improve readability.
50092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50093      # Now convert it back to Unix-style (cygpath)
50094      input_path=`$CYGPATH -u "$shortmode_path"`
50095      new_path="$input_path"
50096    fi
50097  fi
50098
50099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50100  if test "x$test_cygdrive_prefix" = x; then
50101    # As a simple fix, exclude /usr/bin since it's not a real path.
50102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50104      # a path prefixed by /cygdrive for fixpath to work.
50105      new_path="$CYGWIN_ROOT_PATH$input_path"
50106    fi
50107  fi
50108
50109
50110  if test "x$path" != "x$new_path"; then
50111    MSVC_DLL="$new_path"
50112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50114  fi
50115
50116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50117
50118  path="$MSVC_DLL"
50119  has_colon=`$ECHO $path | $GREP ^.:`
50120  new_path="$path"
50121  if test "x$has_colon" = x; then
50122    # Not in mixed or Windows style, start by that.
50123    new_path=`cmd //c echo $path`
50124  fi
50125
50126
50127  input_path="$new_path"
50128  # Check if we need to convert this using DOS-style short mode. If the path
50129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50130  # take no chances and rewrite it.
50131  # Note: m4 eats our [], so we need to use [ and ] instead.
50132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50133  if test "x$has_forbidden_chars" != x; then
50134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50136  fi
50137
50138
50139  windows_path="$new_path"
50140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50141    unix_path=`$CYGPATH -u "$windows_path"`
50142    new_path="$unix_path"
50143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50145    new_path="$unix_path"
50146  fi
50147
50148  if test "x$path" != "x$new_path"; then
50149    MSVC_DLL="$new_path"
50150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50151$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50152  fi
50153
50154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50156
50157    else
50158      # We're on a unix platform. Hooray! :)
50159      path="$MSVC_DLL"
50160      has_space=`$ECHO "$path" | $GREP " "`
50161      if test "x$has_space" != x; then
50162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50163$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50165      fi
50166
50167      # Use eval to expand a potential ~
50168      eval path="$path"
50169      if test ! -f "$path" && test ! -d "$path"; then
50170        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50171      fi
50172
50173      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50174    fi
50175  fi
50176
50177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50178$as_echo_n "checking for $DLL_NAME... " >&6; }
50179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50180$as_echo "$MSVC_DLL" >&6; }
50181    else
50182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50183$as_echo "incorrect, ignoring" >&6; }
50184      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50185$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50186    fi
50187  fi
50188
50189  fi
50190
50191  if test "x$MSVC_DLL" = x; then
50192    # Probe: Look in the Windows system32 directory
50193    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50194
50195  windows_path="$CYGWIN_SYSTEMROOT"
50196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50197    unix_path=`$CYGPATH -u "$windows_path"`
50198    CYGWIN_SYSTEMROOT="$unix_path"
50199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50201    CYGWIN_SYSTEMROOT="$unix_path"
50202  fi
50203
50204    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50205
50206  DLL_NAME="$DLL_NAME"
50207  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50208  METHOD="well-known location in SYSTEMROOT"
50209  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50210    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50211$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50212
50213    # Need to check if the found msvcr is correct architecture
50214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50215$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50216    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50218      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50219      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50220      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50221        CORRECT_MSVCR_ARCH="PE32 executable"
50222      else
50223        CORRECT_MSVCR_ARCH="PE32+ executable"
50224      fi
50225    else
50226      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50227        CORRECT_MSVCR_ARCH=386
50228      else
50229        CORRECT_MSVCR_ARCH=x86-64
50230      fi
50231    fi
50232    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50234$as_echo "ok" >&6; }
50235      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50236
50237  # Only process if variable expands to non-empty
50238
50239  if test "x$MSVC_DLL" != x; then
50240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50241
50242  # Input might be given as Windows format, start by converting to
50243  # unix format.
50244  path="$MSVC_DLL"
50245  new_path=`$CYGPATH -u "$path"`
50246
50247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50250  # "foo.exe" is OK but "foo" is an error.
50251  #
50252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50253  # It is also a way to make sure we got the proper file name for the real test later on.
50254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50255  if test "x$test_shortpath" = x; then
50256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50257$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50258    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50259  fi
50260
50261  # Call helper function which possibly converts this using DOS-style short mode.
50262  # If so, the updated path is stored in $new_path.
50263
50264  input_path="$new_path"
50265  # Check if we need to convert this using DOS-style short mode. If the path
50266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50267  # take no chances and rewrite it.
50268  # Note: m4 eats our [], so we need to use [ and ] instead.
50269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50270  if test "x$has_forbidden_chars" != x; then
50271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50275      # Going to short mode and back again did indeed matter. Since short mode is
50276      # case insensitive, let's make it lowercase to improve readability.
50277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50278      # Now convert it back to Unix-style (cygpath)
50279      input_path=`$CYGPATH -u "$shortmode_path"`
50280      new_path="$input_path"
50281    fi
50282  fi
50283
50284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50285  if test "x$test_cygdrive_prefix" = x; then
50286    # As a simple fix, exclude /usr/bin since it's not a real path.
50287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50289      # a path prefixed by /cygdrive for fixpath to work.
50290      new_path="$CYGWIN_ROOT_PATH$input_path"
50291    fi
50292  fi
50293
50294
50295  if test "x$path" != "x$new_path"; then
50296    MSVC_DLL="$new_path"
50297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50298$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50299  fi
50300
50301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50302
50303  path="$MSVC_DLL"
50304  has_colon=`$ECHO $path | $GREP ^.:`
50305  new_path="$path"
50306  if test "x$has_colon" = x; then
50307    # Not in mixed or Windows style, start by that.
50308    new_path=`cmd //c echo $path`
50309  fi
50310
50311
50312  input_path="$new_path"
50313  # Check if we need to convert this using DOS-style short mode. If the path
50314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50315  # take no chances and rewrite it.
50316  # Note: m4 eats our [], so we need to use [ and ] instead.
50317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50318  if test "x$has_forbidden_chars" != x; then
50319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50321  fi
50322
50323
50324  windows_path="$new_path"
50325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50326    unix_path=`$CYGPATH -u "$windows_path"`
50327    new_path="$unix_path"
50328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50330    new_path="$unix_path"
50331  fi
50332
50333  if test "x$path" != "x$new_path"; then
50334    MSVC_DLL="$new_path"
50335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50336$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50337  fi
50338
50339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50341
50342    else
50343      # We're on a unix platform. Hooray! :)
50344      path="$MSVC_DLL"
50345      has_space=`$ECHO "$path" | $GREP " "`
50346      if test "x$has_space" != x; then
50347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50348$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50350      fi
50351
50352      # Use eval to expand a potential ~
50353      eval path="$path"
50354      if test ! -f "$path" && test ! -d "$path"; then
50355        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50356      fi
50357
50358      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50359    fi
50360  fi
50361
50362      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50363$as_echo_n "checking for $DLL_NAME... " >&6; }
50364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50365$as_echo "$MSVC_DLL" >&6; }
50366    else
50367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50368$as_echo "incorrect, ignoring" >&6; }
50369      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50370$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50371    fi
50372  fi
50373
50374  fi
50375
50376  if test "x$MSVC_DLL" = x; then
50377    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50378    if test "x$VS100COMNTOOLS" != x; then
50379      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50380
50381  windows_path="$CYGWIN_VS_TOOLS_DIR"
50382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50383    unix_path=`$CYGPATH -u "$windows_path"`
50384    CYGWIN_VS_TOOLS_DIR="$unix_path"
50385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50387    CYGWIN_VS_TOOLS_DIR="$unix_path"
50388  fi
50389
50390      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50391        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50392	    | $GREP -i /x64/ | $HEAD --lines 1`
50393      else
50394        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50395	    | $GREP -i /x86/ | $HEAD --lines 1`
50396      fi
50397
50398  DLL_NAME="$DLL_NAME"
50399  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50400  METHOD="search of VS100COMNTOOLS"
50401  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50402    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50403$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50404
50405    # Need to check if the found msvcr is correct architecture
50406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50407$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50408    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50410      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50411      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50412      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50413        CORRECT_MSVCR_ARCH="PE32 executable"
50414      else
50415        CORRECT_MSVCR_ARCH="PE32+ executable"
50416      fi
50417    else
50418      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50419        CORRECT_MSVCR_ARCH=386
50420      else
50421        CORRECT_MSVCR_ARCH=x86-64
50422      fi
50423    fi
50424    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50426$as_echo "ok" >&6; }
50427      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50428
50429  # Only process if variable expands to non-empty
50430
50431  if test "x$MSVC_DLL" != x; then
50432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50433
50434  # Input might be given as Windows format, start by converting to
50435  # unix format.
50436  path="$MSVC_DLL"
50437  new_path=`$CYGPATH -u "$path"`
50438
50439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50442  # "foo.exe" is OK but "foo" is an error.
50443  #
50444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50445  # It is also a way to make sure we got the proper file name for the real test later on.
50446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50447  if test "x$test_shortpath" = x; then
50448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50449$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50450    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50451  fi
50452
50453  # Call helper function which possibly converts this using DOS-style short mode.
50454  # If so, the updated path is stored in $new_path.
50455
50456  input_path="$new_path"
50457  # Check if we need to convert this using DOS-style short mode. If the path
50458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50459  # take no chances and rewrite it.
50460  # Note: m4 eats our [], so we need to use [ and ] instead.
50461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50462  if test "x$has_forbidden_chars" != x; then
50463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50467      # Going to short mode and back again did indeed matter. Since short mode is
50468      # case insensitive, let's make it lowercase to improve readability.
50469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50470      # Now convert it back to Unix-style (cygpath)
50471      input_path=`$CYGPATH -u "$shortmode_path"`
50472      new_path="$input_path"
50473    fi
50474  fi
50475
50476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50477  if test "x$test_cygdrive_prefix" = x; then
50478    # As a simple fix, exclude /usr/bin since it's not a real path.
50479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50481      # a path prefixed by /cygdrive for fixpath to work.
50482      new_path="$CYGWIN_ROOT_PATH$input_path"
50483    fi
50484  fi
50485
50486
50487  if test "x$path" != "x$new_path"; then
50488    MSVC_DLL="$new_path"
50489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50490$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50491  fi
50492
50493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50494
50495  path="$MSVC_DLL"
50496  has_colon=`$ECHO $path | $GREP ^.:`
50497  new_path="$path"
50498  if test "x$has_colon" = x; then
50499    # Not in mixed or Windows style, start by that.
50500    new_path=`cmd //c echo $path`
50501  fi
50502
50503
50504  input_path="$new_path"
50505  # Check if we need to convert this using DOS-style short mode. If the path
50506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50507  # take no chances and rewrite it.
50508  # Note: m4 eats our [], so we need to use [ and ] instead.
50509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50510  if test "x$has_forbidden_chars" != x; then
50511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50513  fi
50514
50515
50516  windows_path="$new_path"
50517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50518    unix_path=`$CYGPATH -u "$windows_path"`
50519    new_path="$unix_path"
50520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50522    new_path="$unix_path"
50523  fi
50524
50525  if test "x$path" != "x$new_path"; then
50526    MSVC_DLL="$new_path"
50527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50529  fi
50530
50531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50533
50534    else
50535      # We're on a unix platform. Hooray! :)
50536      path="$MSVC_DLL"
50537      has_space=`$ECHO "$path" | $GREP " "`
50538      if test "x$has_space" != x; then
50539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50540$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50542      fi
50543
50544      # Use eval to expand a potential ~
50545      eval path="$path"
50546      if test ! -f "$path" && test ! -d "$path"; then
50547        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50548      fi
50549
50550      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50551    fi
50552  fi
50553
50554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50555$as_echo_n "checking for $DLL_NAME... " >&6; }
50556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50557$as_echo "$MSVC_DLL" >&6; }
50558    else
50559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50560$as_echo "incorrect, ignoring" >&6; }
50561      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50562$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50563    fi
50564  fi
50565
50566    fi
50567  fi
50568
50569  if test "x$MSVC_DLL" = x; then
50570    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50571    # (This was the original behaviour; kept since it might turn something up)
50572    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50573      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50574        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50575	    | $GREP x64 | $HEAD --lines 1`
50576      else
50577        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50578	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50579        if test "x$POSSIBLE_MSVC_DLL" = x; then
50580          # We're grasping at straws now...
50581          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50582	      | $HEAD --lines 1`
50583        fi
50584      fi
50585
50586
50587  DLL_NAME="$DLL_NAME"
50588  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50589  METHOD="search of VCINSTALLDIR"
50590  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50591    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50592$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50593
50594    # Need to check if the found msvcr is correct architecture
50595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50596$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50597    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50599      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50600      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50601      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50602        CORRECT_MSVCR_ARCH="PE32 executable"
50603      else
50604        CORRECT_MSVCR_ARCH="PE32+ executable"
50605      fi
50606    else
50607      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50608        CORRECT_MSVCR_ARCH=386
50609      else
50610        CORRECT_MSVCR_ARCH=x86-64
50611      fi
50612    fi
50613    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50615$as_echo "ok" >&6; }
50616      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50617
50618  # Only process if variable expands to non-empty
50619
50620  if test "x$MSVC_DLL" != x; then
50621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50622
50623  # Input might be given as Windows format, start by converting to
50624  # unix format.
50625  path="$MSVC_DLL"
50626  new_path=`$CYGPATH -u "$path"`
50627
50628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50631  # "foo.exe" is OK but "foo" is an error.
50632  #
50633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50634  # It is also a way to make sure we got the proper file name for the real test later on.
50635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50636  if test "x$test_shortpath" = x; then
50637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50638$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50639    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50640  fi
50641
50642  # Call helper function which possibly converts this using DOS-style short mode.
50643  # If so, the updated path is stored in $new_path.
50644
50645  input_path="$new_path"
50646  # Check if we need to convert this using DOS-style short mode. If the path
50647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50648  # take no chances and rewrite it.
50649  # Note: m4 eats our [], so we need to use [ and ] instead.
50650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50651  if test "x$has_forbidden_chars" != x; then
50652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50656      # Going to short mode and back again did indeed matter. Since short mode is
50657      # case insensitive, let's make it lowercase to improve readability.
50658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50659      # Now convert it back to Unix-style (cygpath)
50660      input_path=`$CYGPATH -u "$shortmode_path"`
50661      new_path="$input_path"
50662    fi
50663  fi
50664
50665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50666  if test "x$test_cygdrive_prefix" = x; then
50667    # As a simple fix, exclude /usr/bin since it's not a real path.
50668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50670      # a path prefixed by /cygdrive for fixpath to work.
50671      new_path="$CYGWIN_ROOT_PATH$input_path"
50672    fi
50673  fi
50674
50675
50676  if test "x$path" != "x$new_path"; then
50677    MSVC_DLL="$new_path"
50678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50679$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50680  fi
50681
50682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50683
50684  path="$MSVC_DLL"
50685  has_colon=`$ECHO $path | $GREP ^.:`
50686  new_path="$path"
50687  if test "x$has_colon" = x; then
50688    # Not in mixed or Windows style, start by that.
50689    new_path=`cmd //c echo $path`
50690  fi
50691
50692
50693  input_path="$new_path"
50694  # Check if we need to convert this using DOS-style short mode. If the path
50695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50696  # take no chances and rewrite it.
50697  # Note: m4 eats our [], so we need to use [ and ] instead.
50698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50699  if test "x$has_forbidden_chars" != x; then
50700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50702  fi
50703
50704
50705  windows_path="$new_path"
50706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50707    unix_path=`$CYGPATH -u "$windows_path"`
50708    new_path="$unix_path"
50709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50711    new_path="$unix_path"
50712  fi
50713
50714  if test "x$path" != "x$new_path"; then
50715    MSVC_DLL="$new_path"
50716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50717$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50718  fi
50719
50720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50722
50723    else
50724      # We're on a unix platform. Hooray! :)
50725      path="$MSVC_DLL"
50726      has_space=`$ECHO "$path" | $GREP " "`
50727      if test "x$has_space" != x; then
50728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50729$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50730        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50731      fi
50732
50733      # Use eval to expand a potential ~
50734      eval path="$path"
50735      if test ! -f "$path" && test ! -d "$path"; then
50736        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50737      fi
50738
50739      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50740    fi
50741  fi
50742
50743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50744$as_echo_n "checking for $DLL_NAME... " >&6; }
50745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50746$as_echo "$MSVC_DLL" >&6; }
50747    else
50748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50749$as_echo "incorrect, ignoring" >&6; }
50750      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50751$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50752    fi
50753  fi
50754
50755    fi
50756  fi
50757
50758  if test "x$MSVC_DLL" = x; then
50759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50760$as_echo_n "checking for $DLL_NAME... " >&6; }
50761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50762$as_echo "no" >&6; }
50763    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50764  fi
50765
50766    MSVCR_DLL="$MSVC_DLL"
50767  fi
50768
50769
50770
50771# Check whether --with-msvcp-dll was given.
50772if test "${with_msvcp_dll+set}" = set; then :
50773  withval=$with_msvcp_dll;
50774fi
50775
50776
50777  if test "x$MSVCP_NAME" != "x"; then
50778    if test "x$with_msvcp_dll" != x; then
50779      # If given explicitely by user, do not probe. If not present, fail directly.
50780
50781  DLL_NAME="$MSVCP_NAME"
50782  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50783  METHOD="--with-msvcp-dll"
50784  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50786$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50787
50788    # Need to check if the found msvcr is correct architecture
50789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50790$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50791    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50793      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50794      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50795      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50796        CORRECT_MSVCR_ARCH="PE32 executable"
50797      else
50798        CORRECT_MSVCR_ARCH="PE32+ executable"
50799      fi
50800    else
50801      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50802        CORRECT_MSVCR_ARCH=386
50803      else
50804        CORRECT_MSVCR_ARCH=x86-64
50805      fi
50806    fi
50807    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50809$as_echo "ok" >&6; }
50810      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50811
50812  # Only process if variable expands to non-empty
50813
50814  if test "x$MSVC_DLL" != x; then
50815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50816
50817  # Input might be given as Windows format, start by converting to
50818  # unix format.
50819  path="$MSVC_DLL"
50820  new_path=`$CYGPATH -u "$path"`
50821
50822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50825  # "foo.exe" is OK but "foo" is an error.
50826  #
50827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50828  # It is also a way to make sure we got the proper file name for the real test later on.
50829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50830  if test "x$test_shortpath" = x; then
50831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50832$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50833    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50834  fi
50835
50836  # Call helper function which possibly converts this using DOS-style short mode.
50837  # If so, the updated path is stored in $new_path.
50838
50839  input_path="$new_path"
50840  # Check if we need to convert this using DOS-style short mode. If the path
50841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50842  # take no chances and rewrite it.
50843  # Note: m4 eats our [], so we need to use [ and ] instead.
50844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50845  if test "x$has_forbidden_chars" != x; then
50846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50850      # Going to short mode and back again did indeed matter. Since short mode is
50851      # case insensitive, let's make it lowercase to improve readability.
50852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50853      # Now convert it back to Unix-style (cygpath)
50854      input_path=`$CYGPATH -u "$shortmode_path"`
50855      new_path="$input_path"
50856    fi
50857  fi
50858
50859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50860  if test "x$test_cygdrive_prefix" = x; then
50861    # As a simple fix, exclude /usr/bin since it's not a real path.
50862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50864      # a path prefixed by /cygdrive for fixpath to work.
50865      new_path="$CYGWIN_ROOT_PATH$input_path"
50866    fi
50867  fi
50868
50869
50870  if test "x$path" != "x$new_path"; then
50871    MSVC_DLL="$new_path"
50872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50873$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50874  fi
50875
50876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50877
50878  path="$MSVC_DLL"
50879  has_colon=`$ECHO $path | $GREP ^.:`
50880  new_path="$path"
50881  if test "x$has_colon" = x; then
50882    # Not in mixed or Windows style, start by that.
50883    new_path=`cmd //c echo $path`
50884  fi
50885
50886
50887  input_path="$new_path"
50888  # Check if we need to convert this using DOS-style short mode. If the path
50889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50890  # take no chances and rewrite it.
50891  # Note: m4 eats our [], so we need to use [ and ] instead.
50892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50893  if test "x$has_forbidden_chars" != x; then
50894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50896  fi
50897
50898
50899  windows_path="$new_path"
50900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50901    unix_path=`$CYGPATH -u "$windows_path"`
50902    new_path="$unix_path"
50903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50905    new_path="$unix_path"
50906  fi
50907
50908  if test "x$path" != "x$new_path"; then
50909    MSVC_DLL="$new_path"
50910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50911$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50912  fi
50913
50914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50916
50917    else
50918      # We're on a unix platform. Hooray! :)
50919      path="$MSVC_DLL"
50920      has_space=`$ECHO "$path" | $GREP " "`
50921      if test "x$has_space" != x; then
50922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50923$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50925      fi
50926
50927      # Use eval to expand a potential ~
50928      eval path="$path"
50929      if test ! -f "$path" && test ! -d "$path"; then
50930        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50931      fi
50932
50933      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50934    fi
50935  fi
50936
50937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50938$as_echo_n "checking for $DLL_NAME... " >&6; }
50939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50940$as_echo "$MSVC_DLL" >&6; }
50941    else
50942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50943$as_echo "incorrect, ignoring" >&6; }
50944      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50945$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50946    fi
50947  fi
50948
50949      if test "x$MSVC_DLL" = x; then
50950        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50951      fi
50952      MSVCP_DLL="$MSVC_DLL"
50953    elif test "x$DEVKIT_MSVCP_DLL" != x; then
50954
50955  DLL_NAME="$MSVCP_NAME"
50956  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50957  METHOD="devkit"
50958  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50959    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50960$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50961
50962    # Need to check if the found msvcr is correct architecture
50963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50964$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50965    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50967      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50968      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50969      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50970        CORRECT_MSVCR_ARCH="PE32 executable"
50971      else
50972        CORRECT_MSVCR_ARCH="PE32+ executable"
50973      fi
50974    else
50975      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50976        CORRECT_MSVCR_ARCH=386
50977      else
50978        CORRECT_MSVCR_ARCH=x86-64
50979      fi
50980    fi
50981    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50983$as_echo "ok" >&6; }
50984      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50985
50986  # Only process if variable expands to non-empty
50987
50988  if test "x$MSVC_DLL" != x; then
50989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50990
50991  # Input might be given as Windows format, start by converting to
50992  # unix format.
50993  path="$MSVC_DLL"
50994  new_path=`$CYGPATH -u "$path"`
50995
50996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50999  # "foo.exe" is OK but "foo" is an error.
51000  #
51001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51002  # It is also a way to make sure we got the proper file name for the real test later on.
51003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51004  if test "x$test_shortpath" = x; then
51005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51006$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51007    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51008  fi
51009
51010  # Call helper function which possibly converts this using DOS-style short mode.
51011  # If so, the updated path is stored in $new_path.
51012
51013  input_path="$new_path"
51014  # Check if we need to convert this using DOS-style short mode. If the path
51015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51016  # take no chances and rewrite it.
51017  # Note: m4 eats our [], so we need to use [ and ] instead.
51018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51019  if test "x$has_forbidden_chars" != x; then
51020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51024      # Going to short mode and back again did indeed matter. Since short mode is
51025      # case insensitive, let's make it lowercase to improve readability.
51026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51027      # Now convert it back to Unix-style (cygpath)
51028      input_path=`$CYGPATH -u "$shortmode_path"`
51029      new_path="$input_path"
51030    fi
51031  fi
51032
51033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51034  if test "x$test_cygdrive_prefix" = x; then
51035    # As a simple fix, exclude /usr/bin since it's not a real path.
51036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51038      # a path prefixed by /cygdrive for fixpath to work.
51039      new_path="$CYGWIN_ROOT_PATH$input_path"
51040    fi
51041  fi
51042
51043
51044  if test "x$path" != "x$new_path"; then
51045    MSVC_DLL="$new_path"
51046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51047$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51048  fi
51049
51050    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51051
51052  path="$MSVC_DLL"
51053  has_colon=`$ECHO $path | $GREP ^.:`
51054  new_path="$path"
51055  if test "x$has_colon" = x; then
51056    # Not in mixed or Windows style, start by that.
51057    new_path=`cmd //c echo $path`
51058  fi
51059
51060
51061  input_path="$new_path"
51062  # Check if we need to convert this using DOS-style short mode. If the path
51063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51064  # take no chances and rewrite it.
51065  # Note: m4 eats our [], so we need to use [ and ] instead.
51066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51067  if test "x$has_forbidden_chars" != x; then
51068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51070  fi
51071
51072
51073  windows_path="$new_path"
51074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51075    unix_path=`$CYGPATH -u "$windows_path"`
51076    new_path="$unix_path"
51077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51079    new_path="$unix_path"
51080  fi
51081
51082  if test "x$path" != "x$new_path"; then
51083    MSVC_DLL="$new_path"
51084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51085$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51086  fi
51087
51088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51090
51091    else
51092      # We're on a unix platform. Hooray! :)
51093      path="$MSVC_DLL"
51094      has_space=`$ECHO "$path" | $GREP " "`
51095      if test "x$has_space" != x; then
51096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51097$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51098        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51099      fi
51100
51101      # Use eval to expand a potential ~
51102      eval path="$path"
51103      if test ! -f "$path" && test ! -d "$path"; then
51104        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51105      fi
51106
51107      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51108    fi
51109  fi
51110
51111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51112$as_echo_n "checking for $DLL_NAME... " >&6; }
51113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51114$as_echo "$MSVC_DLL" >&6; }
51115    else
51116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51117$as_echo "incorrect, ignoring" >&6; }
51118      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51119$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51120    fi
51121  fi
51122
51123      if test "x$MSVC_DLL" = x; then
51124        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51125      fi
51126      MSVCP_DLL="$MSVC_DLL"
51127    else
51128
51129  DLL_NAME="${MSVCP_NAME}"
51130  MSVC_DLL=
51131
51132  if test "x$MSVC_DLL" = x; then
51133    # Probe: Using well-known location from Visual Studio 10.0
51134    if test "x$VCINSTALLDIR" != x; then
51135      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51136
51137  windows_path="$CYGWIN_VC_INSTALL_DIR"
51138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51139    unix_path=`$CYGPATH -u "$windows_path"`
51140    CYGWIN_VC_INSTALL_DIR="$unix_path"
51141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51143    CYGWIN_VC_INSTALL_DIR="$unix_path"
51144  fi
51145
51146      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51147        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51148      else
51149        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51150      fi
51151      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51152
51153  DLL_NAME="$DLL_NAME"
51154  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51155  METHOD="well-known location in VCINSTALLDIR"
51156  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51157    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51158$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51159
51160    # Need to check if the found msvcr is correct architecture
51161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51162$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51163    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51165      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51166      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51167      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51168        CORRECT_MSVCR_ARCH="PE32 executable"
51169      else
51170        CORRECT_MSVCR_ARCH="PE32+ executable"
51171      fi
51172    else
51173      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51174        CORRECT_MSVCR_ARCH=386
51175      else
51176        CORRECT_MSVCR_ARCH=x86-64
51177      fi
51178    fi
51179    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51181$as_echo "ok" >&6; }
51182      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51183
51184  # Only process if variable expands to non-empty
51185
51186  if test "x$MSVC_DLL" != x; then
51187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51188
51189  # Input might be given as Windows format, start by converting to
51190  # unix format.
51191  path="$MSVC_DLL"
51192  new_path=`$CYGPATH -u "$path"`
51193
51194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51197  # "foo.exe" is OK but "foo" is an error.
51198  #
51199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51200  # It is also a way to make sure we got the proper file name for the real test later on.
51201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51202  if test "x$test_shortpath" = x; then
51203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51204$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51205    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51206  fi
51207
51208  # Call helper function which possibly converts this using DOS-style short mode.
51209  # If so, the updated path is stored in $new_path.
51210
51211  input_path="$new_path"
51212  # Check if we need to convert this using DOS-style short mode. If the path
51213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51214  # take no chances and rewrite it.
51215  # Note: m4 eats our [], so we need to use [ and ] instead.
51216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51217  if test "x$has_forbidden_chars" != x; then
51218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51222      # Going to short mode and back again did indeed matter. Since short mode is
51223      # case insensitive, let's make it lowercase to improve readability.
51224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51225      # Now convert it back to Unix-style (cygpath)
51226      input_path=`$CYGPATH -u "$shortmode_path"`
51227      new_path="$input_path"
51228    fi
51229  fi
51230
51231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51232  if test "x$test_cygdrive_prefix" = x; then
51233    # As a simple fix, exclude /usr/bin since it's not a real path.
51234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51236      # a path prefixed by /cygdrive for fixpath to work.
51237      new_path="$CYGWIN_ROOT_PATH$input_path"
51238    fi
51239  fi
51240
51241
51242  if test "x$path" != "x$new_path"; then
51243    MSVC_DLL="$new_path"
51244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51245$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51246  fi
51247
51248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51249
51250  path="$MSVC_DLL"
51251  has_colon=`$ECHO $path | $GREP ^.:`
51252  new_path="$path"
51253  if test "x$has_colon" = x; then
51254    # Not in mixed or Windows style, start by that.
51255    new_path=`cmd //c echo $path`
51256  fi
51257
51258
51259  input_path="$new_path"
51260  # Check if we need to convert this using DOS-style short mode. If the path
51261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51262  # take no chances and rewrite it.
51263  # Note: m4 eats our [], so we need to use [ and ] instead.
51264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51265  if test "x$has_forbidden_chars" != x; then
51266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51268  fi
51269
51270
51271  windows_path="$new_path"
51272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51273    unix_path=`$CYGPATH -u "$windows_path"`
51274    new_path="$unix_path"
51275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51277    new_path="$unix_path"
51278  fi
51279
51280  if test "x$path" != "x$new_path"; then
51281    MSVC_DLL="$new_path"
51282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51283$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51284  fi
51285
51286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51288
51289    else
51290      # We're on a unix platform. Hooray! :)
51291      path="$MSVC_DLL"
51292      has_space=`$ECHO "$path" | $GREP " "`
51293      if test "x$has_space" != x; then
51294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51295$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51297      fi
51298
51299      # Use eval to expand a potential ~
51300      eval path="$path"
51301      if test ! -f "$path" && test ! -d "$path"; then
51302        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51303      fi
51304
51305      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51306    fi
51307  fi
51308
51309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51310$as_echo_n "checking for $DLL_NAME... " >&6; }
51311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51312$as_echo "$MSVC_DLL" >&6; }
51313    else
51314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51315$as_echo "incorrect, ignoring" >&6; }
51316      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51317$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51318    fi
51319  fi
51320
51321    fi
51322  fi
51323
51324  if test "x$MSVC_DLL" = x; then
51325    # Probe: Check in the Boot JDK directory.
51326    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51327
51328  DLL_NAME="$DLL_NAME"
51329  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51330  METHOD="well-known location in Boot JDK"
51331  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51333$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51334
51335    # Need to check if the found msvcr is correct architecture
51336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51337$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51338    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51340      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51341      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51342      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51343        CORRECT_MSVCR_ARCH="PE32 executable"
51344      else
51345        CORRECT_MSVCR_ARCH="PE32+ executable"
51346      fi
51347    else
51348      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51349        CORRECT_MSVCR_ARCH=386
51350      else
51351        CORRECT_MSVCR_ARCH=x86-64
51352      fi
51353    fi
51354    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51356$as_echo "ok" >&6; }
51357      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51358
51359  # Only process if variable expands to non-empty
51360
51361  if test "x$MSVC_DLL" != x; then
51362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51363
51364  # Input might be given as Windows format, start by converting to
51365  # unix format.
51366  path="$MSVC_DLL"
51367  new_path=`$CYGPATH -u "$path"`
51368
51369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51372  # "foo.exe" is OK but "foo" is an error.
51373  #
51374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51375  # It is also a way to make sure we got the proper file name for the real test later on.
51376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51377  if test "x$test_shortpath" = x; then
51378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51379$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51380    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51381  fi
51382
51383  # Call helper function which possibly converts this using DOS-style short mode.
51384  # If so, the updated path is stored in $new_path.
51385
51386  input_path="$new_path"
51387  # Check if we need to convert this using DOS-style short mode. If the path
51388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51389  # take no chances and rewrite it.
51390  # Note: m4 eats our [], so we need to use [ and ] instead.
51391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51392  if test "x$has_forbidden_chars" != x; then
51393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51397      # Going to short mode and back again did indeed matter. Since short mode is
51398      # case insensitive, let's make it lowercase to improve readability.
51399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51400      # Now convert it back to Unix-style (cygpath)
51401      input_path=`$CYGPATH -u "$shortmode_path"`
51402      new_path="$input_path"
51403    fi
51404  fi
51405
51406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51407  if test "x$test_cygdrive_prefix" = x; then
51408    # As a simple fix, exclude /usr/bin since it's not a real path.
51409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51411      # a path prefixed by /cygdrive for fixpath to work.
51412      new_path="$CYGWIN_ROOT_PATH$input_path"
51413    fi
51414  fi
51415
51416
51417  if test "x$path" != "x$new_path"; then
51418    MSVC_DLL="$new_path"
51419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51420$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51421  fi
51422
51423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51424
51425  path="$MSVC_DLL"
51426  has_colon=`$ECHO $path | $GREP ^.:`
51427  new_path="$path"
51428  if test "x$has_colon" = x; then
51429    # Not in mixed or Windows style, start by that.
51430    new_path=`cmd //c echo $path`
51431  fi
51432
51433
51434  input_path="$new_path"
51435  # Check if we need to convert this using DOS-style short mode. If the path
51436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51437  # take no chances and rewrite it.
51438  # Note: m4 eats our [], so we need to use [ and ] instead.
51439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51440  if test "x$has_forbidden_chars" != x; then
51441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51443  fi
51444
51445
51446  windows_path="$new_path"
51447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51448    unix_path=`$CYGPATH -u "$windows_path"`
51449    new_path="$unix_path"
51450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51452    new_path="$unix_path"
51453  fi
51454
51455  if test "x$path" != "x$new_path"; then
51456    MSVC_DLL="$new_path"
51457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51458$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51459  fi
51460
51461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51463
51464    else
51465      # We're on a unix platform. Hooray! :)
51466      path="$MSVC_DLL"
51467      has_space=`$ECHO "$path" | $GREP " "`
51468      if test "x$has_space" != x; then
51469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51470$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51472      fi
51473
51474      # Use eval to expand a potential ~
51475      eval path="$path"
51476      if test ! -f "$path" && test ! -d "$path"; then
51477        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51478      fi
51479
51480      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51481    fi
51482  fi
51483
51484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51485$as_echo_n "checking for $DLL_NAME... " >&6; }
51486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51487$as_echo "$MSVC_DLL" >&6; }
51488    else
51489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51490$as_echo "incorrect, ignoring" >&6; }
51491      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51492$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51493    fi
51494  fi
51495
51496  fi
51497
51498  if test "x$MSVC_DLL" = x; then
51499    # Probe: Look in the Windows system32 directory
51500    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51501
51502  windows_path="$CYGWIN_SYSTEMROOT"
51503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51504    unix_path=`$CYGPATH -u "$windows_path"`
51505    CYGWIN_SYSTEMROOT="$unix_path"
51506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51508    CYGWIN_SYSTEMROOT="$unix_path"
51509  fi
51510
51511    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51512
51513  DLL_NAME="$DLL_NAME"
51514  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51515  METHOD="well-known location in SYSTEMROOT"
51516  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51518$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51519
51520    # Need to check if the found msvcr is correct architecture
51521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51522$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51523    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51525      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51526      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51527      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51528        CORRECT_MSVCR_ARCH="PE32 executable"
51529      else
51530        CORRECT_MSVCR_ARCH="PE32+ executable"
51531      fi
51532    else
51533      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51534        CORRECT_MSVCR_ARCH=386
51535      else
51536        CORRECT_MSVCR_ARCH=x86-64
51537      fi
51538    fi
51539    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51541$as_echo "ok" >&6; }
51542      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51543
51544  # Only process if variable expands to non-empty
51545
51546  if test "x$MSVC_DLL" != x; then
51547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51548
51549  # Input might be given as Windows format, start by converting to
51550  # unix format.
51551  path="$MSVC_DLL"
51552  new_path=`$CYGPATH -u "$path"`
51553
51554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51557  # "foo.exe" is OK but "foo" is an error.
51558  #
51559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51560  # It is also a way to make sure we got the proper file name for the real test later on.
51561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51562  if test "x$test_shortpath" = x; then
51563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51564$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51565    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51566  fi
51567
51568  # Call helper function which possibly converts this using DOS-style short mode.
51569  # If so, the updated path is stored in $new_path.
51570
51571  input_path="$new_path"
51572  # Check if we need to convert this using DOS-style short mode. If the path
51573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51574  # take no chances and rewrite it.
51575  # Note: m4 eats our [], so we need to use [ and ] instead.
51576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51577  if test "x$has_forbidden_chars" != x; then
51578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51582      # Going to short mode and back again did indeed matter. Since short mode is
51583      # case insensitive, let's make it lowercase to improve readability.
51584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51585      # Now convert it back to Unix-style (cygpath)
51586      input_path=`$CYGPATH -u "$shortmode_path"`
51587      new_path="$input_path"
51588    fi
51589  fi
51590
51591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51592  if test "x$test_cygdrive_prefix" = x; then
51593    # As a simple fix, exclude /usr/bin since it's not a real path.
51594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51596      # a path prefixed by /cygdrive for fixpath to work.
51597      new_path="$CYGWIN_ROOT_PATH$input_path"
51598    fi
51599  fi
51600
51601
51602  if test "x$path" != "x$new_path"; then
51603    MSVC_DLL="$new_path"
51604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51605$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51606  fi
51607
51608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51609
51610  path="$MSVC_DLL"
51611  has_colon=`$ECHO $path | $GREP ^.:`
51612  new_path="$path"
51613  if test "x$has_colon" = x; then
51614    # Not in mixed or Windows style, start by that.
51615    new_path=`cmd //c echo $path`
51616  fi
51617
51618
51619  input_path="$new_path"
51620  # Check if we need to convert this using DOS-style short mode. If the path
51621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51622  # take no chances and rewrite it.
51623  # Note: m4 eats our [], so we need to use [ and ] instead.
51624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51625  if test "x$has_forbidden_chars" != x; then
51626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51628  fi
51629
51630
51631  windows_path="$new_path"
51632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51633    unix_path=`$CYGPATH -u "$windows_path"`
51634    new_path="$unix_path"
51635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51637    new_path="$unix_path"
51638  fi
51639
51640  if test "x$path" != "x$new_path"; then
51641    MSVC_DLL="$new_path"
51642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51643$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51644  fi
51645
51646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51648
51649    else
51650      # We're on a unix platform. Hooray! :)
51651      path="$MSVC_DLL"
51652      has_space=`$ECHO "$path" | $GREP " "`
51653      if test "x$has_space" != x; then
51654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51655$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51657      fi
51658
51659      # Use eval to expand a potential ~
51660      eval path="$path"
51661      if test ! -f "$path" && test ! -d "$path"; then
51662        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51663      fi
51664
51665      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51666    fi
51667  fi
51668
51669      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51670$as_echo_n "checking for $DLL_NAME... " >&6; }
51671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51672$as_echo "$MSVC_DLL" >&6; }
51673    else
51674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51675$as_echo "incorrect, ignoring" >&6; }
51676      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51677$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51678    fi
51679  fi
51680
51681  fi
51682
51683  if test "x$MSVC_DLL" = x; then
51684    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51685    if test "x$VS100COMNTOOLS" != x; then
51686      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51687
51688  windows_path="$CYGWIN_VS_TOOLS_DIR"
51689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51690    unix_path=`$CYGPATH -u "$windows_path"`
51691    CYGWIN_VS_TOOLS_DIR="$unix_path"
51692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51694    CYGWIN_VS_TOOLS_DIR="$unix_path"
51695  fi
51696
51697      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51698        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51699	    | $GREP -i /x64/ | $HEAD --lines 1`
51700      else
51701        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51702	    | $GREP -i /x86/ | $HEAD --lines 1`
51703      fi
51704
51705  DLL_NAME="$DLL_NAME"
51706  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51707  METHOD="search of VS100COMNTOOLS"
51708  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51710$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51711
51712    # Need to check if the found msvcr is correct architecture
51713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51714$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51715    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51717      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51718      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51719      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51720        CORRECT_MSVCR_ARCH="PE32 executable"
51721      else
51722        CORRECT_MSVCR_ARCH="PE32+ executable"
51723      fi
51724    else
51725      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51726        CORRECT_MSVCR_ARCH=386
51727      else
51728        CORRECT_MSVCR_ARCH=x86-64
51729      fi
51730    fi
51731    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51733$as_echo "ok" >&6; }
51734      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51735
51736  # Only process if variable expands to non-empty
51737
51738  if test "x$MSVC_DLL" != x; then
51739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51740
51741  # Input might be given as Windows format, start by converting to
51742  # unix format.
51743  path="$MSVC_DLL"
51744  new_path=`$CYGPATH -u "$path"`
51745
51746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51749  # "foo.exe" is OK but "foo" is an error.
51750  #
51751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51752  # It is also a way to make sure we got the proper file name for the real test later on.
51753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51754  if test "x$test_shortpath" = x; then
51755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51756$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51757    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51758  fi
51759
51760  # Call helper function which possibly converts this using DOS-style short mode.
51761  # If so, the updated path is stored in $new_path.
51762
51763  input_path="$new_path"
51764  # Check if we need to convert this using DOS-style short mode. If the path
51765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51766  # take no chances and rewrite it.
51767  # Note: m4 eats our [], so we need to use [ and ] instead.
51768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51769  if test "x$has_forbidden_chars" != x; then
51770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51774      # Going to short mode and back again did indeed matter. Since short mode is
51775      # case insensitive, let's make it lowercase to improve readability.
51776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51777      # Now convert it back to Unix-style (cygpath)
51778      input_path=`$CYGPATH -u "$shortmode_path"`
51779      new_path="$input_path"
51780    fi
51781  fi
51782
51783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51784  if test "x$test_cygdrive_prefix" = x; then
51785    # As a simple fix, exclude /usr/bin since it's not a real path.
51786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51788      # a path prefixed by /cygdrive for fixpath to work.
51789      new_path="$CYGWIN_ROOT_PATH$input_path"
51790    fi
51791  fi
51792
51793
51794  if test "x$path" != "x$new_path"; then
51795    MSVC_DLL="$new_path"
51796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51797$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51798  fi
51799
51800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51801
51802  path="$MSVC_DLL"
51803  has_colon=`$ECHO $path | $GREP ^.:`
51804  new_path="$path"
51805  if test "x$has_colon" = x; then
51806    # Not in mixed or Windows style, start by that.
51807    new_path=`cmd //c echo $path`
51808  fi
51809
51810
51811  input_path="$new_path"
51812  # Check if we need to convert this using DOS-style short mode. If the path
51813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51814  # take no chances and rewrite it.
51815  # Note: m4 eats our [], so we need to use [ and ] instead.
51816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51817  if test "x$has_forbidden_chars" != x; then
51818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51820  fi
51821
51822
51823  windows_path="$new_path"
51824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51825    unix_path=`$CYGPATH -u "$windows_path"`
51826    new_path="$unix_path"
51827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51829    new_path="$unix_path"
51830  fi
51831
51832  if test "x$path" != "x$new_path"; then
51833    MSVC_DLL="$new_path"
51834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51835$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51836  fi
51837
51838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51840
51841    else
51842      # We're on a unix platform. Hooray! :)
51843      path="$MSVC_DLL"
51844      has_space=`$ECHO "$path" | $GREP " "`
51845      if test "x$has_space" != x; then
51846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51849      fi
51850
51851      # Use eval to expand a potential ~
51852      eval path="$path"
51853      if test ! -f "$path" && test ! -d "$path"; then
51854        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51855      fi
51856
51857      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51858    fi
51859  fi
51860
51861      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51862$as_echo_n "checking for $DLL_NAME... " >&6; }
51863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51864$as_echo "$MSVC_DLL" >&6; }
51865    else
51866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51867$as_echo "incorrect, ignoring" >&6; }
51868      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51869$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51870    fi
51871  fi
51872
51873    fi
51874  fi
51875
51876  if test "x$MSVC_DLL" = x; then
51877    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51878    # (This was the original behaviour; kept since it might turn something up)
51879    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51880      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51881        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51882	    | $GREP x64 | $HEAD --lines 1`
51883      else
51884        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51885	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51886        if test "x$POSSIBLE_MSVC_DLL" = x; then
51887          # We're grasping at straws now...
51888          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51889	      | $HEAD --lines 1`
51890        fi
51891      fi
51892
51893
51894  DLL_NAME="$DLL_NAME"
51895  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51896  METHOD="search of VCINSTALLDIR"
51897  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51898    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51899$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51900
51901    # Need to check if the found msvcr is correct architecture
51902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51903$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51904    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51906      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51907      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51908      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51909        CORRECT_MSVCR_ARCH="PE32 executable"
51910      else
51911        CORRECT_MSVCR_ARCH="PE32+ executable"
51912      fi
51913    else
51914      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51915        CORRECT_MSVCR_ARCH=386
51916      else
51917        CORRECT_MSVCR_ARCH=x86-64
51918      fi
51919    fi
51920    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51922$as_echo "ok" >&6; }
51923      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51924
51925  # Only process if variable expands to non-empty
51926
51927  if test "x$MSVC_DLL" != x; then
51928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51929
51930  # Input might be given as Windows format, start by converting to
51931  # unix format.
51932  path="$MSVC_DLL"
51933  new_path=`$CYGPATH -u "$path"`
51934
51935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51938  # "foo.exe" is OK but "foo" is an error.
51939  #
51940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51941  # It is also a way to make sure we got the proper file name for the real test later on.
51942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51943  if test "x$test_shortpath" = x; then
51944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51945$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51946    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51947  fi
51948
51949  # Call helper function which possibly converts this using DOS-style short mode.
51950  # If so, the updated path is stored in $new_path.
51951
51952  input_path="$new_path"
51953  # Check if we need to convert this using DOS-style short mode. If the path
51954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51955  # take no chances and rewrite it.
51956  # Note: m4 eats our [], so we need to use [ and ] instead.
51957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51958  if test "x$has_forbidden_chars" != x; then
51959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51963      # Going to short mode and back again did indeed matter. Since short mode is
51964      # case insensitive, let's make it lowercase to improve readability.
51965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51966      # Now convert it back to Unix-style (cygpath)
51967      input_path=`$CYGPATH -u "$shortmode_path"`
51968      new_path="$input_path"
51969    fi
51970  fi
51971
51972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51973  if test "x$test_cygdrive_prefix" = x; then
51974    # As a simple fix, exclude /usr/bin since it's not a real path.
51975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51977      # a path prefixed by /cygdrive for fixpath to work.
51978      new_path="$CYGWIN_ROOT_PATH$input_path"
51979    fi
51980  fi
51981
51982
51983  if test "x$path" != "x$new_path"; then
51984    MSVC_DLL="$new_path"
51985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51986$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51987  fi
51988
51989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51990
51991  path="$MSVC_DLL"
51992  has_colon=`$ECHO $path | $GREP ^.:`
51993  new_path="$path"
51994  if test "x$has_colon" = x; then
51995    # Not in mixed or Windows style, start by that.
51996    new_path=`cmd //c echo $path`
51997  fi
51998
51999
52000  input_path="$new_path"
52001  # Check if we need to convert this using DOS-style short mode. If the path
52002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52003  # take no chances and rewrite it.
52004  # Note: m4 eats our [], so we need to use [ and ] instead.
52005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52006  if test "x$has_forbidden_chars" != x; then
52007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52009  fi
52010
52011
52012  windows_path="$new_path"
52013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52014    unix_path=`$CYGPATH -u "$windows_path"`
52015    new_path="$unix_path"
52016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52018    new_path="$unix_path"
52019  fi
52020
52021  if test "x$path" != "x$new_path"; then
52022    MSVC_DLL="$new_path"
52023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52024$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52025  fi
52026
52027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52029
52030    else
52031      # We're on a unix platform. Hooray! :)
52032      path="$MSVC_DLL"
52033      has_space=`$ECHO "$path" | $GREP " "`
52034      if test "x$has_space" != x; then
52035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52036$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52038      fi
52039
52040      # Use eval to expand a potential ~
52041      eval path="$path"
52042      if test ! -f "$path" && test ! -d "$path"; then
52043        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52044      fi
52045
52046      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52047    fi
52048  fi
52049
52050      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52051$as_echo_n "checking for $DLL_NAME... " >&6; }
52052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52053$as_echo "$MSVC_DLL" >&6; }
52054    else
52055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52056$as_echo "incorrect, ignoring" >&6; }
52057      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52058$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52059    fi
52060  fi
52061
52062    fi
52063  fi
52064
52065  if test "x$MSVC_DLL" = x; then
52066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52067$as_echo_n "checking for $DLL_NAME... " >&6; }
52068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52069$as_echo "no" >&6; }
52070    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52071  fi
52072
52073      MSVCP_DLL="$MSVC_DLL"
52074    fi
52075
52076  fi
52077
52078
52079
52080# Check whether --with-dxsdk was given.
52081if test "${with_dxsdk+set}" = set; then :
52082  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52083$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52084fi
52085
52086
52087
52088
52089# Check whether --with-dxsdk-lib was given.
52090if test "${with_dxsdk_lib+set}" = set; then :
52091  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52092$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52093fi
52094
52095
52096
52097
52098# Check whether --with-dxsdk-include was given.
52099if test "${with_dxsdk_include+set}" = set; then :
52100  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52101$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52102fi
52103
52104
52105  fi
52106
52107
52108###############################################################################
52109#
52110# We need to do some final tweaking, when everything else is done.
52111#
52112###############################################################################
52113
52114
52115  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52116
52117
52118  # The name of the Service Agent jar.
52119  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52120  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52121    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52122  fi
52123
52124
52125
52126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52127$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52128
52129    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52130      ENABLE_INTREE_EC=yes
52131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52132$as_echo "yes" >&6; }
52133    else
52134      ENABLE_INTREE_EC=no
52135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52136$as_echo "no" >&6; }
52137    fi
52138
52139
52140
52141
52142###############################################################################
52143#
52144# Configure parts of the build that only affect the build performance,
52145# not the result.
52146#
52147###############################################################################
52148
52149
52150  # How many cores do we have on this build system?
52151
52152# Check whether --with-num-cores was given.
52153if test "${with_num_cores+set}" = set; then :
52154  withval=$with_num_cores;
52155fi
52156
52157  if test "x$with_num_cores" = x; then
52158    # The number of cores were not specified, try to probe them.
52159
52160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52161$as_echo_n "checking for number of cores... " >&6; }
52162  NUM_CORES=1
52163  FOUND_CORES=no
52164
52165  if test -f /proc/cpuinfo; then
52166    # Looks like a Linux (or cygwin) system
52167    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52168    FOUND_CORES=yes
52169  elif test -x /usr/sbin/psrinfo; then
52170    # Looks like a Solaris system
52171    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52172    FOUND_CORES=yes
52173  elif test -x /usr/sbin/system_profiler; then
52174    # Looks like a MacOSX system
52175    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52176    FOUND_CORES=yes
52177  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52178    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52179    FOUND_CORES=yes
52180  elif test -n "$NUMBER_OF_PROCESSORS"; then
52181    # On windows, look in the env
52182    NUM_CORES=$NUMBER_OF_PROCESSORS
52183    FOUND_CORES=yes
52184  fi
52185
52186  if test "x$FOUND_CORES" = xyes; then
52187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52188$as_echo "$NUM_CORES" >&6; }
52189  else
52190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52191$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52193$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52194  fi
52195
52196  else
52197    NUM_CORES=$with_num_cores
52198  fi
52199
52200
52201
52202  # How much memory do we have on this build system?
52203
52204# Check whether --with-memory-size was given.
52205if test "${with_memory_size+set}" = set; then :
52206  withval=$with_memory_size;
52207fi
52208
52209  if test "x$with_memory_size" = x; then
52210    # The memory size was not specified, try to probe it.
52211
52212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52213$as_echo_n "checking for memory size... " >&6; }
52214  # Default to 1024 MB
52215  MEMORY_SIZE=1024
52216  FOUND_MEM=no
52217
52218  if test -f /proc/meminfo; then
52219    # Looks like a Linux (or cygwin) system
52220    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52221    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52222    FOUND_MEM=yes
52223  elif test -x /usr/sbin/prtconf; then
52224    # Looks like a Solaris or AIX system
52225    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52226    FOUND_MEM=yes
52227  elif test -x /usr/sbin/system_profiler; then
52228    # Looks like a MacOSX system
52229    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52230    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52231    FOUND_MEM=yes
52232  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52233    # Windows, but without cygwin
52234    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52235    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52236    FOUND_MEM=yes
52237  fi
52238
52239  if test "x$FOUND_MEM" = xyes; then
52240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52241$as_echo "$MEMORY_SIZE MB" >&6; }
52242  else
52243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52244$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52245    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52246$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52247  fi
52248
52249  else
52250    MEMORY_SIZE=$with_memory_size
52251  fi
52252
52253
52254
52255  # Provide a decent default number of parallel jobs for make depending on
52256  # number of cores, amount of memory and machine architecture.
52257
52258# Check whether --with-jobs was given.
52259if test "${with_jobs+set}" = set; then :
52260  withval=$with_jobs;
52261fi
52262
52263  if test "x$with_jobs" = x; then
52264    # Number of jobs was not specified, calculate.
52265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52266$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52267    # Approximate memory in GB.
52268    memory_gb=`expr $MEMORY_SIZE / 1024`
52269    # Pick the lowest of memory in gb and number of cores.
52270    if test "$memory_gb" -lt "$NUM_CORES"; then
52271      JOBS="$memory_gb"
52272    else
52273      JOBS="$NUM_CORES"
52274      # On bigger machines, leave some room for other processes to run
52275      if test "$JOBS" -gt "4"; then
52276        JOBS=`expr $JOBS '*' 90 / 100`
52277      fi
52278    fi
52279    # Cap number of jobs to 16
52280    if test "$JOBS" -gt "16"; then
52281      JOBS=16
52282    fi
52283    if test "$JOBS" -eq "0"; then
52284      JOBS=1
52285    fi
52286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52287$as_echo "$JOBS" >&6; }
52288  else
52289    JOBS=$with_jobs
52290  fi
52291
52292
52293
52294# Setup arguments for the boot jdk (after cores and memory have been setup)
52295
52296  ##############################################################################
52297  #
52298  # Specify jvm options for anything that is run with the Boot JDK.
52299  # Not all JVM:s accept the same arguments on the command line.
52300  #
52301
52302# Check whether --with-boot-jdk-jvmargs was given.
52303if test "${with_boot_jdk_jvmargs+set}" = set; then :
52304  withval=$with_boot_jdk_jvmargs;
52305fi
52306
52307
52308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52309$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52310
52311  # Disable special log output when a debug build is used as Boot JDK...
52312
52313  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52314  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52315  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52316  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52317  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52318  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52319    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52320    JVM_ARG_OK=true
52321  else
52322    $ECHO "Arg failed:" >&5
52323    $ECHO "$OUTPUT" >&5
52324    JVM_ARG_OK=false
52325  fi
52326
52327
52328  # Apply user provided options.
52329
52330  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52331  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52332  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52333  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52334  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52335  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52336    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52337    JVM_ARG_OK=true
52338  else
52339    $ECHO "Arg failed:" >&5
52340    $ECHO "$OUTPUT" >&5
52341    JVM_ARG_OK=false
52342  fi
52343
52344
52345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52346$as_echo "$boot_jdk_jvmargs" >&6; }
52347
52348  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52349  JAVA_FLAGS=$boot_jdk_jvmargs
52350
52351
52352
52353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52354$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52355
52356  # Starting amount of heap memory.
52357
52358  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52359  $ECHO "Command: $JAVA -Xms64M -version" >&5
52360  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52361  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52362  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52363  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52364    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52365    JVM_ARG_OK=true
52366  else
52367    $ECHO "Arg failed:" >&5
52368    $ECHO "$OUTPUT" >&5
52369    JVM_ARG_OK=false
52370  fi
52371
52372
52373  # Maximum amount of heap memory.
52374  # Maximum stack size.
52375  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52376  if test "x$BUILD_NUM_BITS" = x32; then
52377    if test "$JVM_MAX_HEAP" -gt "1100"; then
52378      JVM_MAX_HEAP=1100
52379    elif test "$JVM_MAX_HEAP" -lt "512"; then
52380      JVM_MAX_HEAP=512
52381    fi
52382    STACK_SIZE=768
52383  else
52384    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52385    # pointers are used. Apparently, we need to increase the heap and stack
52386    # space for the jvm. More specifically, when running javac to build huge
52387    # jdk batch
52388    if test "$JVM_MAX_HEAP" -gt "1600"; then
52389      JVM_MAX_HEAP=1600
52390    elif test "$JVM_MAX_HEAP" -lt "512"; then
52391      JVM_MAX_HEAP=512
52392    fi
52393    STACK_SIZE=1536
52394  fi
52395
52396  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52397  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52398  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52399  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52400  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52401  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52402    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52403    JVM_ARG_OK=true
52404  else
52405    $ECHO "Arg failed:" >&5
52406    $ECHO "$OUTPUT" >&5
52407    JVM_ARG_OK=false
52408  fi
52409
52410
52411  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52412  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52413  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52414  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52415  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52416  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52417    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52418    JVM_ARG_OK=true
52419  else
52420    $ECHO "Arg failed:" >&5
52421    $ECHO "$OUTPUT" >&5
52422    JVM_ARG_OK=false
52423  fi
52424
52425
52426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52427$as_echo "$boot_jdk_jvmargs_big" >&6; }
52428
52429  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52430
52431
52432
52433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52434$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52435
52436  # Use serial gc for small short lived tools if possible
52437
52438  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52439  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52440  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52441  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52442  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52443  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52444    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52445    JVM_ARG_OK=true
52446  else
52447    $ECHO "Arg failed:" >&5
52448    $ECHO "$OUTPUT" >&5
52449    JVM_ARG_OK=false
52450  fi
52451
52452
52453  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52454  $ECHO "Command: $JAVA -Xms32M -version" >&5
52455  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52456  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52457  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52458  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52459    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52460    JVM_ARG_OK=true
52461  else
52462    $ECHO "Arg failed:" >&5
52463    $ECHO "$OUTPUT" >&5
52464    JVM_ARG_OK=false
52465  fi
52466
52467
52468  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52469  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52470  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52471  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52472  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52473  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52474    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52475    JVM_ARG_OK=true
52476  else
52477    $ECHO "Arg failed:" >&5
52478    $ECHO "$OUTPUT" >&5
52479    JVM_ARG_OK=false
52480  fi
52481
52482
52483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52484$as_echo "$boot_jdk_jvmargs_small" >&6; }
52485
52486  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52487
52488
52489  JAVA_TOOL_FLAGS_SMALL=""
52490  for f in $JAVA_FLAGS_SMALL; do
52491    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52492  done
52493
52494
52495
52496# Setup smart javac (after cores and memory have been setup)
52497
52498
52499# Check whether --with-sjavac-server-java was given.
52500if test "${with_sjavac_server_java+set}" = set; then :
52501  withval=$with_sjavac_server_java;
52502fi
52503
52504
52505  if test "x$with_sjavac_server_java" != x; then
52506    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52507    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52508    if test "x$FOUND_VERSION" = x; then
52509      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52510    fi
52511  else
52512    SJAVAC_SERVER_JAVA="$JAVA"
52513  fi
52514
52515
52516  if test "$MEMORY_SIZE" -gt "3000"; then
52517
52518  $ECHO "Check if jvm arg is ok: -d64" >&5
52519  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52520  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52521  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52522  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52523  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52524    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52525    JVM_ARG_OK=true
52526  else
52527    $ECHO "Arg failed:" >&5
52528    $ECHO "$OUTPUT" >&5
52529    JVM_ARG_OK=false
52530  fi
52531
52532    if test "$JVM_ARG_OK" = true; then
52533      JVM_64BIT=true
52534      JVM_ARG_OK=false
52535    fi
52536  fi
52537
52538  MX_VALUE=`expr $MEMORY_SIZE / 2`
52539  if test "$JVM_64BIT" = true; then
52540    # Set ms lower than mx since more than one instance of the server might
52541    # get launched at the same time before they figure out which instance won.
52542    MS_VALUE=512
52543    if test "$MX_VALUE" -gt "2048"; then
52544      MX_VALUE=2048
52545    fi
52546  else
52547    MS_VALUE=256
52548    if test "$MX_VALUE" -gt "1500"; then
52549      MX_VALUE=1500
52550    fi
52551  fi
52552  if test "$MX_VALUE" -lt "512"; then
52553    MX_VALUE=512
52554  fi
52555
52556  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52557  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52558  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52559  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52560  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52561  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52562    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52563    JVM_ARG_OK=true
52564  else
52565    $ECHO "Arg failed:" >&5
52566    $ECHO "$OUTPUT" >&5
52567    JVM_ARG_OK=false
52568  fi
52569
52570
52571
52572  # Check whether --enable-sjavac was given.
52573if test "${enable_sjavac+set}" = set; then :
52574  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52575else
52576  ENABLE_SJAVAC='no'
52577fi
52578
52579  if test "x$JVM_ARG_OK" = "xfalse"; then
52580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52581$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52582    ENABLE_SJAVAC=no;
52583  fi
52584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52585$as_echo_n "checking whether to use sjavac... " >&6; }
52586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52587$as_echo "$ENABLE_SJAVAC" >&6; }
52588
52589
52590
52591# Can the C/C++ compiler use precompiled headers?
52592
52593
52594  ###############################################################################
52595  #
52596  # Can the C/C++ compiler use precompiled headers?
52597  #
52598  # Check whether --enable-precompiled-headers was given.
52599if test "${enable_precompiled_headers+set}" = set; then :
52600  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52601else
52602  ENABLE_PRECOMPH=yes
52603fi
52604
52605
52606  USE_PRECOMPILED_HEADER=1
52607  if test "x$ENABLE_PRECOMPH" = xno; then
52608    USE_PRECOMPILED_HEADER=0
52609  fi
52610
52611  if test "x$ENABLE_PRECOMPH" = xyes; then
52612    # Check that the compiler actually supports precomp headers.
52613    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52614      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52615$as_echo_n "checking that precompiled headers work... " >&6; }
52616      echo "int alfa();" > conftest.h
52617      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52618      if test ! -f conftest.hpp.gch; then
52619        USE_PRECOMPILED_HEADER=0
52620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52621$as_echo "no" >&6; }
52622      else
52623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52624$as_echo "yes" >&6; }
52625      fi
52626      rm -f conftest.h conftest.hpp.gch
52627    fi
52628  fi
52629
52630
52631
52632
52633# Setup use of ccache, if available
52634
52635  # Check whether --enable-ccache was given.
52636if test "${enable_ccache+set}" = set; then :
52637  enableval=$enable_ccache;
52638fi
52639
52640
52641  CCACHE=
52642  CCACHE_STATUS=
52643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52644$as_echo_n "checking is ccache enabled... " >&6; }
52645  if test "x$enable_ccache" = xyes; then
52646    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52648$as_echo "yes" >&6; }
52649      OLD_PATH="$PATH"
52650      if test "x$TOOLCHAIN_PATH" != x; then
52651        PATH=$TOOLCHAIN_PATH:$PATH
52652      fi
52653
52654
52655
52656  # Publish this variable in the help.
52657
52658
52659  if test "x$CCACHE" = x; then
52660    # The variable is not set by user, try to locate tool using the code snippet
52661    for ac_prog in ccache
52662do
52663  # Extract the first word of "$ac_prog", so it can be a program name with args.
52664set dummy $ac_prog; ac_word=$2
52665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52666$as_echo_n "checking for $ac_word... " >&6; }
52667if ${ac_cv_path_CCACHE+:} false; then :
52668  $as_echo_n "(cached) " >&6
52669else
52670  case $CCACHE in
52671  [\\/]* | ?:[\\/]*)
52672  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52673  ;;
52674  *)
52675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52676for as_dir in $PATH
52677do
52678  IFS=$as_save_IFS
52679  test -z "$as_dir" && as_dir=.
52680    for ac_exec_ext in '' $ac_executable_extensions; do
52681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52682    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52684    break 2
52685  fi
52686done
52687  done
52688IFS=$as_save_IFS
52689
52690  ;;
52691esac
52692fi
52693CCACHE=$ac_cv_path_CCACHE
52694if test -n "$CCACHE"; then
52695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52696$as_echo "$CCACHE" >&6; }
52697else
52698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52699$as_echo "no" >&6; }
52700fi
52701
52702
52703  test -n "$CCACHE" && break
52704done
52705
52706  else
52707    # The variable is set, but is it from the command line or the environment?
52708
52709    # Try to remove the string !CCACHE! from our list.
52710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52712      # If it failed, the variable was not from the command line. Ignore it,
52713      # but warn the user (except for BASH, which is always set by the calling BASH).
52714      if test "xCCACHE" != xBASH; then
52715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52716$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52717      fi
52718      # Try to locate tool using the code snippet
52719      for ac_prog in ccache
52720do
52721  # Extract the first word of "$ac_prog", so it can be a program name with args.
52722set dummy $ac_prog; ac_word=$2
52723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52724$as_echo_n "checking for $ac_word... " >&6; }
52725if ${ac_cv_path_CCACHE+:} false; then :
52726  $as_echo_n "(cached) " >&6
52727else
52728  case $CCACHE in
52729  [\\/]* | ?:[\\/]*)
52730  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52731  ;;
52732  *)
52733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52734for as_dir in $PATH
52735do
52736  IFS=$as_save_IFS
52737  test -z "$as_dir" && as_dir=.
52738    for ac_exec_ext in '' $ac_executable_extensions; do
52739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52740    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52742    break 2
52743  fi
52744done
52745  done
52746IFS=$as_save_IFS
52747
52748  ;;
52749esac
52750fi
52751CCACHE=$ac_cv_path_CCACHE
52752if test -n "$CCACHE"; then
52753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52754$as_echo "$CCACHE" >&6; }
52755else
52756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52757$as_echo "no" >&6; }
52758fi
52759
52760
52761  test -n "$CCACHE" && break
52762done
52763
52764    else
52765      # If it succeeded, then it was overridden by the user. We will use it
52766      # for the tool.
52767
52768      # First remove it from the list of overridden variables, so we can test
52769      # for unknown variables in the end.
52770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52771
52772      # Check if the provided tool contains a complete path.
52773      tool_specified="$CCACHE"
52774      tool_basename="${tool_specified##*/}"
52775      if test "x$tool_basename" = "x$tool_specified"; then
52776        # A command without a complete path is provided, search $PATH.
52777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52778$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52779        # Extract the first word of "$tool_basename", so it can be a program name with args.
52780set dummy $tool_basename; ac_word=$2
52781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52782$as_echo_n "checking for $ac_word... " >&6; }
52783if ${ac_cv_path_CCACHE+:} false; then :
52784  $as_echo_n "(cached) " >&6
52785else
52786  case $CCACHE in
52787  [\\/]* | ?:[\\/]*)
52788  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52789  ;;
52790  *)
52791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52792for as_dir in $PATH
52793do
52794  IFS=$as_save_IFS
52795  test -z "$as_dir" && as_dir=.
52796    for ac_exec_ext in '' $ac_executable_extensions; do
52797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52798    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52800    break 2
52801  fi
52802done
52803  done
52804IFS=$as_save_IFS
52805
52806  ;;
52807esac
52808fi
52809CCACHE=$ac_cv_path_CCACHE
52810if test -n "$CCACHE"; then
52811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52812$as_echo "$CCACHE" >&6; }
52813else
52814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52815$as_echo "no" >&6; }
52816fi
52817
52818
52819        if test "x$CCACHE" = x; then
52820          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52821        fi
52822      else
52823        # Otherwise we believe it is a complete path. Use it as it is.
52824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52825$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52827$as_echo_n "checking for CCACHE... " >&6; }
52828        if test ! -x "$tool_specified"; then
52829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52830$as_echo "not found" >&6; }
52831          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52832        fi
52833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52834$as_echo "$tool_specified" >&6; }
52835      fi
52836    fi
52837  fi
52838
52839
52840
52841  if test "x$CCACHE" = x; then
52842    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52843  fi
52844
52845
52846      PATH="$OLD_PATH"
52847      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52848      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52849    else
52850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52851$as_echo "no" >&6; }
52852      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52853$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52854    fi
52855  elif test "x$enable_ccache" = xno; then
52856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52857$as_echo "no, explicitly disabled" >&6; }
52858    CCACHE_STATUS="Disabled"
52859  elif test "x$enable_ccache" = x; then
52860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52861$as_echo "no" >&6; }
52862  else
52863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52864$as_echo "unknown" >&6; }
52865    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52866  fi
52867
52868
52869
52870# Check whether --with-ccache-dir was given.
52871if test "${with_ccache_dir+set}" = set; then :
52872  withval=$with_ccache_dir;
52873fi
52874
52875
52876  if test "x$with_ccache_dir" != x; then
52877    # When using a non home ccache directory, assume the use is to share ccache files
52878    # with other users. Thus change the umask.
52879    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52880    if test "x$CCACHE" = x; then
52881      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52882$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52883    fi
52884  fi
52885
52886  if test "x$CCACHE" != x; then
52887
52888  if test "x$CCACHE" != x; then
52889    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52890      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52891          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
52892      if test "x$HAS_BAD_CCACHE" != "x"; then
52893        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52894      fi
52895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52896$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52897      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52898      PUSHED_FLAGS="$CXXFLAGS"
52899      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
52900      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52901/* end confdefs.h.  */
52902
52903int
52904main ()
52905{
52906
52907  ;
52908  return 0;
52909}
52910_ACEOF
52911if ac_fn_cxx_try_compile "$LINENO"; then :
52912  CC_KNOWS_CCACHE_TRICK=yes
52913else
52914  CC_KNOWS_CCACHE_TRICK=no
52915fi
52916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52917      CXXFLAGS="$PUSHED_FLAGS"
52918      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
52919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52920$as_echo "yes" >&6; }
52921        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
52922
52923        CCACHE_SLOPPINESS=pch_defines,time_macros
52924      else
52925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52926$as_echo "no" >&6; }
52927        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
52928      fi
52929    fi
52930
52931    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
52932        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
52933
52934    if test "x$SET_CCACHE_DIR" != x; then
52935      mkdir -p $CCACHE_DIR > /dev/null 2>&1
52936      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
52937    fi
52938  fi
52939
52940  fi
52941
52942
52943###############################################################################
52944#
52945# And now the finish...
52946#
52947###############################################################################
52948
52949# Check for some common pitfalls
52950
52951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52952    file_to_test="$SRC_ROOT/LICENSE"
52953    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
52954      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
52955    fi
52956  fi
52957
52958
52959  # Did user specify any unknown variables?
52960
52961  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
52962    # Replace the separating ! with spaces before presenting for end user.
52963    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
52964    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
52965$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
52966  fi
52967
52968
52969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
52970$as_echo_n "checking if build directory is on local disk... " >&6; }
52971
52972  # df -l lists only local disks; if the given directory is not found then
52973  # a non-zero exit code is given
52974  if test "x$DF" = x; then
52975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52976      # msys does not have df; use Windows "net use" instead.
52977      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
52978      if test "x$IS_NETWORK_DISK" = x; then
52979        OUTPUT_DIR_IS_LOCAL="yes"
52980      else
52981        OUTPUT_DIR_IS_LOCAL="no"
52982      fi
52983    else
52984      # No df here, say it's local
52985      OUTPUT_DIR_IS_LOCAL="yes"
52986    fi
52987  else
52988    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
52989      OUTPUT_DIR_IS_LOCAL="yes"
52990    else
52991      OUTPUT_DIR_IS_LOCAL="no"
52992    fi
52993  fi
52994
52995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
52996$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
52997
52998
52999
53000  # Check if the user has any old-style ALT_ variables set.
53001  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53002
53003  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53004  # Since we can't properly handle the dependencies for this, warn the user about the situation
53005  if test -e $OUTPUT_ROOT/spec.gmk; then
53006    IS_RECONFIGURE=yes
53007  else
53008    IS_RECONFIGURE=no
53009  fi
53010
53011
53012# At the end, call the custom hook. (Dummy macro if no custom sources available)
53013
53014
53015# We're messing a bit with internal autoconf variables to put the config.status
53016# in the output directory instead of the current directory.
53017CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53018
53019# Create the actual output files. Now the main work of configure is done.
53020cat >confcache <<\_ACEOF
53021# This file is a shell script that caches the results of configure
53022# tests run on this system so they can be shared between configure
53023# scripts and configure runs, see configure's option --config-cache.
53024# It is not useful on other systems.  If it contains results you don't
53025# want to keep, you may remove or edit it.
53026#
53027# config.status only pays attention to the cache file if you give it
53028# the --recheck option to rerun configure.
53029#
53030# `ac_cv_env_foo' variables (set or unset) will be overridden when
53031# loading this file, other *unset* `ac_cv_foo' will be assigned the
53032# following values.
53033
53034_ACEOF
53035
53036# The following way of writing the cache mishandles newlines in values,
53037# but we know of no workaround that is simple, portable, and efficient.
53038# So, we kill variables containing newlines.
53039# Ultrix sh set writes to stderr and can't be redirected directly,
53040# and sets the high bit in the cache file unless we assign to the vars.
53041(
53042  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53043    eval ac_val=\$$ac_var
53044    case $ac_val in #(
53045    *${as_nl}*)
53046      case $ac_var in #(
53047      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53048$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53049      esac
53050      case $ac_var in #(
53051      _ | IFS | as_nl) ;; #(
53052      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53053      *) { eval $ac_var=; unset $ac_var;} ;;
53054      esac ;;
53055    esac
53056  done
53057
53058  (set) 2>&1 |
53059    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53060    *${as_nl}ac_space=\ *)
53061      # `set' does not quote correctly, so add quotes: double-quote
53062      # substitution turns \\\\ into \\, and sed turns \\ into \.
53063      sed -n \
53064	"s/'/'\\\\''/g;
53065	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53066      ;; #(
53067    *)
53068      # `set' quotes correctly as required by POSIX, so do not add quotes.
53069      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53070      ;;
53071    esac |
53072    sort
53073) |
53074  sed '
53075     /^ac_cv_env_/b end
53076     t clear
53077     :clear
53078     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53079     t end
53080     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53081     :end' >>confcache
53082if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53083  if test -w "$cache_file"; then
53084    if test "x$cache_file" != "x/dev/null"; then
53085      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53086$as_echo "$as_me: updating cache $cache_file" >&6;}
53087      if test ! -f "$cache_file" || test -h "$cache_file"; then
53088	cat confcache >"$cache_file"
53089      else
53090        case $cache_file in #(
53091        */* | ?:*)
53092	  mv -f confcache "$cache_file"$$ &&
53093	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53094        *)
53095	  mv -f confcache "$cache_file" ;;
53096	esac
53097      fi
53098    fi
53099  else
53100    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53101$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53102  fi
53103fi
53104rm -f confcache
53105
53106test "x$prefix" = xNONE && prefix=$ac_default_prefix
53107# Let make expand exec_prefix.
53108test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53109
53110# Transform confdefs.h into DEFS.
53111# Protect against shell expansion while executing Makefile rules.
53112# Protect against Makefile macro expansion.
53113#
53114# If the first sed substitution is executed (which looks for macros that
53115# take arguments), then branch to the quote section.  Otherwise,
53116# look for a macro that doesn't take arguments.
53117ac_script='
53118:mline
53119/\\$/{
53120 N
53121 s,\\\n,,
53122 b mline
53123}
53124t clear
53125:clear
53126s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53127t quote
53128s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53129t quote
53130b any
53131:quote
53132s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53133s/\[/\\&/g
53134s/\]/\\&/g
53135s/\$/$$/g
53136H
53137:any
53138${
53139	g
53140	s/^\n//
53141	s/\n/ /g
53142	p
53143}
53144'
53145DEFS=`sed -n "$ac_script" confdefs.h`
53146
53147
53148ac_libobjs=
53149ac_ltlibobjs=
53150U=
53151for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53152  # 1. Remove the extension, and $U if already installed.
53153  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53154  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53155  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53156  #    will be set to the directory where LIBOBJS objects are built.
53157  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53158  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53159done
53160LIBOBJS=$ac_libobjs
53161
53162LTLIBOBJS=$ac_ltlibobjs
53163
53164
53165
53166: "${CONFIG_STATUS=./config.status}"
53167ac_write_fail=0
53168ac_clean_files_save=$ac_clean_files
53169ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53170{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53171$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53172as_write_fail=0
53173cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53174#! $SHELL
53175# Generated by $as_me.
53176# Run this file to recreate the current configuration.
53177# Compiler output produced by configure, useful for debugging
53178# configure, is in config.log if it exists.
53179
53180debug=false
53181ac_cs_recheck=false
53182ac_cs_silent=false
53183
53184SHELL=\${CONFIG_SHELL-$SHELL}
53185export SHELL
53186_ASEOF
53187cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53188## -------------------- ##
53189## M4sh Initialization. ##
53190## -------------------- ##
53191
53192# Be more Bourne compatible
53193DUALCASE=1; export DUALCASE # for MKS sh
53194if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53195  emulate sh
53196  NULLCMD=:
53197  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53198  # is contrary to our usage.  Disable this feature.
53199  alias -g '${1+"$@"}'='"$@"'
53200  setopt NO_GLOB_SUBST
53201else
53202  case `(set -o) 2>/dev/null` in #(
53203  *posix*) :
53204    set -o posix ;; #(
53205  *) :
53206     ;;
53207esac
53208fi
53209
53210
53211as_nl='
53212'
53213export as_nl
53214# Printing a long string crashes Solaris 7 /usr/bin/printf.
53215as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53216as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53217as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53218# Prefer a ksh shell builtin over an external printf program on Solaris,
53219# but without wasting forks for bash or zsh.
53220if test -z "$BASH_VERSION$ZSH_VERSION" \
53221    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53222  as_echo='print -r --'
53223  as_echo_n='print -rn --'
53224elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53225  as_echo='printf %s\n'
53226  as_echo_n='printf %s'
53227else
53228  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53229    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53230    as_echo_n='/usr/ucb/echo -n'
53231  else
53232    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53233    as_echo_n_body='eval
53234      arg=$1;
53235      case $arg in #(
53236      *"$as_nl"*)
53237	expr "X$arg" : "X\\(.*\\)$as_nl";
53238	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53239      esac;
53240      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53241    '
53242    export as_echo_n_body
53243    as_echo_n='sh -c $as_echo_n_body as_echo'
53244  fi
53245  export as_echo_body
53246  as_echo='sh -c $as_echo_body as_echo'
53247fi
53248
53249# The user is always right.
53250if test "${PATH_SEPARATOR+set}" != set; then
53251  PATH_SEPARATOR=:
53252  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53253    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53254      PATH_SEPARATOR=';'
53255  }
53256fi
53257
53258
53259# IFS
53260# We need space, tab and new line, in precisely that order.  Quoting is
53261# there to prevent editors from complaining about space-tab.
53262# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53263# splitting by setting IFS to empty value.)
53264IFS=" ""	$as_nl"
53265
53266# Find who we are.  Look in the path if we contain no directory separator.
53267as_myself=
53268case $0 in #((
53269  *[\\/]* ) as_myself=$0 ;;
53270  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53271for as_dir in $PATH
53272do
53273  IFS=$as_save_IFS
53274  test -z "$as_dir" && as_dir=.
53275    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53276  done
53277IFS=$as_save_IFS
53278
53279     ;;
53280esac
53281# We did not find ourselves, most probably we were run as `sh COMMAND'
53282# in which case we are not to be found in the path.
53283if test "x$as_myself" = x; then
53284  as_myself=$0
53285fi
53286if test ! -f "$as_myself"; then
53287  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53288  exit 1
53289fi
53290
53291# Unset variables that we do not need and which cause bugs (e.g. in
53292# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53293# suppresses any "Segmentation fault" message there.  '((' could
53294# trigger a bug in pdksh 5.2.14.
53295for as_var in BASH_ENV ENV MAIL MAILPATH
53296do eval test x\${$as_var+set} = xset \
53297  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53298done
53299PS1='$ '
53300PS2='> '
53301PS4='+ '
53302
53303# NLS nuisances.
53304LC_ALL=C
53305export LC_ALL
53306LANGUAGE=C
53307export LANGUAGE
53308
53309# CDPATH.
53310(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53311
53312
53313# as_fn_error STATUS ERROR [LINENO LOG_FD]
53314# ----------------------------------------
53315# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53316# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53317# script with STATUS, using 1 if that was 0.
53318as_fn_error ()
53319{
53320  as_status=$1; test $as_status -eq 0 && as_status=1
53321  if test "$4"; then
53322    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53323    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53324  fi
53325  $as_echo "$as_me: error: $2" >&2
53326  as_fn_exit $as_status
53327} # as_fn_error
53328
53329
53330# as_fn_set_status STATUS
53331# -----------------------
53332# Set $? to STATUS, without forking.
53333as_fn_set_status ()
53334{
53335  return $1
53336} # as_fn_set_status
53337
53338# as_fn_exit STATUS
53339# -----------------
53340# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53341as_fn_exit ()
53342{
53343  set +e
53344  as_fn_set_status $1
53345  exit $1
53346} # as_fn_exit
53347
53348# as_fn_unset VAR
53349# ---------------
53350# Portably unset VAR.
53351as_fn_unset ()
53352{
53353  { eval $1=; unset $1;}
53354}
53355as_unset=as_fn_unset
53356# as_fn_append VAR VALUE
53357# ----------------------
53358# Append the text in VALUE to the end of the definition contained in VAR. Take
53359# advantage of any shell optimizations that allow amortized linear growth over
53360# repeated appends, instead of the typical quadratic growth present in naive
53361# implementations.
53362if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53363  eval 'as_fn_append ()
53364  {
53365    eval $1+=\$2
53366  }'
53367else
53368  as_fn_append ()
53369  {
53370    eval $1=\$$1\$2
53371  }
53372fi # as_fn_append
53373
53374# as_fn_arith ARG...
53375# ------------------
53376# Perform arithmetic evaluation on the ARGs, and store the result in the
53377# global $as_val. Take advantage of shells that can avoid forks. The arguments
53378# must be portable across $(()) and expr.
53379if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53380  eval 'as_fn_arith ()
53381  {
53382    as_val=$(( $* ))
53383  }'
53384else
53385  as_fn_arith ()
53386  {
53387    as_val=`expr "$@" || test $? -eq 1`
53388  }
53389fi # as_fn_arith
53390
53391
53392if expr a : '\(a\)' >/dev/null 2>&1 &&
53393   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53394  as_expr=expr
53395else
53396  as_expr=false
53397fi
53398
53399if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53400  as_basename=basename
53401else
53402  as_basename=false
53403fi
53404
53405if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53406  as_dirname=dirname
53407else
53408  as_dirname=false
53409fi
53410
53411as_me=`$as_basename -- "$0" ||
53412$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53413	 X"$0" : 'X\(//\)$' \| \
53414	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53415$as_echo X/"$0" |
53416    sed '/^.*\/\([^/][^/]*\)\/*$/{
53417	    s//\1/
53418	    q
53419	  }
53420	  /^X\/\(\/\/\)$/{
53421	    s//\1/
53422	    q
53423	  }
53424	  /^X\/\(\/\).*/{
53425	    s//\1/
53426	    q
53427	  }
53428	  s/.*/./; q'`
53429
53430# Avoid depending upon Character Ranges.
53431as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53432as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53433as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53434as_cr_digits='0123456789'
53435as_cr_alnum=$as_cr_Letters$as_cr_digits
53436
53437ECHO_C= ECHO_N= ECHO_T=
53438case `echo -n x` in #(((((
53439-n*)
53440  case `echo 'xy\c'` in
53441  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53442  xy)  ECHO_C='\c';;
53443  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53444       ECHO_T='	';;
53445  esac;;
53446*)
53447  ECHO_N='-n';;
53448esac
53449
53450rm -f conf$$ conf$$.exe conf$$.file
53451if test -d conf$$.dir; then
53452  rm -f conf$$.dir/conf$$.file
53453else
53454  rm -f conf$$.dir
53455  mkdir conf$$.dir 2>/dev/null
53456fi
53457if (echo >conf$$.file) 2>/dev/null; then
53458  if ln -s conf$$.file conf$$ 2>/dev/null; then
53459    as_ln_s='ln -s'
53460    # ... but there are two gotchas:
53461    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53462    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53463    # In both cases, we have to default to `cp -pR'.
53464    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53465      as_ln_s='cp -pR'
53466  elif ln conf$$.file conf$$ 2>/dev/null; then
53467    as_ln_s=ln
53468  else
53469    as_ln_s='cp -pR'
53470  fi
53471else
53472  as_ln_s='cp -pR'
53473fi
53474rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53475rmdir conf$$.dir 2>/dev/null
53476
53477
53478# as_fn_mkdir_p
53479# -------------
53480# Create "$as_dir" as a directory, including parents if necessary.
53481as_fn_mkdir_p ()
53482{
53483
53484  case $as_dir in #(
53485  -*) as_dir=./$as_dir;;
53486  esac
53487  test -d "$as_dir" || eval $as_mkdir_p || {
53488    as_dirs=
53489    while :; do
53490      case $as_dir in #(
53491      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53492      *) as_qdir=$as_dir;;
53493      esac
53494      as_dirs="'$as_qdir' $as_dirs"
53495      as_dir=`$as_dirname -- "$as_dir" ||
53496$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53497	 X"$as_dir" : 'X\(//\)[^/]' \| \
53498	 X"$as_dir" : 'X\(//\)$' \| \
53499	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53500$as_echo X"$as_dir" |
53501    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53502	    s//\1/
53503	    q
53504	  }
53505	  /^X\(\/\/\)[^/].*/{
53506	    s//\1/
53507	    q
53508	  }
53509	  /^X\(\/\/\)$/{
53510	    s//\1/
53511	    q
53512	  }
53513	  /^X\(\/\).*/{
53514	    s//\1/
53515	    q
53516	  }
53517	  s/.*/./; q'`
53518      test -d "$as_dir" && break
53519    done
53520    test -z "$as_dirs" || eval "mkdir $as_dirs"
53521  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53522
53523
53524} # as_fn_mkdir_p
53525if mkdir -p . 2>/dev/null; then
53526  as_mkdir_p='mkdir -p "$as_dir"'
53527else
53528  test -d ./-p && rmdir ./-p
53529  as_mkdir_p=false
53530fi
53531
53532
53533# as_fn_executable_p FILE
53534# -----------------------
53535# Test if FILE is an executable regular file.
53536as_fn_executable_p ()
53537{
53538  test -f "$1" && test -x "$1"
53539} # as_fn_executable_p
53540as_test_x='test -x'
53541as_executable_p=as_fn_executable_p
53542
53543# Sed expression to map a string onto a valid CPP name.
53544as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53545
53546# Sed expression to map a string onto a valid variable name.
53547as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53548
53549
53550exec 6>&1
53551## ----------------------------------- ##
53552## Main body of $CONFIG_STATUS script. ##
53553## ----------------------------------- ##
53554_ASEOF
53555test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53556
53557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53558# Save the log message, to keep $0 and so on meaningful, and to
53559# report actual input values of CONFIG_FILES etc. instead of their
53560# values after options handling.
53561ac_log="
53562This file was extended by OpenJDK $as_me jdk9, which was
53563generated by GNU Autoconf 2.69.  Invocation command line was
53564
53565  CONFIG_FILES    = $CONFIG_FILES
53566  CONFIG_HEADERS  = $CONFIG_HEADERS
53567  CONFIG_LINKS    = $CONFIG_LINKS
53568  CONFIG_COMMANDS = $CONFIG_COMMANDS
53569  $ $0 $@
53570
53571on `(hostname || uname -n) 2>/dev/null | sed 1q`
53572"
53573
53574_ACEOF
53575
53576case $ac_config_files in *"
53577"*) set x $ac_config_files; shift; ac_config_files=$*;;
53578esac
53579
53580
53581
53582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53583# Files that config.status was made for.
53584config_files="$ac_config_files"
53585
53586_ACEOF
53587
53588cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53589ac_cs_usage="\
53590\`$as_me' instantiates files and other configuration actions
53591from templates according to the current configuration.  Unless the files
53592and actions are specified as TAGs, all are instantiated by default.
53593
53594Usage: $0 [OPTION]... [TAG]...
53595
53596  -h, --help       print this help, then exit
53597  -V, --version    print version number and configuration settings, then exit
53598      --config     print configuration, then exit
53599  -q, --quiet, --silent
53600                   do not print progress messages
53601  -d, --debug      don't remove temporary files
53602      --recheck    update $as_me by reconfiguring in the same conditions
53603      --file=FILE[:TEMPLATE]
53604                   instantiate the configuration file FILE
53605
53606Configuration files:
53607$config_files
53608
53609Report bugs to <build-dev@openjdk.java.net>.
53610OpenJDK home page: <http://openjdk.java.net>."
53611
53612_ACEOF
53613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53614ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53615ac_cs_version="\\
53616OpenJDK config.status jdk9
53617configured by $0, generated by GNU Autoconf 2.69,
53618  with options \\"\$ac_cs_config\\"
53619
53620Copyright (C) 2012 Free Software Foundation, Inc.
53621This config.status script is free software; the Free Software Foundation
53622gives unlimited permission to copy, distribute and modify it."
53623
53624ac_pwd='$ac_pwd'
53625srcdir='$srcdir'
53626AWK='$AWK'
53627test -n "\$AWK" || AWK=awk
53628_ACEOF
53629
53630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53631# The default lists apply if the user does not specify any file.
53632ac_need_defaults=:
53633while test $# != 0
53634do
53635  case $1 in
53636  --*=?*)
53637    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53638    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53639    ac_shift=:
53640    ;;
53641  --*=)
53642    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53643    ac_optarg=
53644    ac_shift=:
53645    ;;
53646  *)
53647    ac_option=$1
53648    ac_optarg=$2
53649    ac_shift=shift
53650    ;;
53651  esac
53652
53653  case $ac_option in
53654  # Handling of the options.
53655  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53656    ac_cs_recheck=: ;;
53657  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53658    $as_echo "$ac_cs_version"; exit ;;
53659  --config | --confi | --conf | --con | --co | --c )
53660    $as_echo "$ac_cs_config"; exit ;;
53661  --debug | --debu | --deb | --de | --d | -d )
53662    debug=: ;;
53663  --file | --fil | --fi | --f )
53664    $ac_shift
53665    case $ac_optarg in
53666    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53667    '') as_fn_error $? "missing file argument" ;;
53668    esac
53669    as_fn_append CONFIG_FILES " '$ac_optarg'"
53670    ac_need_defaults=false;;
53671  --he | --h |  --help | --hel | -h )
53672    $as_echo "$ac_cs_usage"; exit ;;
53673  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53674  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53675    ac_cs_silent=: ;;
53676
53677  # This is an error.
53678  -*) as_fn_error $? "unrecognized option: \`$1'
53679Try \`$0 --help' for more information." ;;
53680
53681  *) as_fn_append ac_config_targets " $1"
53682     ac_need_defaults=false ;;
53683
53684  esac
53685  shift
53686done
53687
53688ac_configure_extra_args=
53689
53690if $ac_cs_silent; then
53691  exec 6>/dev/null
53692  ac_configure_extra_args="$ac_configure_extra_args --silent"
53693fi
53694
53695_ACEOF
53696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53697if \$ac_cs_recheck; then
53698  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53699  shift
53700  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53701  CONFIG_SHELL='$SHELL'
53702  export CONFIG_SHELL
53703  exec "\$@"
53704fi
53705
53706_ACEOF
53707cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53708exec 5>>config.log
53709{
53710  echo
53711  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53712## Running $as_me. ##
53713_ASBOX
53714  $as_echo "$ac_log"
53715} >&5
53716
53717_ACEOF
53718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53719_ACEOF
53720
53721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53722
53723# Handling of arguments.
53724for ac_config_target in $ac_config_targets
53725do
53726  case $ac_config_target in
53727    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53728    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53729    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53730    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53731    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53732
53733  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53734  esac
53735done
53736
53737
53738# If the user did not use the arguments to specify the items to instantiate,
53739# then the envvar interface is used.  Set only those that are not.
53740# We use the long form for the default assignment because of an extremely
53741# bizarre bug on SunOS 4.1.3.
53742if $ac_need_defaults; then
53743  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53744fi
53745
53746# Have a temporary directory for convenience.  Make it in the build tree
53747# simply because there is no reason against having it here, and in addition,
53748# creating and moving files from /tmp can sometimes cause problems.
53749# Hook for its removal unless debugging.
53750# Note that there is a small window in which the directory will not be cleaned:
53751# after its creation but before its name has been assigned to `$tmp'.
53752$debug ||
53753{
53754  tmp= ac_tmp=
53755  trap 'exit_status=$?
53756  : "${ac_tmp:=$tmp}"
53757  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53758' 0
53759  trap 'as_fn_exit 1' 1 2 13 15
53760}
53761# Create a (secure) tmp directory for tmp files.
53762
53763{
53764  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53765  test -d "$tmp"
53766}  ||
53767{
53768  tmp=./conf$$-$RANDOM
53769  (umask 077 && mkdir "$tmp")
53770} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53771ac_tmp=$tmp
53772
53773# Set up the scripts for CONFIG_FILES section.
53774# No need to generate them if there are no CONFIG_FILES.
53775# This happens for instance with `./config.status config.h'.
53776if test -n "$CONFIG_FILES"; then
53777
53778
53779ac_cr=`echo X | tr X '\015'`
53780# On cygwin, bash can eat \r inside `` if the user requested igncr.
53781# But we know of no other shell where ac_cr would be empty at this
53782# point, so we can use a bashism as a fallback.
53783if test "x$ac_cr" = x; then
53784  eval ac_cr=\$\'\\r\'
53785fi
53786ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53787if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53788  ac_cs_awk_cr='\\r'
53789else
53790  ac_cs_awk_cr=$ac_cr
53791fi
53792
53793echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53794_ACEOF
53795
53796
53797{
53798  echo "cat >conf$$subs.awk <<_ACEOF" &&
53799  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53800  echo "_ACEOF"
53801} >conf$$subs.sh ||
53802  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53803ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53804ac_delim='%!_!# '
53805for ac_last_try in false false false false false :; do
53806  . ./conf$$subs.sh ||
53807    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53808
53809  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53810  if test $ac_delim_n = $ac_delim_num; then
53811    break
53812  elif $ac_last_try; then
53813    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53814  else
53815    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53816  fi
53817done
53818rm -f conf$$subs.sh
53819
53820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53821cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53822_ACEOF
53823sed -n '
53824h
53825s/^/S["/; s/!.*/"]=/
53826p
53827g
53828s/^[^!]*!//
53829:repl
53830t repl
53831s/'"$ac_delim"'$//
53832t delim
53833:nl
53834h
53835s/\(.\{148\}\)..*/\1/
53836t more1
53837s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53838p
53839n
53840b repl
53841:more1
53842s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53843p
53844g
53845s/.\{148\}//
53846t nl
53847:delim
53848h
53849s/\(.\{148\}\)..*/\1/
53850t more2
53851s/["\\]/\\&/g; s/^/"/; s/$/"/
53852p
53853b
53854:more2
53855s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53856p
53857g
53858s/.\{148\}//
53859t delim
53860' <conf$$subs.awk | sed '
53861/^[^""]/{
53862  N
53863  s/\n//
53864}
53865' >>$CONFIG_STATUS || ac_write_fail=1
53866rm -f conf$$subs.awk
53867cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53868_ACAWK
53869cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53870  for (key in S) S_is_set[key] = 1
53871  FS = ""
53872
53873}
53874{
53875  line = $ 0
53876  nfields = split(line, field, "@")
53877  substed = 0
53878  len = length(field[1])
53879  for (i = 2; i < nfields; i++) {
53880    key = field[i]
53881    keylen = length(key)
53882    if (S_is_set[key]) {
53883      value = S[key]
53884      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53885      len += length(value) + length(field[++i])
53886      substed = 1
53887    } else
53888      len += 1 + keylen
53889  }
53890
53891  print line
53892}
53893
53894_ACAWK
53895_ACEOF
53896cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53897if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53898  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53899else
53900  cat
53901fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53902  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53903_ACEOF
53904
53905# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53906# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53907# trailing colons and then remove the whole line if VPATH becomes empty
53908# (actually we leave an empty line to preserve line numbers).
53909if test "x$srcdir" = x.; then
53910  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
53911h
53912s///
53913s/^/:/
53914s/[	 ]*$/:/
53915s/:\$(srcdir):/:/g
53916s/:\${srcdir}:/:/g
53917s/:@srcdir@:/:/g
53918s/^:*//
53919s/:*$//
53920x
53921s/\(=[	 ]*\).*/\1/
53922G
53923s/\n//
53924s/^[^=]*=[	 ]*$//
53925}'
53926fi
53927
53928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53929fi # test -n "$CONFIG_FILES"
53930
53931
53932eval set X "  :F $CONFIG_FILES      "
53933shift
53934for ac_tag
53935do
53936  case $ac_tag in
53937  :[FHLC]) ac_mode=$ac_tag; continue;;
53938  esac
53939  case $ac_mode$ac_tag in
53940  :[FHL]*:*);;
53941  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
53942  :[FH]-) ac_tag=-:-;;
53943  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
53944  esac
53945  ac_save_IFS=$IFS
53946  IFS=:
53947  set x $ac_tag
53948  IFS=$ac_save_IFS
53949  shift
53950  ac_file=$1
53951  shift
53952
53953  case $ac_mode in
53954  :L) ac_source=$1;;
53955  :[FH])
53956    ac_file_inputs=
53957    for ac_f
53958    do
53959      case $ac_f in
53960      -) ac_f="$ac_tmp/stdin";;
53961      *) # Look for the file first in the build tree, then in the source tree
53962	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
53963	 # because $ac_f cannot contain `:'.
53964	 test -f "$ac_f" ||
53965	   case $ac_f in
53966	   [\\/$]*) false;;
53967	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
53968	   esac ||
53969	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
53970      esac
53971      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
53972      as_fn_append ac_file_inputs " '$ac_f'"
53973    done
53974
53975    # Let's still pretend it is `configure' which instantiates (i.e., don't
53976    # use $as_me), people would be surprised to read:
53977    #    /* config.h.  Generated by config.status.  */
53978    configure_input='Generated from '`
53979	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
53980	`' by configure.'
53981    if test x"$ac_file" != x-; then
53982      configure_input="$ac_file.  $configure_input"
53983      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
53984$as_echo "$as_me: creating $ac_file" >&6;}
53985    fi
53986    # Neutralize special characters interpreted by sed in replacement strings.
53987    case $configure_input in #(
53988    *\&* | *\|* | *\\* )
53989       ac_sed_conf_input=`$as_echo "$configure_input" |
53990       sed 's/[\\\\&|]/\\\\&/g'`;; #(
53991    *) ac_sed_conf_input=$configure_input;;
53992    esac
53993
53994    case $ac_tag in
53995    *:-:* | *:-) cat >"$ac_tmp/stdin" \
53996      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
53997    esac
53998    ;;
53999  esac
54000
54001  ac_dir=`$as_dirname -- "$ac_file" ||
54002$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54003	 X"$ac_file" : 'X\(//\)[^/]' \| \
54004	 X"$ac_file" : 'X\(//\)$' \| \
54005	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54006$as_echo X"$ac_file" |
54007    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54008	    s//\1/
54009	    q
54010	  }
54011	  /^X\(\/\/\)[^/].*/{
54012	    s//\1/
54013	    q
54014	  }
54015	  /^X\(\/\/\)$/{
54016	    s//\1/
54017	    q
54018	  }
54019	  /^X\(\/\).*/{
54020	    s//\1/
54021	    q
54022	  }
54023	  s/.*/./; q'`
54024  as_dir="$ac_dir"; as_fn_mkdir_p
54025  ac_builddir=.
54026
54027case "$ac_dir" in
54028.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54029*)
54030  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54031  # A ".." for each directory in $ac_dir_suffix.
54032  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54033  case $ac_top_builddir_sub in
54034  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54035  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54036  esac ;;
54037esac
54038ac_abs_top_builddir=$ac_pwd
54039ac_abs_builddir=$ac_pwd$ac_dir_suffix
54040# for backward compatibility:
54041ac_top_builddir=$ac_top_build_prefix
54042
54043case $srcdir in
54044  .)  # We are building in place.
54045    ac_srcdir=.
54046    ac_top_srcdir=$ac_top_builddir_sub
54047    ac_abs_top_srcdir=$ac_pwd ;;
54048  [\\/]* | ?:[\\/]* )  # Absolute name.
54049    ac_srcdir=$srcdir$ac_dir_suffix;
54050    ac_top_srcdir=$srcdir
54051    ac_abs_top_srcdir=$srcdir ;;
54052  *) # Relative name.
54053    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54054    ac_top_srcdir=$ac_top_build_prefix$srcdir
54055    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54056esac
54057ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54058
54059
54060  case $ac_mode in
54061  :F)
54062  #
54063  # CONFIG_FILE
54064  #
54065
54066_ACEOF
54067
54068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54069# If the template does not know about datarootdir, expand it.
54070# FIXME: This hack should be removed a few years after 2.60.
54071ac_datarootdir_hack=; ac_datarootdir_seen=
54072ac_sed_dataroot='
54073/datarootdir/ {
54074  p
54075  q
54076}
54077/@datadir@/p
54078/@docdir@/p
54079/@infodir@/p
54080/@localedir@/p
54081/@mandir@/p'
54082case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54083*datarootdir*) ac_datarootdir_seen=yes;;
54084*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54085  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54086$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54087_ACEOF
54088cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54089  ac_datarootdir_hack='
54090  s&@datadir@&$datadir&g
54091  s&@docdir@&$docdir&g
54092  s&@infodir@&$infodir&g
54093  s&@localedir@&$localedir&g
54094  s&@mandir@&$mandir&g
54095  s&\\\${datarootdir}&$datarootdir&g' ;;
54096esac
54097_ACEOF
54098
54099# Neutralize VPATH when `$srcdir' = `.'.
54100# Shell code in configure.ac might set extrasub.
54101# FIXME: do we really want to maintain this feature?
54102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54103ac_sed_extra="$ac_vpsub
54104$extrasub
54105_ACEOF
54106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54107:t
54108/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54109s|@configure_input@|$ac_sed_conf_input|;t t
54110s&@top_builddir@&$ac_top_builddir_sub&;t t
54111s&@top_build_prefix@&$ac_top_build_prefix&;t t
54112s&@srcdir@&$ac_srcdir&;t t
54113s&@abs_srcdir@&$ac_abs_srcdir&;t t
54114s&@top_srcdir@&$ac_top_srcdir&;t t
54115s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54116s&@builddir@&$ac_builddir&;t t
54117s&@abs_builddir@&$ac_abs_builddir&;t t
54118s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54119$ac_datarootdir_hack
54120"
54121eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54122  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54123
54124test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54125  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54126  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54127      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54128  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54129which seems to be undefined.  Please make sure it is defined" >&5
54130$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54131which seems to be undefined.  Please make sure it is defined" >&2;}
54132
54133  rm -f "$ac_tmp/stdin"
54134  case $ac_file in
54135  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54136  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54137  esac \
54138  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54139 ;;
54140
54141
54142
54143  esac
54144
54145done # for ac_tag
54146
54147
54148as_fn_exit 0
54149_ACEOF
54150ac_clean_files=$ac_clean_files_save
54151
54152test $ac_write_fail = 0 ||
54153  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54154
54155
54156# configure is writing to config.log, and then calls config.status.
54157# config.status does its own redirection, appending to config.log.
54158# Unfortunately, on DOS this fails, as config.log is still kept open
54159# by configure, so config.status won't be able to write to it; its
54160# output is simply discarded.  So we exec the FD to /dev/null,
54161# effectively closing config.log, so it can be properly (re)opened and
54162# appended to by config.status.  When coming back to configure, we
54163# need to make the FD available again.
54164if test "$no_create" != yes; then
54165  ac_cs_success=:
54166  ac_config_status_args=
54167  test "$silent" = yes &&
54168    ac_config_status_args="$ac_config_status_args --quiet"
54169  exec 5>/dev/null
54170  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54171  exec 5>>config.log
54172  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54173  # would make configure fail if this is the last instruction.
54174  $ac_cs_success || as_fn_exit 1
54175fi
54176if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54177  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54178$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54179fi
54180
54181
54182
54183# Try to move the config.log file to the output directory.
54184if test -e ./config.log; then
54185  $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54186fi
54187
54188# Make the compare script executable
54189$CHMOD +x $OUTPUT_ROOT/compare.sh
54190
54191# Finally output some useful information to the user
54192
54193  # Finally output some useful information to the user
54194
54195  printf "\n"
54196  printf "====================================================\n"
54197  if test "x$no_create" != "xyes"; then
54198    if test "x$IS_RECONFIGURE" != "xyes"; then
54199      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54200    else
54201      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54202    fi
54203  else
54204    if test "x$IS_RECONFIGURE" != "xyes"; then
54205      printf "A configuration has been successfully checked but not created\n"
54206    else
54207      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54208    fi
54209  fi
54210  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54211    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54212  else
54213    printf "using default settings.\n"
54214  fi
54215
54216  printf "\n"
54217  printf "Configuration summary:\n"
54218  printf "* Debug level:    $DEBUG_LEVEL\n"
54219  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54220  printf "* JDK variant:    $JDK_VARIANT\n"
54221  printf "* JVM variants:   $with_jvm_variants\n"
54222  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54223
54224  printf "\n"
54225  printf "Tools summary:\n"
54226  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54227    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54228  fi
54229  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54230  if test "x$TOOLCHAIN_VERSION" != "x"; then
54231    print_version=" $TOOLCHAIN_VERSION"
54232  fi
54233  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54234  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54235  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54236
54237  printf "\n"
54238  printf "Build performance summary:\n"
54239  printf "* Cores to use:   $JOBS\n"
54240  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54241  if test "x$CCACHE_STATUS" != "x"; then
54242    printf "* ccache status:  $CCACHE_STATUS\n"
54243  fi
54244  printf "\n"
54245
54246  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54247    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54248    printf "will result in longer build times.\n"
54249    printf "\n"
54250  fi
54251
54252  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54253    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54254    printf "These are not respected, and will be ignored. It is recommended\n"
54255    printf "that you clean your environment. The following variables are set:\n"
54256    printf "$FOUND_ALT_VARIABLES\n"
54257    printf "\n"
54258  fi
54259
54260  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54261    printf "WARNING: Your build output directory is not on a local disk.\n"
54262    printf "This will severely degrade build performance!\n"
54263    printf "It is recommended that you create an output directory on a local disk,\n"
54264    printf "and run the configure script again from that directory.\n"
54265    printf "\n"
54266  fi
54267
54268  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54269    printf "WARNING: The result of this configuration has overridden an older\n"
54270    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54271    printf "proper build. Failure to do so might result in strange build problems.\n"
54272    printf "\n"
54273  fi
54274
54275  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54276    printf "WARNING: The result of this configuration was not saved.\n"
54277    printf "You should run without '--no-create | -n' to create the configuration.\n"
54278    printf "\n"
54279  fi
54280
54281
54282
54283if test -e "$OUTPUT_ROOT/config.log"; then
54284  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
54285  if test $? -eq 0; then
54286    printf "The following warnings were produced. Repeated here for convenience:\n"
54287    # We must quote sed expression (using []) to stop m4 from eating the [].
54288    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
54289    printf "\n"
54290  fi
54291fi
54292
54293
54294